Skip to content

Commit

Permalink
format and build
Browse files Browse the repository at this point in the history
  • Loading branch information
jenn-le authored Nov 5, 2024
1 parent 93ea64d commit 9eca00e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,7 @@ export interface TreeBranch extends IDisposable {

// @alpha @sealed
export interface TreeBranchEvents {
changed(data: CommitMetadata, getRevertible?: RevertibleFactory): void;
commitApplied(data: CommitMetadata, getRevertible?: RevertibleFactory): void;
schemaChanged(): void;
}
Expand Down Expand Up @@ -1248,7 +1249,9 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
}

// @alpha @sealed
export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeView<ReadSchema<TSchema>>, "root" | "initialize">, Omit<TreeBranch, "events"> {
export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeView<ReadSchema<TSchema>>, "root" | "initialize">, TreeBranch {
// (undocumented)
readonly events: Listenable<TreeViewEvents & TreeBranchEvents>;
// (undocumented)
fork(): ReturnType<TreeBranch["fork"]> & TreeViewAlpha<TSchema>;
// (undocumented)
Expand All @@ -1270,8 +1273,6 @@ export class TreeViewConfiguration<const TSchema extends ImplicitFieldSchema = I

// @public @sealed
export interface TreeViewEvents {
// @alpha (undocumented)
changed(): void;
commitApplied(data: CommitMetadata, getRevertible?: RevertibleFactory): void;
rootChanged(): void;
schemaChanged(): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1353,8 +1353,6 @@ export class TreeViewConfiguration<const TSchema extends ImplicitFieldSchema = I

// @public @sealed
export interface TreeViewEvents {
// @alpha (undocumented)
changed(): void;
commitApplied(data: CommitMetadata, getRevertible?: RevertibleFactory): void;
rootChanged(): void;
schemaChanged(): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ import { ConnectionState } from "@fluidframework/container-loader";
import { ContainerSchema, type IFluidContainer } from "@fluidframework/fluid-static";
import { timeoutPromise } from "@fluidframework/test-utils/internal";
import { TreeViewConfiguration, SchemaFactory, type TreeView } from "@fluidframework/tree";
import { asTreeViewAlpha, SharedTree, Tree, TreeStatus, type Revertible } from "@fluidframework/tree/internal";
import {
asTreeViewAlpha,
SharedTree,
Tree,
TreeStatus,
type Revertible,
} from "@fluidframework/tree/internal";
import type { AxiosResponse } from "axios";

import {
Expand Down Expand Up @@ -214,9 +220,11 @@ for (const testOpts of testMatrix) {
it("can handle undo/redo and transactions", async () => {
const { container } = await client.createContainer(schema, "2");
await container.attach();
const view = asTreeViewAlpha(container.initialObjects.tree1.viewWith(
new TreeViewConfiguration({ schema: User, enableSchemaValidation: true }),
));
const view = asTreeViewAlpha(
container.initialObjects.tree1.viewWith(
new TreeViewConfiguration({ schema: User, enableSchemaValidation: true }),
),
);

view.initialize(
new User({
Expand Down

0 comments on commit 9eca00e

Please sign in to comment.