fluid-framework 2.117.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +468 -7
- package/README.md +55 -52
- package/{api-extractor.json → api-extractor/api-extractor-model.json} +1 -1
- package/api-report/fluid-framework.alpha.api.md +176 -137
- package/api-report/fluid-framework.beta.api.md +161 -84
- package/api-report/fluid-framework.legacy.beta.api.md +169 -88
- package/api-report/fluid-framework.legacy.public.api.md +31 -38
- package/api-report/fluid-framework.public.api.md +27 -36
- package/dist/alpha.d.ts +19 -13
- package/dist/beta.d.ts +13 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +13 -0
- package/lib/alpha.d.ts +20 -14
- package/lib/beta.d.ts +14 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +14 -1
- package/lib/public.d.ts +1 -1
- package/package.json +49 -54
- package/src/index.ts +1 -0
- package/tsconfig.json +1 -1
- package/alpha.d.ts +0 -11
- package/beta.d.ts +0 -11
- package/legacy.d.ts +0 -11
- /package/api-extractor/{api-extractor.current.json → api-extractor-report.current.json} +0 -0
- /package/api-extractor/{api-extractor.legacy.json → api-extractor-report.legacy.json} +0 -0
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
7
|
// @beta
|
|
8
|
-
export function adaptEnum<TScope extends string, const TEnum extends Record<string, string | number>>(factory: SchemaFactory<TScope>, members: TEnum): (<TValue extends TEnum[keyof TEnum]>(value: TValue) => TValue extends unknown ? TreeNode & {
|
|
9
|
-
readonly value: TValue;
|
|
10
|
-
} : never) & { readonly [Property in keyof TEnum]: TreeNodeSchemaClass<ScopedSchemaName<TScope, TEnum[Property]>, NodeKind.Object, TreeNode & {
|
|
8
|
+
export function adaptEnum<TScope extends string, const TEnum extends Record<string, string | number>>(factory: SchemaFactory<TScope>, members: TEnum): (<TValue extends TEnum[keyof TEnum]>(value: TValue) => TValue extends unknown ? NodeFromSchema<ReturnType<typeof singletonSchema<TScope, TValue>>> : never) & { readonly [Property in keyof TEnum]: TreeNodeSchemaClass<ScopedSchemaName<TScope, TEnum[Property]>, NodeKind.Object, TreeNode & {
|
|
11
9
|
readonly value: TEnum[Property];
|
|
12
10
|
}, Record<string, never>, true, Record<string, never>, undefined>; } & {
|
|
13
11
|
readonly schema: UnionToTuple<{ readonly [Property in keyof TEnum]: TreeNodeSchemaClass<ScopedSchemaName<TScope, TEnum[Property]>, NodeKind.Object, TreeNode & {
|
|
@@ -86,6 +84,41 @@ type ApplyKindInput<T, Kind extends FieldKind, DefaultsAreOptional extends boole
|
|
|
86
84
|
Kind
|
|
87
85
|
] extends [FieldKind.Required] ? T : [Kind] extends [FieldKind.Optional] ? T | undefined : [Kind] extends [FieldKind.Identifier] ? DefaultsAreOptional extends true ? T | undefined : T : never;
|
|
88
86
|
|
|
87
|
+
// @beta @sealed
|
|
88
|
+
export type ArrayNodeDeltaOp = ArrayNodeRetainOp | ArrayNodeInsertOp | ArrayNodeRemoveOp;
|
|
89
|
+
|
|
90
|
+
// @beta @sealed
|
|
91
|
+
export interface ArrayNodeInsertOp {
|
|
92
|
+
// (undocumented)
|
|
93
|
+
readonly count: number;
|
|
94
|
+
// (undocumented)
|
|
95
|
+
readonly type: "insert";
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// @beta @sealed
|
|
99
|
+
export interface ArrayNodeRemoveOp {
|
|
100
|
+
// (undocumented)
|
|
101
|
+
readonly count: number;
|
|
102
|
+
// (undocumented)
|
|
103
|
+
readonly type: "remove";
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// @beta @sealed
|
|
107
|
+
export interface ArrayNodeRetainOp {
|
|
108
|
+
// (undocumented)
|
|
109
|
+
readonly count: number;
|
|
110
|
+
// (undocumented)
|
|
111
|
+
readonly type: "retain";
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// @beta
|
|
115
|
+
export type ArrayNodeTreeChangedDeltaOp = ArrayNodeTreeChangedRetainOp | ArrayNodeInsertOp | ArrayNodeRemoveOp;
|
|
116
|
+
|
|
117
|
+
// @beta @sealed
|
|
118
|
+
export interface ArrayNodeTreeChangedRetainOp extends ArrayNodeRetainOp {
|
|
119
|
+
readonly subtreeChanged: boolean;
|
|
120
|
+
}
|
|
121
|
+
|
|
89
122
|
// @beta
|
|
90
123
|
export function asBeta<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): TreeViewBeta<TSchema>;
|
|
91
124
|
|
|
@@ -160,6 +193,9 @@ export function createIdentifierIndex<TSchema extends ImplicitFieldSchema>(view:
|
|
|
160
193
|
// @beta
|
|
161
194
|
export function createIndependentTreeBeta<const TSchema extends ImplicitFieldSchema>(options?: ForestOptions): ViewableTree;
|
|
162
195
|
|
|
196
|
+
// @beta
|
|
197
|
+
export function createIndependentTreeView<const TSchema extends ImplicitFieldSchema>(config: TreeViewConfiguration<TSchema>, options?: ForestOptions): TreeViewBeta<TSchema>;
|
|
198
|
+
|
|
163
199
|
// @beta
|
|
164
200
|
export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue>(view: TreeView<TFieldSchema>, indexer: (schema: TreeNodeSchema) => string | undefined, getValue: (nodes: TreeIndexNodes<TreeNode>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey): TreeIndex<TKey, TValue>;
|
|
165
201
|
|
|
@@ -177,9 +213,7 @@ interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldProvider
|
|
|
177
213
|
}
|
|
178
214
|
|
|
179
215
|
// @beta
|
|
180
|
-
export function enumFromStrings<TScope extends string, const Members extends readonly string[]>(factory: SchemaFactory<TScope>, members: Members): (<TValue extends Members[number]>(value: TValue) => TValue extends unknown ? TreeNode & {
|
|
181
|
-
readonly value: TValue;
|
|
182
|
-
} : never) & { [Index in Extract<keyof Members, `${number}`> extends `${infer N extends number}` ? N : never as Members[Index]]: TreeNodeSchemaClass<ScopedSchemaName<TScope, Members[Index]>, NodeKind.Object, TreeNode & {
|
|
216
|
+
export function enumFromStrings<TScope extends string, const Members extends readonly string[]>(factory: SchemaFactory<TScope>, members: Members): (<TValue extends Members[number]>(value: TValue) => TValue extends unknown ? NodeFromSchema<ReturnType<typeof singletonSchema<TScope, TValue>>> : never) & { [Index in Extract<keyof Members, `${number}`> extends `${infer N extends number}` ? N : never as Members[Index]]: TreeNodeSchemaClass<ScopedSchemaName<TScope, Members[Index]>, NodeKind.Object, TreeNode & {
|
|
183
217
|
readonly value: Members[Index];
|
|
184
218
|
}, Record<string, never>, true, Record<string, never>, undefined>; } & {
|
|
185
219
|
readonly schema: UnionToTuple<Members[number] extends unknown ? { [Index in Extract<keyof Members, `${number}`> extends `${infer N extends number}` ? N : never as Members[Index]]: TreeNodeSchemaClass<ScopedSchemaName<TScope, Members[Index]>, NodeKind.Object, TreeNode & {
|
|
@@ -373,7 +407,7 @@ export namespace FluidSerializableAsTree {
|
|
|
373
407
|
export type _RecursiveArrayWorkaroundJsonArray = FixRecursiveArraySchema<typeof Array>;
|
|
374
408
|
const // @system
|
|
375
409
|
_APIExtractorWorkaroundArrayBase: TreeNodeSchemaClass<"com.fluidframework.serializable.array", NodeKind.Array, System_Unsafe.TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>]> & WithType<"com.fluidframework.serializable.array", NodeKind.Array, unknown>, {
|
|
376
|
-
[Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null, any,
|
|
410
|
+
[Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null, any, any>;
|
|
377
411
|
}, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>], undefined>;
|
|
378
412
|
// (undocumented)
|
|
379
413
|
export type Tree = TreeNodeFromImplicitAllowedTypes<typeof Tree>;
|
|
@@ -713,7 +747,7 @@ declare namespace InternalTypes {
|
|
|
713
747
|
FieldHasDefault,
|
|
714
748
|
ScopedSchemaName,
|
|
715
749
|
DefaultProvider,
|
|
716
|
-
|
|
750
|
+
schemaIdentifierBrand,
|
|
717
751
|
InsertableObjectFromSchemaRecord,
|
|
718
752
|
FlexList,
|
|
719
753
|
FlexListToUnion,
|
|
@@ -761,10 +795,10 @@ export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
|
|
|
761
795
|
eventName: string;
|
|
762
796
|
}
|
|
763
797
|
|
|
764
|
-
// @public
|
|
798
|
+
// @public @input
|
|
765
799
|
export interface ITelemetryBaseLogger {
|
|
766
800
|
minLogLevel?: LogLevel | undefined;
|
|
767
|
-
send(event: ITelemetryBaseEvent, logLevel
|
|
801
|
+
send(event: ITelemetryBaseEvent, logLevel: LogLevel): void;
|
|
768
802
|
}
|
|
769
803
|
|
|
770
804
|
// @public
|
|
@@ -833,10 +867,6 @@ export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
|
833
867
|
|
|
834
868
|
// @public
|
|
835
869
|
export interface LogLevelConst {
|
|
836
|
-
// @deprecated
|
|
837
|
-
readonly default: 20;
|
|
838
|
-
// @deprecated
|
|
839
|
-
readonly error: 30;
|
|
840
870
|
readonly essential: 30;
|
|
841
871
|
readonly info: 20;
|
|
842
872
|
readonly verbose: 10;
|
|
@@ -863,6 +893,22 @@ type NodeBuilderData<T extends TreeNodeSchemaCore<string, NodeKind, boolean>> =
|
|
|
863
893
|
// @beta @sealed
|
|
864
894
|
export interface NodeChangedData<TNode extends TreeNode = TreeNode> {
|
|
865
895
|
readonly changedProperties?: ReadonlySet<TNode extends WithType<string, NodeKind.Object, infer TInfo> ? string & keyof TInfo : string>;
|
|
896
|
+
readonly delta?: readonly ArrayNodeDeltaOp[] | undefined;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
// @beta @sealed
|
|
900
|
+
export interface NodeChangedDataDelta extends NodeChangedData {
|
|
901
|
+
readonly delta: readonly ArrayNodeDeltaOp[] | undefined;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
// @beta @sealed
|
|
905
|
+
export interface NodeChangedDataProperties<TNode extends TreeNode = TreeNode> extends NodeChangedData<TNode> {
|
|
906
|
+
readonly changedProperties: ReadonlySet<TNode extends WithType<string, NodeKind.Object, infer TInfo> ? string & keyof TInfo : string>;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
// @beta @sealed
|
|
910
|
+
export interface NodeChangedDataTreeDelta {
|
|
911
|
+
readonly delta: readonly ArrayNodeTreeChangedDeltaOp[] | undefined;
|
|
866
912
|
}
|
|
867
913
|
|
|
868
914
|
// @public
|
|
@@ -921,7 +967,7 @@ export function onAssertionFailure(handler: (error: Error) => void): () => void;
|
|
|
921
967
|
export type PopUnion<Union, AsOverloadedFunction = UnionToIntersection<Union extends unknown ? (f: Union) => void : never>> = AsOverloadedFunction extends (a: infer First) => void ? First : never;
|
|
922
968
|
|
|
923
969
|
// @public @sealed @system
|
|
924
|
-
export interface ReadonlyArrayNode<out T = TreeNode | TreeLeafValue> extends
|
|
970
|
+
export interface ReadonlyArrayNode<out T = TreeNode | TreeLeafValue> extends FluidReadonlyArray<T>, Awaited<TreeNode & WithType<string, NodeKind.Array>> {
|
|
925
971
|
}
|
|
926
972
|
|
|
927
973
|
// @beta @system
|
|
@@ -994,27 +1040,59 @@ export interface SchemaCompatibilityStatus {
|
|
|
994
1040
|
readonly isEquivalent: boolean;
|
|
995
1041
|
}
|
|
996
1042
|
|
|
1043
|
+
// @beta @sealed
|
|
1044
|
+
export interface SchemaCompatibilityStatusBeta extends SchemaCompatibilityStatus {
|
|
1045
|
+
readonly discrepancies: readonly SchemaDiscrepancy[] | undefined;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
// @beta @sealed
|
|
1049
|
+
export type SchemaDiscrepancy = {
|
|
1050
|
+
readonly mismatch: "allowedTypes";
|
|
1051
|
+
readonly location: "root" | {
|
|
1052
|
+
readonly nodeType: string;
|
|
1053
|
+
readonly fieldKey: string | undefined;
|
|
1054
|
+
};
|
|
1055
|
+
readonly view: readonly string[];
|
|
1056
|
+
readonly stagedView?: readonly string[];
|
|
1057
|
+
readonly stored: readonly string[];
|
|
1058
|
+
readonly viewIsStagedOptional?: true;
|
|
1059
|
+
} | {
|
|
1060
|
+
readonly mismatch: "fieldKind";
|
|
1061
|
+
readonly location: "root" | {
|
|
1062
|
+
readonly nodeType: string;
|
|
1063
|
+
readonly fieldKey: string | undefined;
|
|
1064
|
+
};
|
|
1065
|
+
readonly view: string;
|
|
1066
|
+
readonly stored: string;
|
|
1067
|
+
readonly viewIsStagedOptional?: true;
|
|
1068
|
+
} | {
|
|
1069
|
+
readonly mismatch: "valueSchema";
|
|
1070
|
+
readonly nodeType: string;
|
|
1071
|
+
readonly view: string | undefined;
|
|
1072
|
+
readonly stored: string | undefined;
|
|
1073
|
+
} | {
|
|
1074
|
+
readonly mismatch: "nodeKind";
|
|
1075
|
+
readonly nodeType: string;
|
|
1076
|
+
readonly view: string;
|
|
1077
|
+
readonly stored: string;
|
|
1078
|
+
};
|
|
1079
|
+
|
|
997
1080
|
// @public @sealed
|
|
998
1081
|
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactory_base {
|
|
999
1082
|
constructor(
|
|
1000
1083
|
scope: TScope);
|
|
1001
1084
|
array<const T extends TreeNodeSchema | readonly TreeNodeSchema[]>(allowedTypes: T): TreeNodeSchemaNonClass<ScopedSchemaName<TScope, `Array<${string}>`>, NodeKind.Array, TreeArrayNode<T> & WithType<ScopedSchemaName<TScope, `Array<${string}>`>, NodeKind.Array>, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>, true, T, undefined>;
|
|
1002
1085
|
array<const Name extends TName, const T extends ImplicitAllowedTypes>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Array, TreeArrayNode<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Array>, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>, true, T, undefined>;
|
|
1003
|
-
arrayRecursive<const Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Array, System_Unsafe.TreeArrayNodeUnsafe<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Array
|
|
1086
|
+
arrayRecursive<const Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Array, System_Unsafe.TreeArrayNodeUnsafe<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Array>, {
|
|
1004
1087
|
[Symbol.iterator](): Iterator<System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>;
|
|
1005
1088
|
}, false, T, undefined>;
|
|
1006
1089
|
protected getStructuralType(fullName: string, types: TreeNodeSchema | readonly TreeNodeSchema[], builder: () => TreeNodeSchema): TreeNodeSchema;
|
|
1007
1090
|
get identifier(): FieldSchema<FieldKind.Identifier, typeof SchemaFactory.string>;
|
|
1008
1091
|
map<const T extends TreeNodeSchema | readonly TreeNodeSchema[]>(allowedTypes: T): TreeNodeSchemaNonClass<ScopedSchemaName<TScope, `Map<${string}>`>, NodeKind.Map, TreeMapNode<T> & WithType<ScopedSchemaName<TScope, `Map<${string}>`>, NodeKind.Map>, MapNodeInsertableData<T>, true, T, undefined>;
|
|
1009
1092
|
map<Name extends TName, const T extends ImplicitAllowedTypes>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Map, TreeMapNode<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Map>, MapNodeInsertableData<T>, true, T, undefined>;
|
|
1010
|
-
mapRecursive<Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Map, System_Unsafe.TreeMapNodeUnsafe<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Map
|
|
1011
|
-
[Symbol.iterator](): Iterator<[
|
|
1012
|
-
|
|
1013
|
-
System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>
|
|
1014
|
-
]>;
|
|
1015
|
-
} | {
|
|
1016
|
-
readonly [x: string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;
|
|
1017
|
-
}, false, T, undefined>;
|
|
1093
|
+
mapRecursive<Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Map, System_Unsafe.TreeMapNodeUnsafe<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Map>, {
|
|
1094
|
+
[Symbol.iterator](): Iterator<[string, System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>]>;
|
|
1095
|
+
} | { readonly [P in string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>; }, false, T, undefined>;
|
|
1018
1096
|
object<const Name extends TName, const T extends RestrictiveStringRecord<ImplicitFieldSchema>>(name: Name, fields: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, TreeObjectNode<T, ScopedSchemaName<TScope, Name>>, object & InsertableObjectFromSchemaRecord<T>, true, T>;
|
|
1019
1097
|
objectRecursive<const Name extends TName, const T extends RestrictiveStringRecord<System_Unsafe.ImplicitFieldSchemaUnsafe>>(name: Name, t: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, System_Unsafe.TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>, object & System_Unsafe.InsertableObjectFromSchemaRecordUnsafe<T>, false, T>;
|
|
1020
1098
|
readonly scope: TScope;
|
|
@@ -1030,20 +1108,21 @@ export class SchemaFactoryBeta<out TScope extends string | undefined = string |
|
|
|
1030
1108
|
objectRecursive<const Name extends TName, const T extends RestrictiveStringRecord<System_Unsafe.ImplicitFieldSchemaUnsafe>, const TCustomMetadata = unknown>(name: Name, t: T, options?: ObjectSchemaOptions<TCustomMetadata>): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, System_Unsafe.TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>, object & System_Unsafe.InsertableObjectFromSchemaRecordUnsafe<T>, false, T, never, TCustomMetadata>;
|
|
1031
1109
|
record<const T extends TreeNodeSchema | readonly TreeNodeSchema[]>(allowedTypes: T): TreeNodeSchemaNonClass<ScopedSchemaName<TScope, `Record<${string}>`>, NodeKind.Record, TreeRecordNode<T> & WithType<ScopedSchemaName<TScope, `Record<${string}>`>, NodeKind.Record>, RecordNodeInsertableData<T>, true, T, undefined>;
|
|
1032
1110
|
record<const Name extends TName, const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptions<TCustomMetadata>): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Record, TreeRecordNode<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Record>, RecordNodeInsertableData<T>, true, T, undefined, TCustomMetadata>;
|
|
1033
|
-
recordRecursive<Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptions<TCustomMetadata>): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Record, TreeRecordNodeUnsafe<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Record,
|
|
1034
|
-
readonly [x: string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;
|
|
1035
|
-
}, false, T, undefined, TCustomMetadata>;
|
|
1111
|
+
recordRecursive<Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptions<TCustomMetadata>): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Record, TreeRecordNodeUnsafe<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Record>, { readonly [P in string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>; }, false, T, undefined, TCustomMetadata>;
|
|
1036
1112
|
scopedFactory<const T extends TName, TNameInner extends number | string = string>(name: T): SchemaFactoryBeta<ScopedSchemaName<TScope, T>, TNameInner>;
|
|
1037
1113
|
static staged: <const T extends LazyItem<TreeNodeSchema>>(t: T | AnnotatedAllowedType<T>) => AnnotatedAllowedType<T>;
|
|
1038
1114
|
staged: <const T extends LazyItem<TreeNodeSchema>>(t: T | AnnotatedAllowedType<T>) => AnnotatedAllowedType<T>;
|
|
1039
|
-
static stagedRecursive: <const T extends
|
|
1040
|
-
stagedRecursive: <const T extends
|
|
1041
|
-
static types: <const T extends readonly (
|
|
1042
|
-
types: <const T extends readonly (
|
|
1043
|
-
static typesRecursive: <const T extends readonly
|
|
1044
|
-
typesRecursive: <const T extends readonly
|
|
1115
|
+
static stagedRecursive: <const T extends Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>>(t: T) => AnnotatedAllowedTypeUnsafe<UnannotateAllowedTypeUnsafe<T>>;
|
|
1116
|
+
stagedRecursive: <const T extends Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>>(t: T) => AnnotatedAllowedTypeUnsafe<UnannotateAllowedTypeUnsafe<T>>;
|
|
1117
|
+
static types: <const T extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[]>(t: T, metadata?: AllowedTypesMetadata) => AllowedTypesFullFromMixed<T>;
|
|
1118
|
+
types: <const T extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[]>(t: T, metadata?: AllowedTypesMetadata) => AllowedTypesFullFromMixed<T>;
|
|
1119
|
+
static typesRecursive: <const T extends readonly Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>[]>(t: T, metadata?: AllowedTypesMetadata) => AllowedTypesFullFromMixedUnsafe<T>;
|
|
1120
|
+
typesRecursive: <const T extends readonly Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>[]>(t: T, metadata?: AllowedTypesMetadata) => AllowedTypesFullFromMixedUnsafe<T>;
|
|
1045
1121
|
}
|
|
1046
1122
|
|
|
1123
|
+
// @public @system
|
|
1124
|
+
const schemaIdentifierBrand: unique symbol;
|
|
1125
|
+
|
|
1047
1126
|
// @public @sealed @system
|
|
1048
1127
|
export interface SchemaStatics {
|
|
1049
1128
|
readonly boolean: LeafSchema<"boolean", boolean>;
|
|
@@ -1130,6 +1209,10 @@ export interface SnapshotSchemaCompatibilityOptions {
|
|
|
1130
1209
|
readonly rejectVersionsWithNoSchemaChange?: true;
|
|
1131
1210
|
readonly schema: TreeViewConfiguration;
|
|
1132
1211
|
readonly snapshotDirectory: string;
|
|
1212
|
+
readonly snapshotFileNameFormat?: {
|
|
1213
|
+
readonly prefix?: string;
|
|
1214
|
+
readonly suffix?: string;
|
|
1215
|
+
};
|
|
1133
1216
|
readonly snapshotUnchangedVersions?: true;
|
|
1134
1217
|
readonly version: string;
|
|
1135
1218
|
readonly versionComparer?: (a: string, b: string) => number;
|
|
@@ -1145,7 +1228,7 @@ export namespace System_TableSchema {
|
|
|
1145
1228
|
export function createColumnSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TPropsSchema extends ImplicitFieldSchema>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, propsSchema: TPropsSchema): TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Column">, NodeKind.Object, TreeNode & TableSchema.Column<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Column">, NodeKind, unknown>, object & {
|
|
1146
1229
|
readonly id?: string | undefined;
|
|
1147
1230
|
} & (FieldHasDefault<TPropsSchema> extends true ? {
|
|
1148
|
-
props?: InsertableTreeFieldFromImplicitField<TPropsSchema
|
|
1231
|
+
props?: InsertableTreeFieldFromImplicitField<TPropsSchema>;
|
|
1149
1232
|
} : {
|
|
1150
1233
|
props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
|
|
1151
1234
|
}), true, {
|
|
@@ -1159,7 +1242,7 @@ export namespace System_TableSchema {
|
|
|
1159
1242
|
readonly id?: string | undefined;
|
|
1160
1243
|
readonly cells: (InsertableTypedNode<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>> | undefined) & InsertableTypedNode<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>>;
|
|
1161
1244
|
} & (FieldHasDefault<TPropsSchema> extends true ? {
|
|
1162
|
-
props?: InsertableTreeFieldFromImplicitField<TPropsSchema
|
|
1245
|
+
props?: InsertableTreeFieldFromImplicitField<TPropsSchema>;
|
|
1163
1246
|
} : {
|
|
1164
1247
|
props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
|
|
1165
1248
|
}), true, {
|
|
@@ -1240,18 +1323,20 @@ export namespace System_Unsafe {
|
|
|
1240
1323
|
};
|
|
1241
1324
|
// @sealed @system
|
|
1242
1325
|
export interface ReadonlyMapInlined<K, T extends ImplicitAllowedTypesUnsafe> {
|
|
1243
|
-
[Symbol.iterator]():
|
|
1244
|
-
entries(): IterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;
|
|
1326
|
+
[Symbol.iterator](): FluidIterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;
|
|
1245
1327
|
// (undocumented)
|
|
1246
|
-
|
|
1328
|
+
readonly [Symbol.toStringTag]: string;
|
|
1329
|
+
entries(): FluidIterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;
|
|
1330
|
+
// (undocumented)
|
|
1331
|
+
forEach(callbackfn: (value: TreeNodeFromImplicitAllowedTypesUnsafe<T>, key: K, map: FluidReadonlyMap<K, TreeNodeFromImplicitAllowedTypesUnsafe<T>>) => void, thisArg?: any): void;
|
|
1247
1332
|
// (undocumented)
|
|
1248
1333
|
get(key: K): TreeNodeFromImplicitAllowedTypesUnsafe<T> | undefined;
|
|
1249
1334
|
// (undocumented)
|
|
1250
1335
|
has(key: K): boolean;
|
|
1251
|
-
keys():
|
|
1336
|
+
keys(): FluidIterableIterator<K>;
|
|
1252
1337
|
// (undocumented)
|
|
1253
1338
|
readonly size: number;
|
|
1254
|
-
values():
|
|
1339
|
+
values(): FluidIterableIterator<TreeNodeFromImplicitAllowedTypesUnsafe<T>>;
|
|
1255
1340
|
}
|
|
1256
1341
|
// @sealed @system
|
|
1257
1342
|
export interface TreeArrayNodeUnsafe<TAllowedTypes extends ImplicitAllowedTypesUnsafe> extends TreeArrayNode<TAllowedTypes, TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>, InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>> {
|
|
@@ -1298,16 +1383,6 @@ export namespace TableSchema {
|
|
|
1298
1383
|
export function column<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateColumnOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
1299
1384
|
readonly props: TProps;
|
|
1300
1385
|
}): System_TableSchema.ColumnSchemaBase<TUserScope, TCell, TProps>;
|
|
1301
|
-
// @deprecated @input
|
|
1302
|
-
export interface InsertColumnsParameters<TColumn extends ImplicitAllowedTypes> {
|
|
1303
|
-
readonly columns: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1304
|
-
readonly index?: number | undefined;
|
|
1305
|
-
}
|
|
1306
|
-
// @deprecated @input
|
|
1307
|
-
export interface InsertRowsParameters<TRow extends ImplicitAllowedTypes> {
|
|
1308
|
-
readonly index?: number | undefined;
|
|
1309
|
-
readonly rows: InsertableTreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1310
|
-
}
|
|
1311
1386
|
// @sealed
|
|
1312
1387
|
export interface Row<TCell extends ImplicitAllowedTypes, TProps extends ImplicitFieldSchema = ImplicitFieldSchema> {
|
|
1313
1388
|
readonly id: string;
|
|
@@ -1318,11 +1393,6 @@ export namespace TableSchema {
|
|
|
1318
1393
|
export function row<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateRowOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
1319
1394
|
readonly props: TProps;
|
|
1320
1395
|
}): System_TableSchema.RowSchemaBase<TUserScope, TCell, TProps>;
|
|
1321
|
-
// @deprecated @input
|
|
1322
|
-
export interface SetCellParameters<TCell extends ImplicitAllowedTypes, TColumn extends ImplicitAllowedTypes, TRow extends ImplicitAllowedTypes> {
|
|
1323
|
-
readonly cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>;
|
|
1324
|
-
readonly key: CellKey<TColumn, TRow>;
|
|
1325
|
-
}
|
|
1326
1396
|
// @sealed
|
|
1327
1397
|
export interface Table<TUserScope extends string, TCell extends ImplicitAllowedTypes, TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>, TRow extends System_TableSchema.RowSchemaBase<TUserScope, TCell>> {
|
|
1328
1398
|
readonly columns: System_TableSchema.RearrangeableList<TColumn>;
|
|
@@ -1332,14 +1402,8 @@ export namespace TableSchema {
|
|
|
1332
1402
|
getRow(id: string): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
|
|
1333
1403
|
getRow(index: number): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
|
|
1334
1404
|
insertColumns(columns: readonly InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[], index?: number): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1335
|
-
// @deprecated
|
|
1336
|
-
insertColumns(params: InsertColumnsParameters<TColumn>): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1337
1405
|
insertRows(rows: readonly InsertableTreeNodeFromImplicitAllowedTypes<TRow>[], index?: number): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1338
|
-
// @deprecated
|
|
1339
|
-
insertRows(params: InsertRowsParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1340
1406
|
removeCell(row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>, column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
1341
|
-
// @deprecated
|
|
1342
|
-
removeCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
1343
1407
|
removeColumns(index?: number | undefined, count?: number | undefined): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1344
1408
|
removeColumns(columns: readonly TreeNodeFromImplicitAllowedTypes<TColumn>[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
1345
1409
|
removeColumns(columns: readonly string[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
@@ -1348,8 +1412,6 @@ export namespace TableSchema {
|
|
|
1348
1412
|
removeRows(rows: readonly string[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
1349
1413
|
readonly rows: System_TableSchema.RearrangeableList<TRow>;
|
|
1350
1414
|
setCell(row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>, column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>, cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>): void;
|
|
1351
|
-
// @deprecated
|
|
1352
|
-
setCell(params: SetCellParameters<TCell, TColumn, TRow>): void;
|
|
1353
1415
|
}
|
|
1354
1416
|
export function table<const TUserScope extends string, const TCell extends ImplicitAllowedTypes>(params: System_TableSchema.TableFactoryOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell>): System_TableSchema.TableSchemaBase<TUserScope, TCell, System_TableSchema.ColumnSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>, System_TableSchema.RowSchemaBase<TUserScope, TCell, System_TableSchema.DefaultPropsType>>;
|
|
1355
1417
|
export function table<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>>(params: System_TableSchema.TableFactoryOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
@@ -1438,7 +1500,7 @@ export interface TreeArrayNode<TAllowedTypes extends System_Unsafe.ImplicitAllow
|
|
|
1438
1500
|
push(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;
|
|
1439
1501
|
removeAt(index: number): void;
|
|
1440
1502
|
removeRange(start?: number, end?: number): void;
|
|
1441
|
-
values():
|
|
1503
|
+
values(): FluidIterableIterator<T>;
|
|
1442
1504
|
}
|
|
1443
1505
|
|
|
1444
1506
|
// @public
|
|
@@ -1449,6 +1511,7 @@ export const TreeArrayNode: {
|
|
|
1449
1511
|
// @beta @sealed
|
|
1450
1512
|
export interface TreeBeta {
|
|
1451
1513
|
clone<const TSchema extends ImplicitFieldSchema>(node: TreeFieldFromImplicitField<TSchema>): TreeFieldFromImplicitField<TSchema>;
|
|
1514
|
+
context(node: TreeNode): TreeContextBeta;
|
|
1452
1515
|
create<const TSchema extends ImplicitFieldSchema>(schema: TSchema, data: InsertableTreeFieldFromImplicitField<TSchema>): Unhydrated<TreeFieldFromImplicitField<TSchema>>;
|
|
1453
1516
|
exportConcise(node: TreeNode | TreeLeafValue, options?: TreeEncodingOptions): ConciseTree;
|
|
1454
1517
|
exportConcise(node: TreeNode | TreeLeafValue | undefined, options?: TreeEncodingOptions): ConciseTree | undefined;
|
|
@@ -1465,12 +1528,22 @@ export type TreeBranch = UntypedTreeView;
|
|
|
1465
1528
|
// @public @sealed
|
|
1466
1529
|
export interface TreeChangeEvents {
|
|
1467
1530
|
nodeChanged(unstable?: unknown): void;
|
|
1468
|
-
treeChanged(): void;
|
|
1531
|
+
treeChanged(unstable?: unknown): void;
|
|
1469
1532
|
}
|
|
1470
1533
|
|
|
1471
1534
|
// @beta @sealed
|
|
1472
|
-
export interface TreeChangeEventsBeta<TNode extends TreeNode = TreeNode> extends TreeChangeEvents {
|
|
1473
|
-
nodeChanged: (data:
|
|
1535
|
+
export interface TreeChangeEventsBeta<TNode extends TreeNode = TreeNode> extends Omit<TreeChangeEvents, "nodeChanged" | "treeChanged"> {
|
|
1536
|
+
nodeChanged: (data: TNode extends WithType<string, NodeKind.Array> ? NodeChangedDataDelta : TNode extends WithType<string, NodeKind.Map | NodeKind.Object | NodeKind.Record> ? NodeChangedDataProperties<TNode> : NodeChangedData<TNode>) => void;
|
|
1537
|
+
treeChanged: TNode extends WithType<string, NodeKind.Array> ? (data: NodeChangedDataTreeDelta) => void : TreeChangeEvents["treeChanged"];
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
// @beta @sealed
|
|
1541
|
+
export interface TreeContextBeta {
|
|
1542
|
+
isView(): this is UntypedTreeView;
|
|
1543
|
+
runTransaction<TValue>(transaction: () => WithValue<TValue>, params?: RunTransactionParamsBeta): TransactionValueResult<TValue, TValue>;
|
|
1544
|
+
runTransaction(transaction: () => void, params?: RunTransactionParamsBeta): TransactionVoidResult;
|
|
1545
|
+
runTransactionAsync<TValue>(transaction: () => Promise<WithValue<TValue>>, params?: RunTransactionParamsBeta): Promise<TransactionValueResult<TValue, TValue>>;
|
|
1546
|
+
runTransactionAsync(transaction: () => Promise<void>, params?: RunTransactionParamsBeta): Promise<TransactionVoidResult>;
|
|
1474
1547
|
}
|
|
1475
1548
|
|
|
1476
1549
|
// @beta @input
|
|
@@ -1496,21 +1569,20 @@ export type TreeIndexNodes<TNode> = readonly [first: TNode, ...rest: TNode[]];
|
|
|
1496
1569
|
export type TreeLeafValue = number | string | boolean | IFluidHandle | null;
|
|
1497
1570
|
|
|
1498
1571
|
// @public @sealed
|
|
1499
|
-
export interface TreeMapNode<T extends ImplicitAllowedTypes = ImplicitAllowedTypes> extends
|
|
1572
|
+
export interface TreeMapNode<T extends ImplicitAllowedTypes = ImplicitAllowedTypes> extends FluidReadonlyMap<string, TreeNodeFromImplicitAllowedTypes<T>>, TreeNode {
|
|
1500
1573
|
delete(key: string): void;
|
|
1501
|
-
entries():
|
|
1502
|
-
forEach(callbackfn: (value: TreeNodeFromImplicitAllowedTypes<T>, key: string, map:
|
|
1503
|
-
keys():
|
|
1574
|
+
entries(): FluidIterableIterator<[string, TreeNodeFromImplicitAllowedTypes<T>]>;
|
|
1575
|
+
forEach(callbackfn: (value: TreeNodeFromImplicitAllowedTypes<T>, key: string, map: FluidReadonlyMap<string, TreeNodeFromImplicitAllowedTypes<T>>) => void, thisArg?: any): void;
|
|
1576
|
+
keys(): FluidIterableIterator<string>;
|
|
1504
1577
|
set(key: string, value: InsertableTreeNodeFromImplicitAllowedTypes<T> | undefined): void;
|
|
1505
|
-
values():
|
|
1578
|
+
values(): FluidIterableIterator<TreeNodeFromImplicitAllowedTypes<T>>;
|
|
1506
1579
|
}
|
|
1507
1580
|
|
|
1508
1581
|
// @public @sealed
|
|
1509
1582
|
export abstract class TreeNode implements WithType {
|
|
1583
|
+
abstract get [schemaIdentifierBrand](): string;
|
|
1510
1584
|
static [Symbol.hasInstance](value: unknown): value is TreeNode;
|
|
1511
1585
|
static [Symbol.hasInstance]<TSchema extends abstract new (...args: any[]) => TreeNode>(this: TSchema, value: unknown): value is InstanceType<TSchema>;
|
|
1512
|
-
// @deprecated
|
|
1513
|
-
abstract get [typeNameSymbol](): string;
|
|
1514
1586
|
abstract get [typeSchemaSymbol](): TreeNodeSchemaClass;
|
|
1515
1587
|
protected constructor(token: unknown);
|
|
1516
1588
|
}
|
|
@@ -1562,7 +1634,7 @@ export type TreeObjectNode<T extends RestrictiveStringRecord<ImplicitFieldSchema
|
|
|
1562
1634
|
|
|
1563
1635
|
// @beta
|
|
1564
1636
|
export interface TreeRecordNode<TAllowedTypes extends ImplicitAllowedTypes = ImplicitAllowedTypes> extends TreeNode, Record<string, TreeNodeFromImplicitAllowedTypes<TAllowedTypes>> {
|
|
1565
|
-
[Symbol.iterator]():
|
|
1637
|
+
[Symbol.iterator](): FluidIterableIterator<[
|
|
1566
1638
|
string,
|
|
1567
1639
|
TreeNodeFromImplicitAllowedTypes<TAllowedTypes>
|
|
1568
1640
|
]>;
|
|
@@ -1571,7 +1643,7 @@ export interface TreeRecordNode<TAllowedTypes extends ImplicitAllowedTypes = Imp
|
|
|
1571
1643
|
// @beta @sealed @system
|
|
1572
1644
|
export interface TreeRecordNodeUnsafe<TAllowedTypes extends System_Unsafe.ImplicitAllowedTypesUnsafe> extends Record<string, System_Unsafe.TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>>, TreeNode {
|
|
1573
1645
|
// (undocumented)
|
|
1574
|
-
[Symbol.iterator]():
|
|
1646
|
+
[Symbol.iterator](): FluidIterableIterator<[
|
|
1575
1647
|
string,
|
|
1576
1648
|
System_Unsafe.TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>
|
|
1577
1649
|
]>;
|
|
@@ -1598,10 +1670,9 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
|
|
|
1598
1670
|
|
|
1599
1671
|
// @beta @sealed
|
|
1600
1672
|
export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, UntypedTreeView {
|
|
1673
|
+
readonly compatibility: SchemaCompatibilityStatusBeta;
|
|
1601
1674
|
// (undocumented)
|
|
1602
1675
|
fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewBeta<TSchema>;
|
|
1603
|
-
runTransaction<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => TOut, params?: RunTransactionParamsBeta): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult;
|
|
1604
|
-
runTransactionAsync<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => Promise<TOut>, params?: RunTransactionParamsBeta): Promise<TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult>;
|
|
1605
1676
|
}
|
|
1606
1677
|
|
|
1607
1678
|
// @public @sealed
|
|
@@ -1621,9 +1692,6 @@ export interface TreeViewEvents {
|
|
|
1621
1692
|
schemaChanged(): void;
|
|
1622
1693
|
}
|
|
1623
1694
|
|
|
1624
|
-
// @public @deprecated @system
|
|
1625
|
-
const typeNameSymbol: unique symbol;
|
|
1626
|
-
|
|
1627
1695
|
// @public @system
|
|
1628
1696
|
export const typeSchemaSymbol: unique symbol;
|
|
1629
1697
|
|
|
@@ -1655,11 +1723,21 @@ export type UnionToIntersection<T> = (T extends T ? (k: T) => unknown : never) e
|
|
|
1655
1723
|
export type UnionToTuple<Union, A extends unknown[] = [], First = PopUnion<Union>> = IsUnion<Union> extends true ? UnionToTuple<Exclude<Union, First>, [First, ...A]> : [Union, ...A];
|
|
1656
1724
|
|
|
1657
1725
|
// @beta @sealed
|
|
1658
|
-
export interface UntypedTreeView extends IDisposable {
|
|
1726
|
+
export interface UntypedTreeView extends IDisposable, TreeContextBeta {
|
|
1659
1727
|
dispose(error?: Error): void;
|
|
1660
1728
|
fork(): UntypedTreeView;
|
|
1661
1729
|
merge(view: UntypedTreeView, disposeMerged?: boolean): void;
|
|
1662
1730
|
rebaseOnto(view: UntypedTreeView): void;
|
|
1731
|
+
// (undocumented)
|
|
1732
|
+
runTransaction<TValue>(transaction: () => WithValue<TValue>, params?: RunTransactionParamsBeta): TransactionValueResult<TValue, TValue>;
|
|
1733
|
+
// (undocumented)
|
|
1734
|
+
runTransaction(transaction: () => void, params?: RunTransactionParamsBeta): TransactionVoidResult;
|
|
1735
|
+
runTransaction<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => TOut, params?: RunTransactionParamsBeta): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult;
|
|
1736
|
+
// (undocumented)
|
|
1737
|
+
runTransactionAsync<TValue>(transaction: () => Promise<WithValue<TValue>>, params?: RunTransactionParamsBeta): Promise<TransactionValueResult<TValue, TValue>>;
|
|
1738
|
+
// (undocumented)
|
|
1739
|
+
runTransactionAsync(transaction: () => Promise<void>, params?: RunTransactionParamsBeta): Promise<TransactionVoidResult>;
|
|
1740
|
+
runTransactionAsync<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => Promise<TOut>, params?: RunTransactionParamsBeta): Promise<TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult>;
|
|
1663
1741
|
}
|
|
1664
1742
|
|
|
1665
1743
|
// @public
|
|
@@ -1692,8 +1770,7 @@ export type VoidTransactionCallbackStatusBeta = Omit<TransactionCallbackStatusBe
|
|
|
1692
1770
|
|
|
1693
1771
|
// @public @sealed
|
|
1694
1772
|
export interface WithType<out TName extends string = string, out TKind extends NodeKind = NodeKind, out TInfo = unknown> {
|
|
1695
|
-
|
|
1696
|
-
get [typeNameSymbol](): TName;
|
|
1773
|
+
get [schemaIdentifierBrand](): TName;
|
|
1697
1774
|
get [typeSchemaSymbol](): TreeNodeSchemaClass<TName, TKind, TreeNode, never, boolean, TInfo>;
|
|
1698
1775
|
}
|
|
1699
1776
|
|