@fluidframework/tree 2.61.0-355054 → 2.61.0-355516
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/alpha.d.ts +1 -1
- package/api-report/tree.alpha.api.md +10 -27
- package/api-report/tree.beta.api.md +5 -22
- package/api-report/tree.legacy.beta.api.md +5 -22
- package/api-report/tree.legacy.public.api.md +4 -21
- package/api-report/tree.public.api.md +4 -21
- package/beta.d.ts +1 -1
- package/dist/alpha.d.ts +1 -0
- package/dist/beta.d.ts +1 -0
- package/dist/core/tree/anchorSet.d.ts +3 -3
- package/dist/core/tree/anchorSet.d.ts.map +1 -1
- package/dist/core/tree/anchorSet.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +1 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/public.d.ts +1 -0
- package/dist/simple-tree/api/index.d.ts +1 -1
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +11 -83
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +26 -82
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +1 -1
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +2 -1
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts +12 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +188 -43
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts +4 -3
- package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/dist/simple-tree/core/unhydratedFlexTree.js +22 -6
- package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/dist/simple-tree/index.d.ts +2 -2
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +3 -2
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/node-kinds/array/arrayNode.js +13 -6
- package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +15 -10
- package/dist/tableSchema.js.map +1 -1
- package/internal.d.ts +1 -1
- package/legacy.d.ts +1 -1
- package/lib/alpha.d.ts +1 -0
- package/lib/beta.d.ts +1 -0
- package/lib/core/tree/anchorSet.d.ts +3 -3
- package/lib/core/tree/anchorSet.d.ts.map +1 -1
- package/lib/core/tree/anchorSet.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +1 -0
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/public.d.ts +1 -0
- package/lib/simple-tree/api/index.d.ts +1 -1
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +11 -83
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +25 -81
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +1 -1
- package/lib/simple-tree/core/index.d.ts.map +1 -1
- package/lib/simple-tree/core/index.js +1 -1
- package/lib/simple-tree/core/index.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts +12 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +187 -43
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts +4 -3
- package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
- package/lib/simple-tree/core/unhydratedFlexTree.js +22 -6
- package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
- package/lib/simple-tree/index.d.ts +2 -2
- package/lib/simple-tree/index.d.ts.map +1 -1
- package/lib/simple-tree/index.js +1 -1
- package/lib/simple-tree/index.js.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/node-kinds/array/arrayNode.js +14 -7
- package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +16 -11
- package/lib/tableSchema.js.map +1 -1
- package/package.json +22 -22
- package/src/core/tree/anchorSet.ts +2 -2
- package/src/index.ts +1 -0
- package/src/packageVersion.ts +1 -1
- package/src/simple-tree/api/index.ts +1 -0
- package/src/simple-tree/api/schemaFactory.ts +31 -103
- package/src/simple-tree/core/index.ts +1 -0
- package/src/simple-tree/core/treeNodeKernel.ts +242 -44
- package/src/simple-tree/core/unhydratedFlexTree.ts +26 -3
- package/src/simple-tree/index.ts +2 -0
- package/src/simple-tree/node-kinds/array/arrayNode.ts +19 -11
- package/src/tableSchema.ts +15 -9
package/alpha.d.ts
CHANGED
|
@@ -258,7 +258,7 @@ export interface ForestOptions {
|
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
// @beta @sealed
|
|
261
|
-
export interface ForestType extends
|
|
261
|
+
export interface ForestType extends ErasedType<"ForestType"> {
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
// @alpha
|
|
@@ -271,7 +271,7 @@ export const ForestTypeOptimized: ForestType;
|
|
|
271
271
|
export const ForestTypeReference: ForestType;
|
|
272
272
|
|
|
273
273
|
// @alpha @sealed
|
|
274
|
-
export interface FormatValidator extends
|
|
274
|
+
export interface FormatValidator extends ErasedType<"FormatValidator"> {
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
// @alpha
|
|
@@ -323,7 +323,7 @@ export function independentInitializedView<const TSchema extends ImplicitFieldSc
|
|
|
323
323
|
|
|
324
324
|
// @alpha
|
|
325
325
|
export function independentView<const TSchema extends ImplicitFieldSchema>(config: TreeViewConfiguration<TSchema>, options: ForestOptions & {
|
|
326
|
-
idCompressor?:
|
|
326
|
+
idCompressor?: IIdCompressor | undefined;
|
|
327
327
|
}): TreeViewAlpha<TSchema>;
|
|
328
328
|
|
|
329
329
|
// @public @system
|
|
@@ -780,7 +780,7 @@ export interface SchemaCompatibilityStatus {
|
|
|
780
780
|
}
|
|
781
781
|
|
|
782
782
|
// @public @sealed
|
|
783
|
-
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string>
|
|
783
|
+
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactory_base {
|
|
784
784
|
constructor(
|
|
785
785
|
scope: TScope);
|
|
786
786
|
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>;
|
|
@@ -788,14 +788,8 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
|
|
|
788
788
|
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, unknown>, {
|
|
789
789
|
[Symbol.iterator](): Iterator<System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>;
|
|
790
790
|
}, false, T, undefined>;
|
|
791
|
-
readonly boolean: LeafSchema<"boolean", boolean>;
|
|
792
|
-
static readonly boolean: LeafSchema<"boolean", boolean>;
|
|
793
791
|
protected getStructuralType(fullName: string, types: TreeNodeSchema | readonly TreeNodeSchema[], builder: () => TreeNodeSchema): TreeNodeSchema;
|
|
794
|
-
readonly handle: LeafSchema<"handle", IFluidHandle<unknown>>;
|
|
795
|
-
static readonly handle: LeafSchema<"handle", IFluidHandle<unknown>>;
|
|
796
792
|
get identifier(): FieldSchema<FieldKind.Identifier, typeof SchemaFactory.string>;
|
|
797
|
-
readonly leaves: readonly [LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
|
|
798
|
-
static readonly leaves: readonly [LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
|
|
799
793
|
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>;
|
|
800
794
|
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>;
|
|
801
795
|
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, unknown>, {
|
|
@@ -806,32 +800,21 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
|
|
|
806
800
|
} | {
|
|
807
801
|
readonly [x: string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;
|
|
808
802
|
}, false, T, undefined>;
|
|
809
|
-
readonly null: LeafSchema<"null", null>;
|
|
810
|
-
static readonly null: LeafSchema<"null", null>;
|
|
811
|
-
readonly number: LeafSchema<"number", number>;
|
|
812
|
-
static readonly number: LeafSchema<"number", number>;
|
|
813
803
|
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>;
|
|
814
804
|
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>;
|
|
815
|
-
readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
|
|
816
|
-
static readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
|
|
817
|
-
readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
|
|
818
|
-
static readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
|
|
819
|
-
readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
|
|
820
|
-
static readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
|
|
821
|
-
readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
|
|
822
|
-
static readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
|
|
823
805
|
readonly scope: TScope;
|
|
824
|
-
readonly string: LeafSchema<"string", string>;
|
|
825
|
-
static readonly string: LeafSchema<"string", string>;
|
|
826
806
|
}
|
|
827
807
|
|
|
808
|
+
// @public @system
|
|
809
|
+
export const SchemaFactory_base: SchemaStatics & (new () => SchemaStatics);
|
|
810
|
+
|
|
828
811
|
// @alpha
|
|
829
812
|
export class SchemaFactoryAlpha<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactoryBeta<TScope, TName> {
|
|
830
813
|
arrayAlpha<const Name extends TName, const T extends ImplicitAnnotatedAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): ArrayNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
|
|
831
814
|
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>;
|
|
832
815
|
static readonly identifier: <const TCustomMetadata = unknown>(props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlpha<FieldKind.Identifier, LeafSchema<"string", string> & SimpleLeafNodeSchema, TCustomMetadata>;
|
|
833
|
-
static readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema, LeafSchema<"number", number> & SimpleLeafNodeSchema, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema, LeafSchema<"null", null> & SimpleLeafNodeSchema, LeafSchema<"handle",
|
|
834
|
-
readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema, LeafSchema<"number", number> & SimpleLeafNodeSchema, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema, LeafSchema<"null", null> & SimpleLeafNodeSchema, LeafSchema<"handle",
|
|
816
|
+
static readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema, LeafSchema<"number", number> & SimpleLeafNodeSchema, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema, LeafSchema<"null", null> & SimpleLeafNodeSchema, LeafSchema<"handle", IFluidHandle_2<unknown>> & SimpleLeafNodeSchema];
|
|
817
|
+
readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema, LeafSchema<"number", number> & SimpleLeafNodeSchema, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema, LeafSchema<"null", null> & SimpleLeafNodeSchema, LeafSchema<"handle", IFluidHandle_2<unknown>> & SimpleLeafNodeSchema];
|
|
835
818
|
mapAlpha<Name extends TName, const T extends ImplicitAnnotatedAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): MapNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
|
|
836
819
|
mapRecursive<Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): MapNodeCustomizableSchemaUnsafe<ScopedSchemaName<TScope, Name>, T, TCustomMetadata>;
|
|
837
820
|
objectAlpha<const Name extends TName, const T extends RestrictiveStringRecord<ImplicitAnnotatedFieldSchema>, const TCustomMetadata = unknown>(name: Name, fields: T, options?: SchemaFactoryObjectOptions<TCustomMetadata>): ObjectNodeSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata> & {
|
|
@@ -1662,7 +1645,7 @@ export interface ViewableTree {
|
|
|
1662
1645
|
|
|
1663
1646
|
// @alpha
|
|
1664
1647
|
export interface ViewContent {
|
|
1665
|
-
readonly idCompressor:
|
|
1648
|
+
readonly idCompressor: IIdCompressor;
|
|
1666
1649
|
readonly schema: JsonCompatible;
|
|
1667
1650
|
readonly tree: JsonCompatible<IFluidHandle>;
|
|
1668
1651
|
}
|
|
@@ -118,7 +118,7 @@ export interface ForestOptions {
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
// @beta @sealed
|
|
121
|
-
export interface ForestType extends
|
|
121
|
+
export interface ForestType extends ErasedType<"ForestType"> {
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
// @public
|
|
@@ -339,7 +339,7 @@ export interface SchemaCompatibilityStatus {
|
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
// @public @sealed
|
|
342
|
-
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string>
|
|
342
|
+
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactory_base {
|
|
343
343
|
constructor(
|
|
344
344
|
scope: TScope);
|
|
345
345
|
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>;
|
|
@@ -347,14 +347,8 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
|
|
|
347
347
|
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, unknown>, {
|
|
348
348
|
[Symbol.iterator](): Iterator<System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>;
|
|
349
349
|
}, false, T, undefined>;
|
|
350
|
-
readonly boolean: LeafSchema<"boolean", boolean>;
|
|
351
|
-
static readonly boolean: LeafSchema<"boolean", boolean>;
|
|
352
350
|
protected getStructuralType(fullName: string, types: TreeNodeSchema | readonly TreeNodeSchema[], builder: () => TreeNodeSchema): TreeNodeSchema;
|
|
353
|
-
readonly handle: LeafSchema<"handle", IFluidHandle<unknown>>;
|
|
354
|
-
static readonly handle: LeafSchema<"handle", IFluidHandle<unknown>>;
|
|
355
351
|
get identifier(): FieldSchema<FieldKind.Identifier, typeof SchemaFactory.string>;
|
|
356
|
-
readonly leaves: readonly [LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
|
|
357
|
-
static readonly leaves: readonly [LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
|
|
358
352
|
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>;
|
|
359
353
|
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>;
|
|
360
354
|
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, unknown>, {
|
|
@@ -365,25 +359,14 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
|
|
|
365
359
|
} | {
|
|
366
360
|
readonly [x: string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;
|
|
367
361
|
}, false, T, undefined>;
|
|
368
|
-
readonly null: LeafSchema<"null", null>;
|
|
369
|
-
static readonly null: LeafSchema<"null", null>;
|
|
370
|
-
readonly number: LeafSchema<"number", number>;
|
|
371
|
-
static readonly number: LeafSchema<"number", number>;
|
|
372
362
|
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>;
|
|
373
363
|
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>;
|
|
374
|
-
readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
|
|
375
|
-
static readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
|
|
376
|
-
readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
|
|
377
|
-
static readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
|
|
378
|
-
readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
|
|
379
|
-
static readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
|
|
380
|
-
readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
|
|
381
|
-
static readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
|
|
382
364
|
readonly scope: TScope;
|
|
383
|
-
readonly string: LeafSchema<"string", string>;
|
|
384
|
-
static readonly string: LeafSchema<"string", string>;
|
|
385
365
|
}
|
|
386
366
|
|
|
367
|
+
// @public @system
|
|
368
|
+
export const SchemaFactory_base: SchemaStatics & (new () => SchemaStatics);
|
|
369
|
+
|
|
387
370
|
// @beta
|
|
388
371
|
export class SchemaFactoryBeta<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactory<TScope, TName> {
|
|
389
372
|
scopedFactory<const T extends TName, TNameInner extends number | string = string>(name: T): SchemaFactoryBeta<ScopedSchemaName<TScope, T>, TNameInner>;
|
|
@@ -118,7 +118,7 @@ export interface ForestOptions {
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
// @beta @sealed
|
|
121
|
-
export interface ForestType extends
|
|
121
|
+
export interface ForestType extends ErasedType<"ForestType"> {
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
// @public
|
|
@@ -339,7 +339,7 @@ export interface SchemaCompatibilityStatus {
|
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
// @public @sealed
|
|
342
|
-
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string>
|
|
342
|
+
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactory_base {
|
|
343
343
|
constructor(
|
|
344
344
|
scope: TScope);
|
|
345
345
|
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>;
|
|
@@ -347,14 +347,8 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
|
|
|
347
347
|
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, unknown>, {
|
|
348
348
|
[Symbol.iterator](): Iterator<System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>;
|
|
349
349
|
}, false, T, undefined>;
|
|
350
|
-
readonly boolean: LeafSchema<"boolean", boolean>;
|
|
351
|
-
static readonly boolean: LeafSchema<"boolean", boolean>;
|
|
352
350
|
protected getStructuralType(fullName: string, types: TreeNodeSchema | readonly TreeNodeSchema[], builder: () => TreeNodeSchema): TreeNodeSchema;
|
|
353
|
-
readonly handle: LeafSchema<"handle", IFluidHandle<unknown>>;
|
|
354
|
-
static readonly handle: LeafSchema<"handle", IFluidHandle<unknown>>;
|
|
355
351
|
get identifier(): FieldSchema<FieldKind.Identifier, typeof SchemaFactory.string>;
|
|
356
|
-
readonly leaves: readonly [LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
|
|
357
|
-
static readonly leaves: readonly [LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
|
|
358
352
|
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>;
|
|
359
353
|
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>;
|
|
360
354
|
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, unknown>, {
|
|
@@ -365,25 +359,14 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
|
|
|
365
359
|
} | {
|
|
366
360
|
readonly [x: string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;
|
|
367
361
|
}, false, T, undefined>;
|
|
368
|
-
readonly null: LeafSchema<"null", null>;
|
|
369
|
-
static readonly null: LeafSchema<"null", null>;
|
|
370
|
-
readonly number: LeafSchema<"number", number>;
|
|
371
|
-
static readonly number: LeafSchema<"number", number>;
|
|
372
362
|
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>;
|
|
373
363
|
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>;
|
|
374
|
-
readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
|
|
375
|
-
static readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
|
|
376
|
-
readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
|
|
377
|
-
static readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
|
|
378
|
-
readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
|
|
379
|
-
static readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
|
|
380
|
-
readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
|
|
381
|
-
static readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
|
|
382
364
|
readonly scope: TScope;
|
|
383
|
-
readonly string: LeafSchema<"string", string>;
|
|
384
|
-
static readonly string: LeafSchema<"string", string>;
|
|
385
365
|
}
|
|
386
366
|
|
|
367
|
+
// @public @system
|
|
368
|
+
export const SchemaFactory_base: SchemaStatics & (new () => SchemaStatics);
|
|
369
|
+
|
|
387
370
|
// @beta
|
|
388
371
|
export class SchemaFactoryBeta<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactory<TScope, TName> {
|
|
389
372
|
scopedFactory<const T extends TName, TNameInner extends number | string = string>(name: T): SchemaFactoryBeta<ScopedSchemaName<TScope, T>, TNameInner>;
|
|
@@ -300,7 +300,7 @@ export interface SchemaCompatibilityStatus {
|
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
// @public @sealed
|
|
303
|
-
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string>
|
|
303
|
+
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactory_base {
|
|
304
304
|
constructor(
|
|
305
305
|
scope: TScope);
|
|
306
306
|
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>;
|
|
@@ -308,14 +308,8 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
|
|
|
308
308
|
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, unknown>, {
|
|
309
309
|
[Symbol.iterator](): Iterator<System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>;
|
|
310
310
|
}, false, T, undefined>;
|
|
311
|
-
readonly boolean: LeafSchema<"boolean", boolean>;
|
|
312
|
-
static readonly boolean: LeafSchema<"boolean", boolean>;
|
|
313
311
|
protected getStructuralType(fullName: string, types: TreeNodeSchema | readonly TreeNodeSchema[], builder: () => TreeNodeSchema): TreeNodeSchema;
|
|
314
|
-
readonly handle: LeafSchema<"handle", IFluidHandle<unknown>>;
|
|
315
|
-
static readonly handle: LeafSchema<"handle", IFluidHandle<unknown>>;
|
|
316
312
|
get identifier(): FieldSchema<FieldKind.Identifier, typeof SchemaFactory.string>;
|
|
317
|
-
readonly leaves: readonly [LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
|
|
318
|
-
static readonly leaves: readonly [LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
|
|
319
313
|
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>;
|
|
320
314
|
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>;
|
|
321
315
|
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, unknown>, {
|
|
@@ -326,25 +320,14 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
|
|
|
326
320
|
} | {
|
|
327
321
|
readonly [x: string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;
|
|
328
322
|
}, false, T, undefined>;
|
|
329
|
-
readonly null: LeafSchema<"null", null>;
|
|
330
|
-
static readonly null: LeafSchema<"null", null>;
|
|
331
|
-
readonly number: LeafSchema<"number", number>;
|
|
332
|
-
static readonly number: LeafSchema<"number", number>;
|
|
333
323
|
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>;
|
|
334
324
|
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>;
|
|
335
|
-
readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
|
|
336
|
-
static readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
|
|
337
|
-
readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
|
|
338
|
-
static readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
|
|
339
|
-
readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
|
|
340
|
-
static readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
|
|
341
|
-
readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
|
|
342
|
-
static readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
|
|
343
325
|
readonly scope: TScope;
|
|
344
|
-
readonly string: LeafSchema<"string", string>;
|
|
345
|
-
static readonly string: LeafSchema<"string", string>;
|
|
346
326
|
}
|
|
347
327
|
|
|
328
|
+
// @public @system
|
|
329
|
+
export const SchemaFactory_base: SchemaStatics & (new () => SchemaStatics);
|
|
330
|
+
|
|
348
331
|
// @public @sealed @system
|
|
349
332
|
export interface SchemaStatics {
|
|
350
333
|
readonly boolean: LeafSchema<"boolean", boolean>;
|
|
@@ -300,7 +300,7 @@ export interface SchemaCompatibilityStatus {
|
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
// @public @sealed
|
|
303
|
-
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string>
|
|
303
|
+
export class SchemaFactory<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactory_base {
|
|
304
304
|
constructor(
|
|
305
305
|
scope: TScope);
|
|
306
306
|
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>;
|
|
@@ -308,14 +308,8 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
|
|
|
308
308
|
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, unknown>, {
|
|
309
309
|
[Symbol.iterator](): Iterator<System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>;
|
|
310
310
|
}, false, T, undefined>;
|
|
311
|
-
readonly boolean: LeafSchema<"boolean", boolean>;
|
|
312
|
-
static readonly boolean: LeafSchema<"boolean", boolean>;
|
|
313
311
|
protected getStructuralType(fullName: string, types: TreeNodeSchema | readonly TreeNodeSchema[], builder: () => TreeNodeSchema): TreeNodeSchema;
|
|
314
|
-
readonly handle: LeafSchema<"handle", IFluidHandle<unknown>>;
|
|
315
|
-
static readonly handle: LeafSchema<"handle", IFluidHandle<unknown>>;
|
|
316
312
|
get identifier(): FieldSchema<FieldKind.Identifier, typeof SchemaFactory.string>;
|
|
317
|
-
readonly leaves: readonly [LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
|
|
318
|
-
static readonly leaves: readonly [LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
|
|
319
313
|
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>;
|
|
320
314
|
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>;
|
|
321
315
|
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, unknown>, {
|
|
@@ -326,25 +320,14 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
|
|
|
326
320
|
} | {
|
|
327
321
|
readonly [x: string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;
|
|
328
322
|
}, false, T, undefined>;
|
|
329
|
-
readonly null: LeafSchema<"null", null>;
|
|
330
|
-
static readonly null: LeafSchema<"null", null>;
|
|
331
|
-
readonly number: LeafSchema<"number", number>;
|
|
332
|
-
static readonly number: LeafSchema<"number", number>;
|
|
333
323
|
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>;
|
|
334
324
|
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>;
|
|
335
|
-
readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
|
|
336
|
-
static readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
|
|
337
|
-
readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
|
|
338
|
-
static readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
|
|
339
|
-
readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
|
|
340
|
-
static readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
|
|
341
|
-
readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
|
|
342
|
-
static readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
|
|
343
325
|
readonly scope: TScope;
|
|
344
|
-
readonly string: LeafSchema<"string", string>;
|
|
345
|
-
static readonly string: LeafSchema<"string", string>;
|
|
346
326
|
}
|
|
347
327
|
|
|
328
|
+
// @public @system
|
|
329
|
+
export const SchemaFactory_base: SchemaStatics & (new () => SchemaStatics);
|
|
330
|
+
|
|
348
331
|
// @public @sealed @system
|
|
349
332
|
export interface SchemaStatics {
|
|
350
333
|
readonly boolean: LeafSchema<"boolean", boolean>;
|
package/beta.d.ts
CHANGED
package/dist/alpha.d.ts
CHANGED
package/dist/beta.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import type { Listenable } from "@fluidframework/core-interfaces/internal";
|
|
5
|
+
import type { HasListeners, Listenable } from "@fluidframework/core-interfaces/internal";
|
|
6
6
|
import { type Brand, type BrandedKey, type BrandedMapSubset, type Opaque, ReferenceCountedBase } from "../../util/index.js";
|
|
7
7
|
import type { FieldKey } from "../schema-stored/index.js";
|
|
8
8
|
import type * as Delta from "./delta.js";
|
|
@@ -165,7 +165,7 @@ export interface AnchorNode extends INormalizedUpPath<AnchorNode> {
|
|
|
165
165
|
/**
|
|
166
166
|
* Events for this anchor node.
|
|
167
167
|
*/
|
|
168
|
-
readonly events: Listenable<AnchorEvents>;
|
|
168
|
+
readonly events: Listenable<AnchorEvents> & HasListeners<AnchorEvents>;
|
|
169
169
|
/**
|
|
170
170
|
* Allows access to data stored on the Anchor in "slots".
|
|
171
171
|
* Use {@link anchorSlot} to create slots.
|
|
@@ -450,7 +450,7 @@ declare class PathNode extends ReferenceCountedBase implements AnchorNode {
|
|
|
450
450
|
/**
|
|
451
451
|
* Event emitter for this anchor.
|
|
452
452
|
*/
|
|
453
|
-
readonly events: Listenable<AnchorEvents> & import("@fluidframework/core-interfaces/internal").IEmitter<AnchorEvents> &
|
|
453
|
+
readonly events: Listenable<AnchorEvents> & import("@fluidframework/core-interfaces/internal").IEmitter<AnchorEvents> & HasListeners<AnchorEvents>;
|
|
454
454
|
/**
|
|
455
455
|
* PathNode arrays are kept sorted the PathNode's parentIndex for efficient search.
|
|
456
456
|
* Users of this field must take care to maintain invariants (correct parent pointers, not empty child arrays etc.)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchorSet.d.ts","sourceRoot":"","sources":["../../../src/core/tree/anchorSet.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"anchorSet.d.ts","sourceRoot":"","sources":["../../../src/core/tree/anchorSet.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAGzF,OAAO,EACN,KAAK,KAAK,EACV,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACX,oBAAoB,EAKpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAG1D,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAC;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