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 & {
|
|
@@ -106,10 +104,10 @@ export interface ArrayNodeCustomizableSchemaUnsafe<out TName extends string, in
|
|
|
106
104
|
}, false, T, undefined, TCustomMetadata>, SimpleArrayNodeSchema<SchemaType.View, TCustomMetadata> {
|
|
107
105
|
}
|
|
108
106
|
|
|
109
|
-
// @
|
|
107
|
+
// @beta @sealed
|
|
110
108
|
export type ArrayNodeDeltaOp = ArrayNodeRetainOp | ArrayNodeInsertOp | ArrayNodeRemoveOp;
|
|
111
109
|
|
|
112
|
-
// @
|
|
110
|
+
// @beta @sealed
|
|
113
111
|
export interface ArrayNodeInsertOp {
|
|
114
112
|
// (undocumented)
|
|
115
113
|
readonly count: number;
|
|
@@ -121,7 +119,7 @@ export interface ArrayNodeInsertOp {
|
|
|
121
119
|
export interface ArrayNodePojoEmulationSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaNonClass<TName, NodeKind.Array, TreeArrayNode<T> & WithType<TName, NodeKind.Array, T>, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleArrayNodeSchema<SchemaType.View, TCustomMetadata> {
|
|
122
120
|
}
|
|
123
121
|
|
|
124
|
-
// @
|
|
122
|
+
// @beta @sealed
|
|
125
123
|
export interface ArrayNodeRemoveOp {
|
|
126
124
|
// (undocumented)
|
|
127
125
|
readonly count: number;
|
|
@@ -129,7 +127,7 @@ export interface ArrayNodeRemoveOp {
|
|
|
129
127
|
readonly type: "remove";
|
|
130
128
|
}
|
|
131
129
|
|
|
132
|
-
// @
|
|
130
|
+
// @beta @sealed
|
|
133
131
|
export interface ArrayNodeRetainOp {
|
|
134
132
|
// (undocumented)
|
|
135
133
|
readonly count: number;
|
|
@@ -145,10 +143,10 @@ export const ArrayNodeSchema: {
|
|
|
145
143
|
readonly [Symbol.hasInstance]: (value: TreeNodeSchema) => value is ArrayNodeSchema;
|
|
146
144
|
};
|
|
147
145
|
|
|
148
|
-
// @
|
|
146
|
+
// @beta
|
|
149
147
|
export type ArrayNodeTreeChangedDeltaOp = ArrayNodeTreeChangedRetainOp | ArrayNodeInsertOp | ArrayNodeRemoveOp;
|
|
150
148
|
|
|
151
|
-
// @
|
|
149
|
+
// @beta @sealed
|
|
152
150
|
export interface ArrayNodeTreeChangedRetainOp extends ArrayNodeRetainOp {
|
|
153
151
|
readonly subtreeChanged: boolean;
|
|
154
152
|
}
|
|
@@ -159,6 +157,9 @@ export interface ArrayPlaceAnchor {
|
|
|
159
157
|
get index(): number;
|
|
160
158
|
}
|
|
161
159
|
|
|
160
|
+
// @alpha
|
|
161
|
+
export function asAlpha(tree: ITree): ITreeAlpha;
|
|
162
|
+
|
|
162
163
|
// @alpha
|
|
163
164
|
export function asAlpha<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): TreeViewAlpha<TSchema>;
|
|
164
165
|
|
|
@@ -174,9 +175,6 @@ export function asAlpha<TAllowedTypes extends ImplicitAllowedTypes>(node: TreeMa
|
|
|
174
175
|
// @beta
|
|
175
176
|
export function asBeta<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): TreeViewBeta<TSchema>;
|
|
176
177
|
|
|
177
|
-
// @alpha @deprecated
|
|
178
|
-
export function asTreeViewAlpha<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): TreeViewAlpha<TSchema>;
|
|
179
|
-
|
|
180
178
|
// @public
|
|
181
179
|
export enum AttachState {
|
|
182
180
|
Attached = "Attached",
|
|
@@ -210,6 +208,9 @@ export interface CodecWriteOptionsBeta {
|
|
|
210
208
|
readonly minVersionForCollab: OldestSupportedClientVersion;
|
|
211
209
|
}
|
|
212
210
|
|
|
211
|
+
// @alpha
|
|
212
|
+
export function codePointCount(value: string): number;
|
|
213
|
+
|
|
213
214
|
// @public
|
|
214
215
|
export enum CommitKind {
|
|
215
216
|
Default = 0,
|
|
@@ -333,6 +334,12 @@ export type CreateIndependentTreeAlphaOptions = ForestOptions & IndependentViewT
|
|
|
333
334
|
// @beta
|
|
334
335
|
export function createIndependentTreeBeta<const TSchema extends ImplicitFieldSchema>(options?: ForestOptions): ViewableTree;
|
|
335
336
|
|
|
337
|
+
// @beta
|
|
338
|
+
export function createIndependentTreeView<const TSchema extends ImplicitFieldSchema>(config: TreeViewConfiguration<TSchema>, options?: ForestOptions): TreeViewBeta<TSchema>;
|
|
339
|
+
|
|
340
|
+
// @alpha
|
|
341
|
+
export function createIndependentTreeViewAlpha<const TSchema extends ImplicitFieldSchema>(config: TreeViewConfiguration<TSchema>, options?: IndependentViewOptions): TreeViewAlpha<TSchema>;
|
|
342
|
+
|
|
336
343
|
// @beta
|
|
337
344
|
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>;
|
|
338
345
|
|
|
@@ -406,9 +413,7 @@ export type DirtyTreeStatus = "new" | "changed" | "moved";
|
|
|
406
413
|
export function encodeSchemaCompatibilitySnapshot(simpleSchema: SimpleTreeSchema): JsonCompatibleReadOnly;
|
|
407
414
|
|
|
408
415
|
// @beta
|
|
409
|
-
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 & {
|
|
410
|
-
readonly value: TValue;
|
|
411
|
-
} : 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 & {
|
|
416
|
+
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 & {
|
|
412
417
|
readonly value: Members[Index];
|
|
413
418
|
}, Record<string, never>, true, Record<string, never>, undefined>; } & {
|
|
414
419
|
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 & {
|
|
@@ -475,6 +480,9 @@ export type FactoryContentObject = {
|
|
|
475
480
|
readonly [P in string]?: InsertableContent;
|
|
476
481
|
};
|
|
477
482
|
|
|
483
|
+
// @alpha
|
|
484
|
+
export function featureVersion<major extends `${bigint}`, minor extends `${bigint}`>(version: `${major}.${minor}.${bigint}-${string}` | `${major}.${minor}.${bigint}`): `${major}.${minor}.0`;
|
|
485
|
+
|
|
478
486
|
// @public @system
|
|
479
487
|
type FieldHasDefault<T extends ImplicitFieldSchema> = [T] extends [
|
|
480
488
|
FieldSchema<FieldKind.Optional | FieldKind.Identifier>
|
|
@@ -699,7 +707,7 @@ export namespace FluidSerializableAsTree {
|
|
|
699
707
|
export type _RecursiveArrayWorkaroundJsonArray = FixRecursiveArraySchema<typeof Array>;
|
|
700
708
|
const // @system
|
|
701
709
|
_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>, {
|
|
702
|
-
[Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null, any,
|
|
710
|
+
[Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null, any, any>;
|
|
703
711
|
}, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>], undefined>;
|
|
704
712
|
// (undocumented)
|
|
705
713
|
export type Tree = TreeNodeFromImplicitAllowedTypes<typeof Tree>;
|
|
@@ -1085,7 +1093,7 @@ export const incrementalSummaryHint: unique symbol;
|
|
|
1085
1093
|
// @alpha
|
|
1086
1094
|
export function independentInitializedView<const TSchema extends ImplicitFieldSchema>(config: TreeViewConfiguration<TSchema>, options: ForestOptions & ICodecOptions & IndependentViewTelemetryOptions, content: ViewContent): TreeViewAlpha<TSchema>;
|
|
1087
1095
|
|
|
1088
|
-
// @alpha
|
|
1096
|
+
// @alpha @deprecated
|
|
1089
1097
|
export function independentView<const TSchema extends ImplicitFieldSchema>(config: TreeViewConfiguration<TSchema>, options?: IndependentViewOptions): TreeViewAlpha<TSchema>;
|
|
1090
1098
|
|
|
1091
1099
|
// @alpha @input
|
|
@@ -1180,7 +1188,7 @@ declare namespace InternalTypes {
|
|
|
1180
1188
|
FieldHasDefault,
|
|
1181
1189
|
ScopedSchemaName,
|
|
1182
1190
|
DefaultProvider,
|
|
1183
|
-
|
|
1191
|
+
schemaIdentifierBrand,
|
|
1184
1192
|
InsertableObjectFromSchemaRecord,
|
|
1185
1193
|
FlexList,
|
|
1186
1194
|
FlexListToUnion,
|
|
@@ -1228,10 +1236,10 @@ export interface ITelemetryBaseEvent extends ITelemetryBaseProperties {
|
|
|
1228
1236
|
eventName: string;
|
|
1229
1237
|
}
|
|
1230
1238
|
|
|
1231
|
-
// @public
|
|
1239
|
+
// @public @input
|
|
1232
1240
|
export interface ITelemetryBaseLogger {
|
|
1233
1241
|
minLogLevel?: LogLevel | undefined;
|
|
1234
|
-
send(event: ITelemetryBaseEvent, logLevel
|
|
1242
|
+
send(event: ITelemetryBaseEvent, logLevel: LogLevel): void;
|
|
1235
1243
|
}
|
|
1236
1244
|
|
|
1237
1245
|
// @public
|
|
@@ -1269,7 +1277,7 @@ export interface ITreeViewConfiguration<TSchema extends ImplicitFieldSchema = Im
|
|
|
1269
1277
|
readonly schema: TSchema;
|
|
1270
1278
|
}
|
|
1271
1279
|
|
|
1272
|
-
// @alpha
|
|
1280
|
+
// @alpha @input
|
|
1273
1281
|
export interface ITreeViewConfigurationAlpha<TSchema extends ImplicitFieldSchema = ImplicitFieldSchema> extends ITreeViewConfiguration<TSchema> {
|
|
1274
1282
|
readonly stagedUpgradePolicy?: StagedSchemaUpgradePolicy;
|
|
1275
1283
|
}
|
|
@@ -1437,10 +1445,6 @@ export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
|
|
|
1437
1445
|
|
|
1438
1446
|
// @public
|
|
1439
1447
|
export interface LogLevelConst {
|
|
1440
|
-
// @deprecated
|
|
1441
|
-
readonly default: 20;
|
|
1442
|
-
// @deprecated
|
|
1443
|
-
readonly error: 30;
|
|
1444
1448
|
readonly essential: 30;
|
|
1445
1449
|
readonly info: 20;
|
|
1446
1450
|
readonly verbose: 10;
|
|
@@ -1506,22 +1510,20 @@ type NodeBuilderData<T extends TreeNodeSchemaCore<string, NodeKind, boolean>> =
|
|
|
1506
1510
|
// @beta @sealed
|
|
1507
1511
|
export interface NodeChangedData<TNode extends TreeNode = TreeNode> {
|
|
1508
1512
|
readonly changedProperties?: ReadonlySet<TNode extends WithType<string, NodeKind.Object, infer TInfo> ? string & keyof TInfo : string>;
|
|
1513
|
+
readonly delta?: readonly ArrayNodeDeltaOp[] | undefined;
|
|
1509
1514
|
}
|
|
1510
1515
|
|
|
1511
|
-
// @
|
|
1512
|
-
export
|
|
1513
|
-
|
|
1514
|
-
// @alpha @sealed
|
|
1515
|
-
export interface NodeChangedDataDelta {
|
|
1516
|
+
// @beta @sealed
|
|
1517
|
+
export interface NodeChangedDataDelta extends NodeChangedData {
|
|
1516
1518
|
readonly delta: readonly ArrayNodeDeltaOp[] | undefined;
|
|
1517
1519
|
}
|
|
1518
1520
|
|
|
1519
|
-
// @
|
|
1520
|
-
export interface NodeChangedDataProperties<TNode extends TreeNode = TreeNode> {
|
|
1521
|
+
// @beta @sealed
|
|
1522
|
+
export interface NodeChangedDataProperties<TNode extends TreeNode = TreeNode> extends NodeChangedData<TNode> {
|
|
1521
1523
|
readonly changedProperties: ReadonlySet<TNode extends WithType<string, NodeKind.Object, infer TInfo> ? string & keyof TInfo : string>;
|
|
1522
1524
|
}
|
|
1523
1525
|
|
|
1524
|
-
// @
|
|
1526
|
+
// @beta @sealed
|
|
1525
1527
|
export interface NodeChangedDataTreeDelta {
|
|
1526
1528
|
readonly delta: readonly ArrayNodeTreeChangedDeltaOp[] | undefined;
|
|
1527
1529
|
}
|
|
@@ -1585,7 +1587,7 @@ export interface ObjectNodeSchema<out TName extends string = string, in out T ex
|
|
|
1585
1587
|
|
|
1586
1588
|
// @alpha (undocumented)
|
|
1587
1589
|
export const ObjectNodeSchema: {
|
|
1588
|
-
readonly [Symbol.hasInstance]: (value: TreeNodeSchema) => value is ObjectNodeSchema
|
|
1590
|
+
readonly [Symbol.hasInstance]: (value: TreeNodeSchema) => value is ObjectNodeSchema;
|
|
1589
1591
|
};
|
|
1590
1592
|
|
|
1591
1593
|
// @alpha @sealed
|
|
@@ -1612,7 +1614,7 @@ export interface ObservationResults<TResult> {
|
|
|
1612
1614
|
export type Off = () => void;
|
|
1613
1615
|
|
|
1614
1616
|
// @alpha @input
|
|
1615
|
-
export type OldestSupportedServiceClientVersion =
|
|
1617
|
+
export type OldestSupportedServiceClientVersion = `${2 | 3}.${bigint}.0`;
|
|
1616
1618
|
|
|
1617
1619
|
// @beta
|
|
1618
1620
|
export function onAssertionFailure(handler: (error: Error) => void): () => void;
|
|
@@ -1627,6 +1629,7 @@ export namespace PlainText {
|
|
|
1627
1629
|
characterCount(): number;
|
|
1628
1630
|
characters(): Iterable<string>;
|
|
1629
1631
|
charactersCopy(): string[];
|
|
1632
|
+
createInsertionAnchor(index: number): ArrayPlaceAnchor;
|
|
1630
1633
|
fullString(): string;
|
|
1631
1634
|
insertAt(index: number, additionalCharacters: string): void;
|
|
1632
1635
|
onCharactersChanged(callback: (ops: readonly TextOp[] | undefined) => void): () => void;
|
|
@@ -1663,7 +1666,7 @@ export type PopUnion<Union, AsOverloadedFunction = UnionToIntersection<Union ext
|
|
|
1663
1666
|
export type ReadableField<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> = TreeFieldFromImplicitField<ReadSchema<TSchema>>;
|
|
1664
1667
|
|
|
1665
1668
|
// @public @sealed @system
|
|
1666
|
-
export interface ReadonlyArrayNode<out T = TreeNode | TreeLeafValue> extends
|
|
1669
|
+
export interface ReadonlyArrayNode<out T = TreeNode | TreeLeafValue> extends FluidReadonlyArray<T>, Awaited<TreeNode & WithType<string, NodeKind.Array>> {
|
|
1667
1670
|
}
|
|
1668
1671
|
|
|
1669
1672
|
// @alpha @system
|
|
@@ -1687,7 +1690,7 @@ export type RecordNodeSchema<TName extends string = string, T extends ImplicitAl
|
|
|
1687
1690
|
|
|
1688
1691
|
// @alpha (undocumented)
|
|
1689
1692
|
export const RecordNodeSchema: {
|
|
1690
|
-
readonly [Symbol.hasInstance]: (value: TreeNodeSchema) => value is RecordNodeSchema
|
|
1693
|
+
readonly [Symbol.hasInstance]: (value: TreeNodeSchema) => value is RecordNodeSchema;
|
|
1691
1694
|
};
|
|
1692
1695
|
|
|
1693
1696
|
// @alpha @input
|
|
@@ -1813,27 +1816,59 @@ export interface SchemaCompatibilityStatus {
|
|
|
1813
1816
|
readonly isEquivalent: boolean;
|
|
1814
1817
|
}
|
|
1815
1818
|
|
|
1819
|
+
// @beta @sealed
|
|
1820
|
+
export interface SchemaCompatibilityStatusBeta extends SchemaCompatibilityStatus {
|
|
1821
|
+
readonly discrepancies: readonly SchemaDiscrepancy[] | undefined;
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
// @beta @sealed
|
|
1825
|
+
export type SchemaDiscrepancy = {
|
|
1826
|
+
readonly mismatch: "allowedTypes";
|
|
1827
|
+
readonly location: "root" | {
|
|
1828
|
+
readonly nodeType: string;
|
|
1829
|
+
readonly fieldKey: string | undefined;
|
|
1830
|
+
};
|
|
1831
|
+
readonly view: readonly string[];
|
|
1832
|
+
readonly stagedView?: readonly string[];
|
|
1833
|
+
readonly stored: readonly string[];
|
|
1834
|
+
readonly viewIsStagedOptional?: true;
|
|
1835
|
+
} | {
|
|
1836
|
+
readonly mismatch: "fieldKind";
|
|
1837
|
+
readonly location: "root" | {
|
|
1838
|
+
readonly nodeType: string;
|
|
1839
|
+
readonly fieldKey: string | undefined;
|
|
1840
|
+
};
|
|
1841
|
+
readonly view: string;
|
|
1842
|
+
readonly stored: string;
|
|
1843
|
+
readonly viewIsStagedOptional?: true;
|
|
1844
|
+
} | {
|
|
1845
|
+
readonly mismatch: "valueSchema";
|
|
1846
|
+
readonly nodeType: string;
|
|
1847
|
+
readonly view: string | undefined;
|
|
1848
|
+
readonly stored: string | undefined;
|
|
1849
|
+
} | {
|
|
1850
|
+
readonly mismatch: "nodeKind";
|
|
1851
|
+
readonly nodeType: string;
|
|
1852
|
+
readonly view: string;
|
|
1853
|
+
readonly stored: string;
|
|
1854
|
+
};
|
|
1855
|
+
|
|
1816
1856
|
// @public @sealed
|
|
1817
1857
|
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactory_base {
|
|
1818
1858
|
constructor(
|
|
1819
1859
|
scope: TScope);
|
|
1820
1860
|
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>;
|
|
1821
1861
|
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>;
|
|
1822
|
-
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
|
|
1862
|
+
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>, {
|
|
1823
1863
|
[Symbol.iterator](): Iterator<System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>;
|
|
1824
1864
|
}, false, T, undefined>;
|
|
1825
1865
|
protected getStructuralType(fullName: string, types: TreeNodeSchema | readonly TreeNodeSchema[], builder: () => TreeNodeSchema): TreeNodeSchema;
|
|
1826
1866
|
get identifier(): FieldSchema<FieldKind.Identifier, typeof SchemaFactory.string>;
|
|
1827
1867
|
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>;
|
|
1828
1868
|
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>;
|
|
1829
|
-
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
|
|
1830
|
-
[Symbol.iterator](): Iterator<[
|
|
1831
|
-
|
|
1832
|
-
System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>
|
|
1833
|
-
]>;
|
|
1834
|
-
} | {
|
|
1835
|
-
readonly [x: string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;
|
|
1836
|
-
}, false, T, undefined>;
|
|
1869
|
+
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>, {
|
|
1870
|
+
[Symbol.iterator](): Iterator<[string, System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>]>;
|
|
1871
|
+
} | { readonly [P in string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>; }, false, T, undefined>;
|
|
1837
1872
|
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>;
|
|
1838
1873
|
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>;
|
|
1839
1874
|
readonly scope: TScope;
|
|
@@ -1846,7 +1881,7 @@ export const SchemaFactory_base: SchemaStatics & (new () => SchemaStatics);
|
|
|
1846
1881
|
export class SchemaFactoryAlpha<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactoryBeta<TScope, TName> {
|
|
1847
1882
|
arrayAlpha<const Name extends TName, const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): ArrayNodeCustomizableSchemaAlpha<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
|
|
1848
1883
|
arrayRecursive<const Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): ArrayNodeCustomizableSchemaUnsafe<ScopedSchemaName<TScope, Name>, T, TCustomMetadata>;
|
|
1849
|
-
static readonly identifier: <const TCustomMetadata = unknown>(props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">
|
|
1884
|
+
static readonly identifier: <const TCustomMetadata = unknown>(props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">) => FieldSchemaAlpha<FieldKind.Identifier, StringSchema, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1850
1885
|
static readonly leaves: readonly [StringSchema, LeafSchema<"number", number> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"null", null> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"handle", IFluidHandle<unknown>> & SimpleLeafNodeSchema<SchemaType>];
|
|
1851
1886
|
readonly leaves: readonly [StringSchema, LeafSchema<"number", number> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"null", null> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"handle", IFluidHandle<unknown>> & SimpleLeafNodeSchema<SchemaType>];
|
|
1852
1887
|
mapAlpha<Name extends TName, const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): MapNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
|
|
@@ -1854,33 +1889,31 @@ export class SchemaFactoryAlpha<out TScope extends string | undefined = string |
|
|
|
1854
1889
|
objectAlpha<const Name extends TName, const T extends RestrictiveStringRecord<ImplicitFieldSchema>, const TCustomMetadata = unknown>(name: Name, fields: T, options?: ObjectSchemaOptionsAlpha<TCustomMetadata>): ObjectNodeSchemaWorkaround<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
|
|
1855
1890
|
objectRecursive<const Name extends TName, const T extends RestrictiveStringRecord<System_Unsafe.ImplicitFieldSchemaUnsafe>, const TCustomMetadata = unknown>(name: Name, t: T, options?: ObjectSchemaOptionsAlpha<TCustomMetadata>): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, System_Unsafe.TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>, object & System_Unsafe.InsertableObjectFromSchemaRecordUnsafe<T>, false, T, never, TCustomMetadata> & SimpleObjectNodeSchema<SchemaType.View, TCustomMetadata> & Pick<ObjectNodeSchema, "fields">;
|
|
1856
1891
|
objectRecursiveAlpha<const Name extends TName, const T extends RestrictiveStringRecord<System_Unsafe.ImplicitFieldSchemaUnsafe>, const TCustomMetadata = unknown>(name: Name, t: T, options?: ObjectSchemaOptionsAlpha<TCustomMetadata>): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, System_Unsafe.TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>, object & InsertableObjectFromSchemaRecordAlphaUnsafe<T>, false, T, never, TCustomMetadata> & SimpleObjectNodeSchema<SchemaType.View, TCustomMetadata> & Pick<ObjectNodeSchema, "fields">;
|
|
1857
|
-
static readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider">
|
|
1858
|
-
readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider">
|
|
1859
|
-
static readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider">
|
|
1860
|
-
readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider">
|
|
1892
|
+
static readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider">) => FieldSchemaAlpha<FieldKind.Optional, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1893
|
+
readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider">) => FieldSchemaAlpha<FieldKind.Optional, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1894
|
+
static readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider">) => FieldSchemaAlphaUnsafe<FieldKind.Optional, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1895
|
+
readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider">) => FieldSchemaAlphaUnsafe<FieldKind.Optional, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1861
1896
|
recordAlpha<const Name extends TName, const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): RecordNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
|
|
1862
|
-
recordRecursive<Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Record, TreeRecordNodeUnsafe<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Record,
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
static readonly
|
|
1866
|
-
readonly
|
|
1867
|
-
static readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlphaUnsafe<FieldKind.Required, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1868
|
-
readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlphaUnsafe<FieldKind.Required, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1897
|
+
recordRecursive<Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<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>;
|
|
1898
|
+
static readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider">) => FieldSchemaAlpha<FieldKind.Required, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1899
|
+
readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider">) => FieldSchemaAlpha<FieldKind.Required, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1900
|
+
static readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider">) => FieldSchemaAlphaUnsafe<FieldKind.Required, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1901
|
+
readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider">) => FieldSchemaAlphaUnsafe<FieldKind.Required, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1869
1902
|
scopedFactoryAlpha<const T extends TName, TNameInner extends number | string = string>(name: T): SchemaFactoryAlpha<ScopedSchemaName<TScope, T>, TNameInner>;
|
|
1870
|
-
readonly stagedOptional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "
|
|
1871
|
-
static readonly stagedOptional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "
|
|
1872
|
-
readonly stagedOptionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "
|
|
1873
|
-
static readonly stagedOptionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "
|
|
1874
|
-
readonly withDefault: <Kind extends FieldKind, Types extends ImplicitAllowedTypes, TCustomMetadata = unknown>(fieldSchema: FieldSchema<Kind, Types, TCustomMetadata>, defaultValue: NodeProvider<
|
|
1903
|
+
readonly stagedOptional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider" | "stagedOptionalUpgrade">) => FieldSchemaAlpha<FieldKind.Optional, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1904
|
+
static readonly stagedOptional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider" | "stagedOptionalUpgrade">) => FieldSchemaAlpha<FieldKind.Optional, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1905
|
+
readonly stagedOptionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider" | "stagedOptionalUpgrade">) => FieldSchemaAlphaUnsafe<FieldKind.Optional, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1906
|
+
static readonly stagedOptionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider" | "stagedOptionalUpgrade">) => FieldSchemaAlphaUnsafe<FieldKind.Optional, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1907
|
+
readonly withDefault: <Kind extends FieldKind, Types extends ImplicitAllowedTypes, TCustomMetadata = unknown>(fieldSchema: FieldSchema<Kind, Types, TCustomMetadata>, defaultValue: NodeProvider<InsertableTreeFieldFromImplicitField<FieldSchema<Kind, Types>>>) => FieldSchemaAlpha<Kind, Types, TCustomMetadata, FieldPropsAlpha<TCustomMetadata> & {
|
|
1875
1908
|
defaultProvider: DefaultProvider;
|
|
1876
1909
|
}>;
|
|
1877
|
-
static readonly withDefault: <Kind extends FieldKind, Types extends ImplicitAllowedTypes, TCustomMetadata = unknown>(fieldSchema: FieldSchema<Kind, Types, TCustomMetadata>, defaultValue: NodeProvider<
|
|
1910
|
+
static readonly withDefault: <Kind extends FieldKind, Types extends ImplicitAllowedTypes, TCustomMetadata = unknown>(fieldSchema: FieldSchema<Kind, Types, TCustomMetadata>, defaultValue: NodeProvider<InsertableTreeFieldFromImplicitField<FieldSchema<Kind, Types>>>) => FieldSchemaAlpha<Kind, Types, TCustomMetadata, FieldPropsAlpha<TCustomMetadata> & {
|
|
1878
1911
|
defaultProvider: DefaultProvider;
|
|
1879
1912
|
}>;
|
|
1880
|
-
readonly withDefaultRecursive: <Kind extends FieldKind, Types extends System_Unsafe.ImplicitAllowedTypesUnsafe, TCustomMetadata = unknown>(fieldSchema: System_Unsafe.FieldSchemaUnsafe<Kind, Types, TCustomMetadata>, defaultValue:
|
|
1913
|
+
readonly withDefaultRecursive: <Kind extends FieldKind, Types extends System_Unsafe.ImplicitAllowedTypesUnsafe, TCustomMetadata = unknown>(fieldSchema: System_Unsafe.FieldSchemaUnsafe<Kind, Types, TCustomMetadata>, defaultValue: Unenforced<NodeProvider<System_Unsafe.InsertableTreeFieldFromImplicitFieldUnsafe<System_Unsafe.FieldSchemaUnsafe<Kind, Types>>>>) => FieldSchemaAlphaUnsafe<Kind, Types, TCustomMetadata, FieldPropsAlpha<TCustomMetadata> & {
|
|
1881
1914
|
defaultProvider: DefaultProvider;
|
|
1882
1915
|
}>;
|
|
1883
|
-
static readonly withDefaultRecursive: <Kind extends FieldKind, Types extends System_Unsafe.ImplicitAllowedTypesUnsafe, TCustomMetadata = unknown>(fieldSchema: System_Unsafe.FieldSchemaUnsafe<Kind, Types, TCustomMetadata>, defaultValue:
|
|
1916
|
+
static readonly withDefaultRecursive: <Kind extends FieldKind, Types extends System_Unsafe.ImplicitAllowedTypesUnsafe, TCustomMetadata = unknown>(fieldSchema: System_Unsafe.FieldSchemaUnsafe<Kind, Types, TCustomMetadata>, defaultValue: Unenforced<NodeProvider<System_Unsafe.InsertableTreeFieldFromImplicitFieldUnsafe<System_Unsafe.FieldSchemaUnsafe<Kind, Types>>>>) => FieldSchemaAlphaUnsafe<Kind, Types, TCustomMetadata, FieldPropsAlpha<TCustomMetadata> & {
|
|
1884
1917
|
defaultProvider: DefaultProvider;
|
|
1885
1918
|
}>;
|
|
1886
1919
|
}
|
|
@@ -1892,20 +1925,21 @@ export class SchemaFactoryBeta<out TScope extends string | undefined = string |
|
|
|
1892
1925
|
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>;
|
|
1893
1926
|
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>;
|
|
1894
1927
|
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>;
|
|
1895
|
-
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,
|
|
1896
|
-
readonly [x: string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;
|
|
1897
|
-
}, false, T, undefined, TCustomMetadata>;
|
|
1928
|
+
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>;
|
|
1898
1929
|
scopedFactory<const T extends TName, TNameInner extends number | string = string>(name: T): SchemaFactoryBeta<ScopedSchemaName<TScope, T>, TNameInner>;
|
|
1899
1930
|
static staged: <const T extends LazyItem<TreeNodeSchema>>(t: T | AnnotatedAllowedType<T>) => AnnotatedAllowedType<T>;
|
|
1900
1931
|
staged: <const T extends LazyItem<TreeNodeSchema>>(t: T | AnnotatedAllowedType<T>) => AnnotatedAllowedType<T>;
|
|
1901
|
-
static stagedRecursive: <const T extends
|
|
1902
|
-
stagedRecursive: <const T extends
|
|
1903
|
-
static types: <const T extends readonly (
|
|
1904
|
-
types: <const T extends readonly (
|
|
1905
|
-
static typesRecursive: <const T extends readonly
|
|
1906
|
-
typesRecursive: <const T extends readonly
|
|
1932
|
+
static stagedRecursive: <const T extends Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>>(t: T) => AnnotatedAllowedTypeUnsafe<UnannotateAllowedTypeUnsafe<T>>;
|
|
1933
|
+
stagedRecursive: <const T extends Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>>(t: T) => AnnotatedAllowedTypeUnsafe<UnannotateAllowedTypeUnsafe<T>>;
|
|
1934
|
+
static types: <const T extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[]>(t: T, metadata?: AllowedTypesMetadata) => AllowedTypesFullFromMixed<T>;
|
|
1935
|
+
types: <const T extends readonly (AnnotatedAllowedType | LazyItem<TreeNodeSchema>)[]>(t: T, metadata?: AllowedTypesMetadata) => AllowedTypesFullFromMixed<T>;
|
|
1936
|
+
static typesRecursive: <const T extends readonly Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>[]>(t: T, metadata?: AllowedTypesMetadata) => AllowedTypesFullFromMixedUnsafe<T>;
|
|
1937
|
+
typesRecursive: <const T extends readonly Unenforced<AnnotatedAllowedType | LazyItem<TreeNodeSchema>>[]>(t: T, metadata?: AllowedTypesMetadata) => AllowedTypesFullFromMixedUnsafe<T>;
|
|
1907
1938
|
}
|
|
1908
1939
|
|
|
1940
|
+
// @public @system
|
|
1941
|
+
const schemaIdentifierBrand: unique symbol;
|
|
1942
|
+
|
|
1909
1943
|
// @public @sealed @system
|
|
1910
1944
|
export interface SchemaStatics {
|
|
1911
1945
|
readonly boolean: LeafSchema<"boolean", boolean>;
|
|
@@ -2129,6 +2163,10 @@ export interface SnapshotSchemaCompatibilityOptions {
|
|
|
2129
2163
|
readonly rejectVersionsWithNoSchemaChange?: true;
|
|
2130
2164
|
readonly schema: TreeViewConfiguration;
|
|
2131
2165
|
readonly snapshotDirectory: string;
|
|
2166
|
+
readonly snapshotFileNameFormat?: {
|
|
2167
|
+
readonly prefix?: string;
|
|
2168
|
+
readonly suffix?: string;
|
|
2169
|
+
};
|
|
2132
2170
|
readonly snapshotUnchangedVersions?: true;
|
|
2133
2171
|
readonly version: string;
|
|
2134
2172
|
readonly versionComparer?: (a: string, b: string) => number;
|
|
@@ -2136,6 +2174,7 @@ export interface SnapshotSchemaCompatibilityOptions {
|
|
|
2136
2174
|
|
|
2137
2175
|
// @alpha @input
|
|
2138
2176
|
export interface StagedSchemaUpgradePolicy {
|
|
2177
|
+
readonly includeAlreadyEnabledUpgrades?: boolean;
|
|
2139
2178
|
includeStaged(upgrade: SchemaUpgrade): boolean;
|
|
2140
2179
|
includeStagedOptional(upgrade: SchemaUpgrade): boolean;
|
|
2141
2180
|
}
|
|
@@ -2150,6 +2189,9 @@ export interface StagedSchemaUpgradePolicyFactory {
|
|
|
2150
2189
|
readonly restrictive: StagedSchemaUpgradePolicy;
|
|
2151
2190
|
}
|
|
2152
2191
|
|
|
2192
|
+
// @alpha
|
|
2193
|
+
export type StagedUpgradeStatus = "disabled" | "partial" | "enabled";
|
|
2194
|
+
|
|
2153
2195
|
// @alpha @sealed @system
|
|
2154
2196
|
export type StringSchema = LeafSchema<"string", string> & SimpleLeafNodeSchema;
|
|
2155
2197
|
|
|
@@ -2163,7 +2205,7 @@ export namespace System_TableSchema {
|
|
|
2163
2205
|
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 & {
|
|
2164
2206
|
readonly id?: string | undefined;
|
|
2165
2207
|
} & (FieldHasDefault<TPropsSchema> extends true ? {
|
|
2166
|
-
props?: InsertableTreeFieldFromImplicitField<TPropsSchema
|
|
2208
|
+
props?: InsertableTreeFieldFromImplicitField<TPropsSchema>;
|
|
2167
2209
|
} : {
|
|
2168
2210
|
props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
|
|
2169
2211
|
}), true, {
|
|
@@ -2177,7 +2219,7 @@ export namespace System_TableSchema {
|
|
|
2177
2219
|
readonly id?: string | undefined;
|
|
2178
2220
|
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>>;
|
|
2179
2221
|
} & (FieldHasDefault<TPropsSchema> extends true ? {
|
|
2180
|
-
props?: InsertableTreeFieldFromImplicitField<TPropsSchema
|
|
2222
|
+
props?: InsertableTreeFieldFromImplicitField<TPropsSchema>;
|
|
2181
2223
|
} : {
|
|
2182
2224
|
props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
|
|
2183
2225
|
}), true, {
|
|
@@ -2258,18 +2300,20 @@ export namespace System_Unsafe {
|
|
|
2258
2300
|
};
|
|
2259
2301
|
// @sealed @system
|
|
2260
2302
|
export interface ReadonlyMapInlined<K, T extends ImplicitAllowedTypesUnsafe> {
|
|
2261
|
-
[Symbol.iterator]():
|
|
2262
|
-
|
|
2303
|
+
[Symbol.iterator](): FluidIterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;
|
|
2304
|
+
// (undocumented)
|
|
2305
|
+
readonly [Symbol.toStringTag]: string;
|
|
2306
|
+
entries(): FluidIterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;
|
|
2263
2307
|
// (undocumented)
|
|
2264
|
-
forEach(callbackfn: (value: TreeNodeFromImplicitAllowedTypesUnsafe<T>, key: K, map:
|
|
2308
|
+
forEach(callbackfn: (value: TreeNodeFromImplicitAllowedTypesUnsafe<T>, key: K, map: FluidReadonlyMap<K, TreeNodeFromImplicitAllowedTypesUnsafe<T>>) => void, thisArg?: any): void;
|
|
2265
2309
|
// (undocumented)
|
|
2266
2310
|
get(key: K): TreeNodeFromImplicitAllowedTypesUnsafe<T> | undefined;
|
|
2267
2311
|
// (undocumented)
|
|
2268
2312
|
has(key: K): boolean;
|
|
2269
|
-
keys():
|
|
2313
|
+
keys(): FluidIterableIterator<K>;
|
|
2270
2314
|
// (undocumented)
|
|
2271
2315
|
readonly size: number;
|
|
2272
|
-
values():
|
|
2316
|
+
values(): FluidIterableIterator<TreeNodeFromImplicitAllowedTypesUnsafe<T>>;
|
|
2273
2317
|
}
|
|
2274
2318
|
// @sealed @system
|
|
2275
2319
|
export interface TreeArrayNodeUnsafe<TAllowedTypes extends ImplicitAllowedTypesUnsafe> extends TreeArrayNode<TAllowedTypes, TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>, InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>> {
|
|
@@ -2316,16 +2360,6 @@ export namespace TableSchema {
|
|
|
2316
2360
|
export function column<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateColumnOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
2317
2361
|
readonly props: TProps;
|
|
2318
2362
|
}): System_TableSchema.ColumnSchemaBase<TUserScope, TCell, TProps>;
|
|
2319
|
-
// @deprecated @input
|
|
2320
|
-
export interface InsertColumnsParameters<TColumn extends ImplicitAllowedTypes> {
|
|
2321
|
-
readonly columns: InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
2322
|
-
readonly index?: number | undefined;
|
|
2323
|
-
}
|
|
2324
|
-
// @deprecated @input
|
|
2325
|
-
export interface InsertRowsParameters<TRow extends ImplicitAllowedTypes> {
|
|
2326
|
-
readonly index?: number | undefined;
|
|
2327
|
-
readonly rows: InsertableTreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
2328
|
-
}
|
|
2329
2363
|
// @sealed
|
|
2330
2364
|
export interface Row<TCell extends ImplicitAllowedTypes, TProps extends ImplicitFieldSchema = ImplicitFieldSchema> {
|
|
2331
2365
|
readonly id: string;
|
|
@@ -2336,11 +2370,6 @@ export namespace TableSchema {
|
|
|
2336
2370
|
export function row<const TUserScope extends string, const TCell extends ImplicitAllowedTypes, const TProps extends ImplicitFieldSchema>(params: System_TableSchema.CreateRowOptionsBase<TUserScope, SchemaFactoryBeta<TUserScope>, TCell> & {
|
|
2337
2371
|
readonly props: TProps;
|
|
2338
2372
|
}): System_TableSchema.RowSchemaBase<TUserScope, TCell, TProps>;
|
|
2339
|
-
// @deprecated @input
|
|
2340
|
-
export interface SetCellParameters<TCell extends ImplicitAllowedTypes, TColumn extends ImplicitAllowedTypes, TRow extends ImplicitAllowedTypes> {
|
|
2341
|
-
readonly cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>;
|
|
2342
|
-
readonly key: CellKey<TColumn, TRow>;
|
|
2343
|
-
}
|
|
2344
2373
|
// @sealed
|
|
2345
2374
|
export interface Table<TUserScope extends string, TCell extends ImplicitAllowedTypes, TColumn extends System_TableSchema.ColumnSchemaBase<TUserScope, TCell>, TRow extends System_TableSchema.RowSchemaBase<TUserScope, TCell>> {
|
|
2346
2375
|
readonly columns: System_TableSchema.RearrangeableList<TColumn>;
|
|
@@ -2350,14 +2379,8 @@ export namespace TableSchema {
|
|
|
2350
2379
|
getRow(id: string): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
|
|
2351
2380
|
getRow(index: number): TreeNodeFromImplicitAllowedTypes<TRow> | undefined;
|
|
2352
2381
|
insertColumns(columns: readonly InsertableTreeNodeFromImplicitAllowedTypes<TColumn>[], index?: number): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
2353
|
-
// @deprecated
|
|
2354
|
-
insertColumns(params: InsertColumnsParameters<TColumn>): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
2355
2382
|
insertRows(rows: readonly InsertableTreeNodeFromImplicitAllowedTypes<TRow>[], index?: number): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
2356
|
-
// @deprecated
|
|
2357
|
-
insertRows(params: InsertRowsParameters<TRow>): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
2358
2383
|
removeCell(row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>, column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
2359
|
-
// @deprecated
|
|
2360
|
-
removeCell(key: CellKey<TColumn, TRow>): TreeNodeFromImplicitAllowedTypes<TCell> | undefined;
|
|
2361
2384
|
removeColumns(index?: number | undefined, count?: number | undefined): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
2362
2385
|
removeColumns(columns: readonly TreeNodeFromImplicitAllowedTypes<TColumn>[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
2363
2386
|
removeColumns(columns: readonly string[]): TreeNodeFromImplicitAllowedTypes<TColumn>[];
|
|
@@ -2366,8 +2389,6 @@ export namespace TableSchema {
|
|
|
2366
2389
|
removeRows(rows: readonly string[]): TreeNodeFromImplicitAllowedTypes<TRow>[];
|
|
2367
2390
|
readonly rows: System_TableSchema.RearrangeableList<TRow>;
|
|
2368
2391
|
setCell(row: string | number | TreeNodeFromImplicitAllowedTypes<TRow>, column: string | number | TreeNodeFromImplicitAllowedTypes<TColumn>, cell: InsertableTreeNodeFromImplicitAllowedTypes<TCell>): void;
|
|
2369
|
-
// @deprecated
|
|
2370
|
-
setCell(params: SetCellParameters<TCell, TColumn, TRow>): void;
|
|
2371
2392
|
}
|
|
2372
2393
|
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>>;
|
|
2373
2394
|
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> & {
|
|
@@ -2475,7 +2496,8 @@ export interface TreeAlpha {
|
|
|
2475
2496
|
importConcise<const TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema>(schema: UnsafeUnknownSchema extends TSchema ? ImplicitFieldSchema : TSchema & ImplicitFieldSchema, data: ConciseTree | undefined): Unhydrated<TSchema extends ImplicitFieldSchema ? TreeFieldFromImplicitField<TSchema> : TreeNode | TreeLeafValue | undefined>;
|
|
2476
2497
|
importVerbose<const TSchema extends ImplicitFieldSchema>(schema: TSchema, data: VerboseTree | undefined, options?: TreeParsingOptions): Unhydrated<TreeFieldFromImplicitField<TSchema>>;
|
|
2477
2498
|
key2(node: TreeNode): string | number | undefined;
|
|
2478
|
-
|
|
2499
|
+
// @deprecated
|
|
2500
|
+
on<K extends keyof TreeChangeEventsBeta<TNode>, TNode extends TreeNode>(node: TNode, eventName: K, listener: NoInfer<TreeChangeEventsBeta<TNode>[K]>): () => void;
|
|
2479
2501
|
tagContentSchema<TSchema extends TreeNodeSchema, TContent extends InsertableField<TSchema>>(schema: TSchema, content: TContent): TContent;
|
|
2480
2502
|
trackObservations<TResult>(onInvalidation: () => void, trackDuring: () => TResult): ObservationResults<TResult>;
|
|
2481
2503
|
trackObservationsOnce<TResult>(onInvalidation: () => void, trackDuring: () => TResult): ObservationResults<TResult>;
|
|
@@ -2504,7 +2526,7 @@ export interface TreeArrayNode<TAllowedTypes extends System_Unsafe.ImplicitAllow
|
|
|
2504
2526
|
push(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;
|
|
2505
2527
|
removeAt(index: number): void;
|
|
2506
2528
|
removeRange(start?: number, end?: number): void;
|
|
2507
|
-
values():
|
|
2529
|
+
values(): FluidIterableIterator<T>;
|
|
2508
2530
|
}
|
|
2509
2531
|
|
|
2510
2532
|
// @public
|
|
@@ -2527,6 +2549,7 @@ export interface TreeArrayNodeAlpha<TAllowedTypes extends System_Unsafe.Implicit
|
|
|
2527
2549
|
// @beta @sealed
|
|
2528
2550
|
export interface TreeBeta {
|
|
2529
2551
|
clone<const TSchema extends ImplicitFieldSchema>(node: TreeFieldFromImplicitField<TSchema>): TreeFieldFromImplicitField<TSchema>;
|
|
2552
|
+
context(node: TreeNode): TreeContextBeta;
|
|
2530
2553
|
create<const TSchema extends ImplicitFieldSchema>(schema: TSchema, data: InsertableTreeFieldFromImplicitField<TSchema>): Unhydrated<TreeFieldFromImplicitField<TSchema>>;
|
|
2531
2554
|
exportConcise(node: TreeNode | TreeLeafValue, options?: TreeEncodingOptions): ConciseTree;
|
|
2532
2555
|
exportConcise(node: TreeNode | TreeLeafValue | undefined, options?: TreeEncodingOptions): ConciseTree | undefined;
|
|
@@ -2565,18 +2588,13 @@ export interface TreeBranchHistory {
|
|
|
2565
2588
|
// @public @sealed
|
|
2566
2589
|
export interface TreeChangeEvents {
|
|
2567
2590
|
nodeChanged(unstable?: unknown): void;
|
|
2568
|
-
treeChanged(): void;
|
|
2569
|
-
}
|
|
2570
|
-
|
|
2571
|
-
// @alpha @sealed
|
|
2572
|
-
export interface TreeChangeEventsAlpha<TNode extends TreeNode = TreeNode> extends TreeChangeEvents {
|
|
2573
|
-
nodeChanged: (data: NodeChangedDataAlpha<TNode>) => void;
|
|
2574
|
-
treeChanged: TNode extends WithType<string, NodeKind.Array> ? (data: NodeChangedDataTreeDelta) => void : TreeChangeEventsBeta<TNode>["treeChanged"];
|
|
2591
|
+
treeChanged(unstable?: unknown): void;
|
|
2575
2592
|
}
|
|
2576
2593
|
|
|
2577
2594
|
// @beta @sealed
|
|
2578
|
-
export interface TreeChangeEventsBeta<TNode extends TreeNode = TreeNode> extends TreeChangeEvents {
|
|
2579
|
-
nodeChanged: (data:
|
|
2595
|
+
export interface TreeChangeEventsBeta<TNode extends TreeNode = TreeNode> extends Omit<TreeChangeEvents, "nodeChanged" | "treeChanged"> {
|
|
2596
|
+
nodeChanged: (data: TNode extends WithType<string, NodeKind.Array> ? NodeChangedDataDelta : TNode extends WithType<string, NodeKind.Map | NodeKind.Object | NodeKind.Record> ? NodeChangedDataProperties<TNode> : NodeChangedData<TNode>) => void;
|
|
2597
|
+
treeChanged: TNode extends WithType<string, NodeKind.Array> ? (data: NodeChangedDataTreeDelta) => void : TreeChangeEvents["treeChanged"];
|
|
2580
2598
|
}
|
|
2581
2599
|
|
|
2582
2600
|
// @alpha
|
|
@@ -2586,17 +2604,30 @@ export enum TreeCompressionStrategy {
|
|
|
2586
2604
|
Uncompressed = 1
|
|
2587
2605
|
}
|
|
2588
2606
|
|
|
2589
|
-
// @alpha
|
|
2590
|
-
export interface TreeContextAlpha {
|
|
2607
|
+
// @alpha @sealed
|
|
2608
|
+
export interface TreeContextAlpha extends TreeContextBeta {
|
|
2591
2609
|
// @deprecated
|
|
2592
2610
|
isBranch(): this is UntypedTreeViewAlpha;
|
|
2593
2611
|
isView(): this is UntypedTreeViewAlpha;
|
|
2612
|
+
// (undocumented)
|
|
2594
2613
|
runTransaction<TValue>(transaction: () => WithValue<TValue>, params?: RunTransactionParamsAlpha): TransactionValueResult<TValue, TValue>;
|
|
2614
|
+
// (undocumented)
|
|
2595
2615
|
runTransaction(transaction: () => void, params?: RunTransactionParamsAlpha): TransactionVoidResult;
|
|
2616
|
+
// (undocumented)
|
|
2596
2617
|
runTransactionAsync<TValue>(transaction: () => Promise<WithValue<TValue>>, params?: RunTransactionParamsAlpha): Promise<TransactionValueResult<TValue, TValue>>;
|
|
2618
|
+
// (undocumented)
|
|
2597
2619
|
runTransactionAsync(transaction: () => Promise<void>, params?: RunTransactionParamsAlpha): Promise<TransactionVoidResult>;
|
|
2598
2620
|
}
|
|
2599
2621
|
|
|
2622
|
+
// @beta @sealed
|
|
2623
|
+
export interface TreeContextBeta {
|
|
2624
|
+
isView(): this is UntypedTreeView;
|
|
2625
|
+
runTransaction<TValue>(transaction: () => WithValue<TValue>, params?: RunTransactionParamsBeta): TransactionValueResult<TValue, TValue>;
|
|
2626
|
+
runTransaction(transaction: () => void, params?: RunTransactionParamsBeta): TransactionVoidResult;
|
|
2627
|
+
runTransactionAsync<TValue>(transaction: () => Promise<WithValue<TValue>>, params?: RunTransactionParamsBeta): Promise<TransactionValueResult<TValue, TValue>>;
|
|
2628
|
+
runTransactionAsync(transaction: () => Promise<void>, params?: RunTransactionParamsBeta): Promise<TransactionVoidResult>;
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2600
2631
|
// @alpha @input
|
|
2601
2632
|
export interface TreeDataStoreOptions<TSchema extends ImplicitFieldSchema> extends Pick<DataStoreOptions<never, never>, "type"> {
|
|
2602
2633
|
readonly config: TreeViewConfiguration<TSchema>;
|
|
@@ -2638,13 +2669,13 @@ export type TreeIndexNodes<TNode> = readonly [first: TNode, ...rest: TNode[]];
|
|
|
2638
2669
|
export type TreeLeafValue = number | string | boolean | IFluidHandle | null;
|
|
2639
2670
|
|
|
2640
2671
|
// @public @sealed
|
|
2641
|
-
export interface TreeMapNode<T extends ImplicitAllowedTypes = ImplicitAllowedTypes> extends
|
|
2672
|
+
export interface TreeMapNode<T extends ImplicitAllowedTypes = ImplicitAllowedTypes> extends FluidReadonlyMap<string, TreeNodeFromImplicitAllowedTypes<T>>, TreeNode {
|
|
2642
2673
|
delete(key: string): void;
|
|
2643
|
-
entries():
|
|
2644
|
-
forEach(callbackfn: (value: TreeNodeFromImplicitAllowedTypes<T>, key: string, map:
|
|
2645
|
-
keys():
|
|
2674
|
+
entries(): FluidIterableIterator<[string, TreeNodeFromImplicitAllowedTypes<T>]>;
|
|
2675
|
+
forEach(callbackfn: (value: TreeNodeFromImplicitAllowedTypes<T>, key: string, map: FluidReadonlyMap<string, TreeNodeFromImplicitAllowedTypes<T>>) => void, thisArg?: any): void;
|
|
2676
|
+
keys(): FluidIterableIterator<string>;
|
|
2646
2677
|
set(key: string, value: InsertableTreeNodeFromImplicitAllowedTypes<T> | undefined): void;
|
|
2647
|
-
values():
|
|
2678
|
+
values(): FluidIterableIterator<TreeNodeFromImplicitAllowedTypes<T>>;
|
|
2648
2679
|
}
|
|
2649
2680
|
|
|
2650
2681
|
// @alpha @sealed
|
|
@@ -2656,10 +2687,9 @@ export interface TreeMapNodeAlpha<T extends ImplicitAllowedTypes = ImplicitAllow
|
|
|
2656
2687
|
|
|
2657
2688
|
// @public @sealed
|
|
2658
2689
|
export abstract class TreeNode implements WithType {
|
|
2690
|
+
abstract get [schemaIdentifierBrand](): string;
|
|
2659
2691
|
static [Symbol.hasInstance](value: unknown): value is TreeNode;
|
|
2660
2692
|
static [Symbol.hasInstance]<TSchema extends abstract new (...args: any[]) => TreeNode>(this: TSchema, value: unknown): value is InstanceType<TSchema>;
|
|
2661
|
-
// @deprecated
|
|
2662
|
-
abstract get [typeNameSymbol](): string;
|
|
2663
2693
|
abstract get [typeSchemaSymbol](): TreeNodeSchemaClass;
|
|
2664
2694
|
protected constructor(token: unknown);
|
|
2665
2695
|
}
|
|
@@ -2714,7 +2744,7 @@ export type TreeParsingOptions = TreeEncodingOptions<KeyEncodingOptions.usePrope
|
|
|
2714
2744
|
|
|
2715
2745
|
// @beta
|
|
2716
2746
|
export interface TreeRecordNode<TAllowedTypes extends ImplicitAllowedTypes = ImplicitAllowedTypes> extends TreeNode, Record<string, TreeNodeFromImplicitAllowedTypes<TAllowedTypes>> {
|
|
2717
|
-
[Symbol.iterator]():
|
|
2747
|
+
[Symbol.iterator](): FluidIterableIterator<[
|
|
2718
2748
|
string,
|
|
2719
2749
|
TreeNodeFromImplicitAllowedTypes<TAllowedTypes>
|
|
2720
2750
|
]>;
|
|
@@ -2723,7 +2753,7 @@ export interface TreeRecordNode<TAllowedTypes extends ImplicitAllowedTypes = Imp
|
|
|
2723
2753
|
// @beta @sealed @system
|
|
2724
2754
|
export interface TreeRecordNodeUnsafe<TAllowedTypes extends System_Unsafe.ImplicitAllowedTypesUnsafe> extends Record<string, System_Unsafe.TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>>, TreeNode {
|
|
2725
2755
|
// (undocumented)
|
|
2726
|
-
[Symbol.iterator]():
|
|
2756
|
+
[Symbol.iterator](): FluidIterableIterator<[
|
|
2727
2757
|
string,
|
|
2728
2758
|
System_Unsafe.TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>
|
|
2729
2759
|
]>;
|
|
@@ -2760,12 +2790,13 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
|
|
|
2760
2790
|
}
|
|
2761
2791
|
|
|
2762
2792
|
// @alpha @sealed
|
|
2763
|
-
export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeViewBeta<ReadSchema<TSchema>>, "root" | "initialize" | "fork" | "runTransaction" | "runTransactionAsync">, UntypedTreeViewAlpha {
|
|
2793
|
+
export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeViewBeta<ReadSchema<TSchema>>, "root" | "initialize" | "fork" | "runTransaction" | "runTransactionAsync" | "isView">, UntypedTreeViewAlpha {
|
|
2764
2794
|
// (undocumented)
|
|
2765
2795
|
readonly events: Listenable<TreeViewEvents & TreeBranchEvents>;
|
|
2766
2796
|
// (undocumented)
|
|
2767
2797
|
fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewAlpha<TSchema>;
|
|
2768
2798
|
initialize(content: InsertableField<TSchema>): void;
|
|
2799
|
+
isStagedUpgradeEnabled(upgrade: SchemaUpgrade): StagedUpgradeStatus;
|
|
2769
2800
|
// (undocumented)
|
|
2770
2801
|
get root(): ReadableField<TSchema>;
|
|
2771
2802
|
set root(newRoot: InsertableField<TSchema>);
|
|
@@ -2773,10 +2804,9 @@ export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | Unsa
|
|
|
2773
2804
|
|
|
2774
2805
|
// @beta @sealed
|
|
2775
2806
|
export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, UntypedTreeView {
|
|
2807
|
+
readonly compatibility: SchemaCompatibilityStatusBeta;
|
|
2776
2808
|
// (undocumented)
|
|
2777
2809
|
fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewBeta<TSchema>;
|
|
2778
|
-
runTransaction<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => TOut, params?: RunTransactionParamsBeta): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult;
|
|
2779
|
-
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>;
|
|
2780
2810
|
}
|
|
2781
2811
|
|
|
2782
2812
|
// @public @sealed
|
|
@@ -2806,9 +2836,6 @@ export interface TreeViewEvents {
|
|
|
2806
2836
|
schemaChanged(): void;
|
|
2807
2837
|
}
|
|
2808
2838
|
|
|
2809
|
-
// @public @deprecated @system
|
|
2810
|
-
const typeNameSymbol: unique symbol;
|
|
2811
|
-
|
|
2812
2839
|
// @public @system
|
|
2813
2840
|
export const typeSchemaSymbol: unique symbol;
|
|
2814
2841
|
|
|
@@ -2846,15 +2873,25 @@ export const UnsafeUnknownSchema: unique symbol;
|
|
|
2846
2873
|
export type UnsafeUnknownSchema = typeof UnsafeUnknownSchema;
|
|
2847
2874
|
|
|
2848
2875
|
// @beta @sealed
|
|
2849
|
-
export interface UntypedTreeView extends IDisposable {
|
|
2876
|
+
export interface UntypedTreeView extends IDisposable, TreeContextBeta {
|
|
2850
2877
|
dispose(error?: Error): void;
|
|
2851
2878
|
fork(): UntypedTreeView;
|
|
2852
2879
|
merge(view: UntypedTreeView, disposeMerged?: boolean): void;
|
|
2853
2880
|
rebaseOnto(view: UntypedTreeView): void;
|
|
2881
|
+
// (undocumented)
|
|
2882
|
+
runTransaction<TValue>(transaction: () => WithValue<TValue>, params?: RunTransactionParamsBeta): TransactionValueResult<TValue, TValue>;
|
|
2883
|
+
// (undocumented)
|
|
2884
|
+
runTransaction(transaction: () => void, params?: RunTransactionParamsBeta): TransactionVoidResult;
|
|
2885
|
+
runTransaction<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => TOut, params?: RunTransactionParamsBeta): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult;
|
|
2886
|
+
// (undocumented)
|
|
2887
|
+
runTransactionAsync<TValue>(transaction: () => Promise<WithValue<TValue>>, params?: RunTransactionParamsBeta): Promise<TransactionValueResult<TValue, TValue>>;
|
|
2888
|
+
// (undocumented)
|
|
2889
|
+
runTransactionAsync(transaction: () => Promise<void>, params?: RunTransactionParamsBeta): Promise<TransactionVoidResult>;
|
|
2890
|
+
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>;
|
|
2854
2891
|
}
|
|
2855
2892
|
|
|
2856
2893
|
// @alpha @sealed
|
|
2857
|
-
export interface UntypedTreeViewAlpha extends UntypedTreeView, TreeContextAlpha {
|
|
2894
|
+
export interface UntypedTreeViewAlpha extends Omit<UntypedTreeView, "runTransaction" | "runTransactionAsync" | "isView">, TreeContextAlpha {
|
|
2858
2895
|
applyChange(change: JsonCompatibleReadOnly): void;
|
|
2859
2896
|
readonly branchHistory: TreeBranchHistory;
|
|
2860
2897
|
computeNetChangeIfRebasedOnto(view: UntypedTreeView): JsonCompatibleReadOnly | undefined;
|
|
@@ -2871,6 +2908,9 @@ export interface UntypedTreeViewAlpha extends UntypedTreeView, TreeContextAlpha
|
|
|
2871
2908
|
runTransactionAsync(transaction: () => Promise<VoidTransactionCallbackStatusAlpha | void>, params?: RunTransactionParamsAlpha): Promise<TransactionVoidResult>;
|
|
2872
2909
|
}
|
|
2873
2910
|
|
|
2911
|
+
// @alpha
|
|
2912
|
+
export function utf16LengthForCodePoints(value: string, start: number, count: number): number;
|
|
2913
|
+
|
|
2874
2914
|
// @public
|
|
2875
2915
|
export type ValidateRecursiveSchema<T extends ValidateRecursiveSchemaTemplate<T>> = true;
|
|
2876
2916
|
|
|
@@ -2936,8 +2976,7 @@ export type VoidTransactionCallbackStatusBeta = Omit<TransactionCallbackStatusBe
|
|
|
2936
2976
|
|
|
2937
2977
|
// @public @sealed
|
|
2938
2978
|
export interface WithType<out TName extends string = string, out TKind extends NodeKind = NodeKind, out TInfo = unknown> {
|
|
2939
|
-
|
|
2940
|
-
get [typeNameSymbol](): TName;
|
|
2979
|
+
get [schemaIdentifierBrand](): TName;
|
|
2941
2980
|
get [typeSchemaSymbol](): TreeNodeSchemaClass<TName, TKind, TreeNode, never, boolean, TInfo>;
|
|
2942
2981
|
}
|
|
2943
2982
|
|