@fluidframework/tree 2.33.2 → 2.40.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/.vscode/settings.json +2 -0
- package/CHANGELOG.md +64 -0
- package/api-report/tree.alpha.api.md +124 -51
- package/api-report/tree.beta.api.md +31 -27
- package/api-report/tree.legacy.alpha.api.md +24 -23
- package/api-report/tree.legacy.public.api.md +24 -23
- package/api-report/tree.public.api.md +24 -23
- package/dist/alpha.d.ts +17 -1
- package/dist/beta.d.ts +2 -0
- package/dist/codec/codec.d.ts +5 -1
- package/dist/codec/codec.d.ts.map +1 -1
- package/dist/codec/codec.js +6 -2
- package/dist/codec/codec.js.map +1 -1
- package/dist/codec/index.d.ts +1 -1
- package/dist/codec/index.d.ts.map +1 -1
- package/dist/codec/index.js +2 -1
- package/dist/codec/index.js.map +1 -1
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/schema-stored/{format.d.ts → formatV1.d.ts} +1 -1
- package/dist/core/schema-stored/formatV1.d.ts.map +1 -0
- package/dist/core/schema-stored/{format.js → formatV1.js} +1 -1
- package/dist/core/schema-stored/formatV1.js.map +1 -0
- package/dist/core/schema-stored/index.d.ts +3 -3
- package/dist/core/schema-stored/index.d.ts.map +1 -1
- package/dist/core/schema-stored/index.js +3 -3
- package/dist/core/schema-stored/index.js.map +1 -1
- package/dist/core/schema-stored/schema.d.ts +3 -1
- package/dist/core/schema-stored/schema.d.ts.map +1 -1
- package/dist/core/schema-stored/schema.js +8 -6
- package/dist/core/schema-stored/schema.js.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/dist/core/schema-view/index.d.ts +1 -1
- package/dist/core/schema-view/index.d.ts.map +1 -1
- package/dist/core/schema-view/index.js +1 -2
- package/dist/core/schema-view/index.js.map +1 -1
- package/dist/core/schema-view/view.d.ts +0 -27
- package/dist/core/schema-view/view.d.ts.map +1 -1
- package/dist/core/schema-view/view.js +1 -35
- package/dist/core/schema-view/view.js.map +1 -1
- package/dist/core/tree/persistedTreeTextFormat.d.ts +4 -4
- package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
- package/dist/core/tree/persistedTreeTextFormat.js +1 -1
- package/dist/core/tree/persistedTreeTextFormat.js.map +1 -1
- package/dist/feature-libraries/forest-summary/format.d.ts +2 -2
- package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/dist/feature-libraries/forest-summary/format.js +1 -1
- package/dist/feature-libraries/forest-summary/format.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +1 -1
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +4 -2
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.d.ts +3 -3
- package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/dist/feature-libraries/mapTreeCursor.js +2 -2
- package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +9 -9
- package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/modularChangeFormat.js +2 -2
- package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +14 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +26 -5
- package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/dist/feature-libraries/schema-index/codec.d.ts +34 -5
- package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/codec.js +63 -9
- package/dist/feature-libraries/schema-index/codec.js.map +1 -1
- package/{lib/feature-libraries/schema-index/format.d.ts → dist/feature-libraries/schema-index/formatV1.d.ts} +9 -9
- package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -0
- package/dist/feature-libraries/schema-index/{format.js → formatV1.js} +4 -4
- package/dist/feature-libraries/schema-index/formatV1.js.map +1 -0
- package/dist/feature-libraries/schema-index/index.d.ts +2 -2
- package/dist/feature-libraries/schema-index/index.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/index.js +6 -3
- package/dist/feature-libraries/schema-index/index.js.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +5 -5
- package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/dist/feature-libraries/schema-index/schemaSummarizer.js +4 -4
- package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/internalTypes.d.ts +0 -1
- package/dist/internalTypes.d.ts.map +1 -1
- package/dist/internalTypes.js.map +1 -1
- package/dist/jsonDomainSchema.d.ts +2 -2
- package/dist/jsonDomainSchema.js +2 -2
- package/dist/jsonDomainSchema.js.map +1 -1
- package/dist/legacy.d.ts +2 -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 +2 -0
- package/dist/serializableDomainSchema.d.ts +3 -3
- package/dist/serializableDomainSchema.js +2 -2
- package/dist/serializableDomainSchema.js.map +1 -1
- package/dist/shared-tree/independentView.d.ts +1 -1
- package/dist/shared-tree/independentView.d.ts.map +1 -1
- package/dist/shared-tree/independentView.js +1 -1
- package/dist/shared-tree/independentView.js.map +1 -1
- package/dist/shared-tree/index.d.ts +4 -3
- package/dist/shared-tree/index.d.ts.map +1 -1
- package/dist/shared-tree/index.js +6 -5
- package/dist/shared-tree/index.js.map +1 -1
- package/dist/shared-tree/schematizeTree.d.ts +10 -11
- package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
- package/dist/shared-tree/schematizeTree.js +11 -36
- package/dist/shared-tree/schematizeTree.js.map +1 -1
- package/dist/shared-tree/schematizingTreeView.d.ts +3 -3
- package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/dist/shared-tree/schematizingTreeView.js +4 -7
- package/dist/shared-tree/schematizingTreeView.js.map +1 -1
- package/dist/shared-tree/sharedTree.d.ts +28 -3
- package/dist/shared-tree/sharedTree.d.ts.map +1 -1
- package/dist/shared-tree/sharedTree.js +29 -3
- package/dist/shared-tree/sharedTree.js.map +1 -1
- package/dist/shared-tree/{treeApi.d.ts → tree.d.ts} +58 -34
- package/dist/shared-tree/tree.d.ts.map +1 -0
- package/dist/shared-tree/{treeApi.js → tree.js} +6 -6
- package/dist/shared-tree/tree.js.map +1 -0
- package/{lib/shared-tree/treeApiAlpha.d.ts → dist/shared-tree/treeAlpha.d.ts} +24 -14
- package/dist/shared-tree/treeAlpha.d.ts.map +1 -0
- package/dist/shared-tree/{treeApiAlpha.js → treeAlpha.js} +7 -5
- package/dist/shared-tree/treeAlpha.js.map +1 -0
- package/dist/shared-tree-core/branchCommitEnricher.d.ts +0 -1
- package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
- package/dist/shared-tree-core/branchCommitEnricher.js +0 -1
- package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
- package/dist/shared-tree-core/transactionEnricher.d.ts +1 -1
- package/dist/shared-tree-core/transactionEnricher.d.ts.map +1 -1
- package/dist/shared-tree-core/transactionEnricher.js +4 -1
- package/dist/shared-tree-core/transactionEnricher.js.map +1 -1
- package/dist/simple-tree/api/conciseTree.d.ts +1 -1
- package/dist/simple-tree/api/conciseTree.js.map +1 -1
- package/dist/simple-tree/api/configuration.d.ts +177 -0
- package/dist/simple-tree/api/configuration.d.ts.map +1 -0
- package/dist/simple-tree/api/configuration.js +163 -0
- package/dist/simple-tree/api/configuration.js.map +1 -0
- package/dist/simple-tree/api/getJsonSchema.js +2 -2
- package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/index.d.ts +9 -5
- package/dist/simple-tree/api/index.d.ts.map +1 -1
- package/dist/simple-tree/api/index.js +9 -7
- package/dist/simple-tree/api/index.js.map +1 -1
- package/dist/simple-tree/api/{view.d.ts → schemaCompatibilityTester.d.ts} +8 -10
- package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -0
- package/dist/simple-tree/api/{view.js → schemaCompatibilityTester.js} +9 -9
- package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -0
- package/dist/simple-tree/api/schemaFactory.d.ts +25 -10
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +27 -12
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +12 -6
- package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryAlpha.js +2 -2
- package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +67 -4
- package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts +1 -1
- package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFromSimple.js +1 -1
- package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/dist/simple-tree/api/storedSchema.d.ts +11 -10
- package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/dist/simple-tree/api/storedSchema.js +16 -11
- package/dist/simple-tree/api/storedSchema.js.map +1 -1
- package/dist/simple-tree/api/tree.d.ts +30 -174
- package/dist/simple-tree/api/tree.d.ts.map +1 -1
- package/dist/simple-tree/api/tree.js +1 -156
- package/dist/simple-tree/api/tree.js.map +1 -1
- package/{lib/simple-tree/api/treeApiBeta.d.ts → dist/simple-tree/api/treeBeta.d.ts} +17 -6
- package/dist/simple-tree/api/treeBeta.d.ts.map +1 -0
- package/dist/simple-tree/api/{treeApiBeta.js → treeBeta.js} +5 -4
- package/dist/simple-tree/api/treeBeta.js.map +1 -0
- package/dist/simple-tree/api/treeChangeEvents.d.ts +83 -0
- package/dist/simple-tree/api/treeChangeEvents.d.ts.map +1 -0
- package/dist/simple-tree/api/treeChangeEvents.js +7 -0
- package/dist/simple-tree/api/treeChangeEvents.js.map +1 -0
- package/dist/simple-tree/api/treeNodeApi.d.ts +2 -1
- package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.d.ts +4 -9
- package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
- package/dist/simple-tree/arrayNode.d.ts +30 -2
- package/dist/simple-tree/arrayNode.d.ts.map +1 -1
- package/dist/simple-tree/arrayNode.js +3 -2
- package/dist/simple-tree/arrayNode.js.map +1 -1
- package/dist/simple-tree/arrayNodeTypes.d.ts +3 -3
- package/dist/simple-tree/arrayNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/arrayNodeTypes.js.map +1 -1
- package/dist/simple-tree/core/getOrCreateNode.d.ts +1 -1
- package/dist/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
- package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
- package/dist/simple-tree/core/index.d.ts +2 -1
- package/dist/simple-tree/core/index.d.ts.map +1 -1
- package/dist/simple-tree/core/index.js +5 -5
- package/dist/simple-tree/core/index.js.map +1 -1
- package/dist/simple-tree/core/treeNode.d.ts +94 -0
- package/dist/simple-tree/core/treeNode.d.ts.map +1 -0
- package/dist/simple-tree/core/treeNode.js +123 -0
- package/dist/simple-tree/core/treeNode.js.map +1 -0
- package/dist/simple-tree/core/treeNodeKernel.d.ts +2 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts +3 -1
- package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/dist/simple-tree/core/types.d.ts +0 -165
- package/dist/simple-tree/core/types.d.ts.map +1 -1
- package/dist/simple-tree/core/types.js +1 -113
- package/dist/simple-tree/core/types.js.map +1 -1
- package/dist/simple-tree/core/withType.d.ts +1 -1
- package/dist/simple-tree/core/withType.d.ts.map +1 -1
- package/dist/simple-tree/core/withType.js.map +1 -1
- package/dist/simple-tree/index.d.ts +4 -4
- package/dist/simple-tree/index.d.ts.map +1 -1
- package/dist/simple-tree/index.js +4 -3
- package/dist/simple-tree/index.js.map +1 -1
- package/dist/simple-tree/mapNode.d.ts +2 -2
- package/dist/simple-tree/mapNode.d.ts.map +1 -1
- package/dist/simple-tree/mapNode.js +1 -1
- package/dist/simple-tree/mapNode.js.map +1 -1
- package/dist/simple-tree/mapNodeTypes.d.ts +3 -3
- package/dist/simple-tree/mapNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/mapNodeTypes.js.map +1 -1
- package/dist/simple-tree/objectNode.d.ts +18 -5
- package/dist/simple-tree/objectNode.d.ts.map +1 -1
- package/dist/simple-tree/objectNode.js +4 -3
- package/dist/simple-tree/objectNode.js.map +1 -1
- package/dist/simple-tree/objectNodeTypes.d.ts +4 -4
- package/dist/simple-tree/objectNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/objectNodeTypes.js.map +1 -1
- package/dist/simple-tree/schemaTypes.d.ts +164 -13
- package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
- package/dist/simple-tree/schemaTypes.js +107 -8
- package/dist/simple-tree/schemaTypes.js.map +1 -1
- package/dist/simple-tree/toStoredSchema.d.ts +8 -8
- package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/dist/simple-tree/toStoredSchema.js +27 -32
- package/dist/simple-tree/toStoredSchema.js.map +1 -1
- package/dist/simple-tree/treeNodeValid.js +2 -2
- package/dist/simple-tree/treeNodeValid.js.map +1 -1
- package/dist/tableSchema.d.ts +455 -125
- package/dist/tableSchema.d.ts.map +1 -1
- package/dist/tableSchema.js +398 -101
- package/dist/tableSchema.js.map +1 -1
- package/dist/treeFactory.d.ts +1 -1
- package/dist/treeFactory.d.ts.map +1 -1
- package/dist/treeFactory.js +30 -75
- package/dist/treeFactory.js.map +1 -1
- package/dist/util/typeUtils.d.ts +1 -1
- package/dist/util/typeUtils.js.map +1 -1
- package/lib/alpha.d.ts +17 -1
- package/lib/beta.d.ts +2 -0
- package/lib/codec/codec.d.ts +5 -1
- package/lib/codec/codec.d.ts.map +1 -1
- package/lib/codec/codec.js +5 -1
- package/lib/codec/codec.js.map +1 -1
- package/lib/codec/index.d.ts +1 -1
- package/lib/codec/index.d.ts.map +1 -1
- package/lib/codec/index.js +1 -1
- package/lib/codec/index.js.map +1 -1
- package/lib/core/index.d.ts +2 -2
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +2 -2
- package/lib/core/index.js.map +1 -1
- package/lib/core/schema-stored/{format.d.ts → formatV1.d.ts} +1 -1
- package/lib/core/schema-stored/formatV1.d.ts.map +1 -0
- package/lib/core/schema-stored/{format.js → formatV1.js} +1 -1
- package/lib/core/schema-stored/formatV1.js.map +1 -0
- package/lib/core/schema-stored/index.d.ts +3 -3
- package/lib/core/schema-stored/index.d.ts.map +1 -1
- package/lib/core/schema-stored/index.js +2 -2
- package/lib/core/schema-stored/index.js.map +1 -1
- package/lib/core/schema-stored/schema.d.ts +3 -1
- package/lib/core/schema-stored/schema.d.ts.map +1 -1
- package/lib/core/schema-stored/schema.js +3 -1
- package/lib/core/schema-stored/schema.js.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
- package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
- package/lib/core/schema-view/index.d.ts +1 -1
- package/lib/core/schema-view/index.d.ts.map +1 -1
- package/lib/core/schema-view/index.js +1 -1
- package/lib/core/schema-view/index.js.map +1 -1
- package/lib/core/schema-view/view.d.ts +0 -27
- package/lib/core/schema-view/view.d.ts.map +1 -1
- package/lib/core/schema-view/view.js +0 -34
- package/lib/core/schema-view/view.js.map +1 -1
- package/lib/core/tree/persistedTreeTextFormat.d.ts +4 -4
- package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
- package/lib/core/tree/persistedTreeTextFormat.js +2 -2
- package/lib/core/tree/persistedTreeTextFormat.js.map +1 -1
- package/lib/feature-libraries/forest-summary/format.d.ts +2 -2
- package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
- package/lib/feature-libraries/forest-summary/format.js +2 -2
- package/lib/feature-libraries/forest-summary/format.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +1 -1
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +1 -1
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.d.ts +3 -3
- package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
- package/lib/feature-libraries/mapTreeCursor.js +2 -2
- package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +9 -9
- package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/modularChangeFormat.js +3 -3
- package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +14 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +26 -6
- package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.js +3 -3
- package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
- package/lib/feature-libraries/schema-index/codec.d.ts +34 -5
- package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/codec.js +61 -9
- package/lib/feature-libraries/schema-index/codec.js.map +1 -1
- package/{dist/feature-libraries/schema-index/format.d.ts → lib/feature-libraries/schema-index/formatV1.d.ts} +9 -9
- package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -0
- package/lib/feature-libraries/schema-index/{format.js → formatV1.js} +5 -5
- package/lib/feature-libraries/schema-index/formatV1.js.map +1 -0
- package/lib/feature-libraries/schema-index/index.d.ts +2 -2
- package/lib/feature-libraries/schema-index/index.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/index.js +2 -2
- package/lib/feature-libraries/schema-index/index.js.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +5 -5
- package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
- package/lib/feature-libraries/schema-index/schemaSummarizer.js +5 -5
- package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/internalTypes.d.ts +0 -1
- package/lib/internalTypes.d.ts.map +1 -1
- package/lib/internalTypes.js.map +1 -1
- package/lib/jsonDomainSchema.d.ts +2 -2
- package/lib/jsonDomainSchema.js +2 -2
- package/lib/jsonDomainSchema.js.map +1 -1
- package/lib/legacy.d.ts +2 -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 +2 -0
- package/lib/serializableDomainSchema.d.ts +3 -3
- package/lib/serializableDomainSchema.js +2 -2
- package/lib/serializableDomainSchema.js.map +1 -1
- package/lib/shared-tree/independentView.d.ts +1 -1
- package/lib/shared-tree/independentView.d.ts.map +1 -1
- package/lib/shared-tree/independentView.js +2 -2
- package/lib/shared-tree/independentView.js.map +1 -1
- package/lib/shared-tree/index.d.ts +4 -3
- package/lib/shared-tree/index.d.ts.map +1 -1
- package/lib/shared-tree/index.js +3 -3
- package/lib/shared-tree/index.js.map +1 -1
- package/lib/shared-tree/schematizeTree.d.ts +10 -11
- package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
- package/lib/shared-tree/schematizeTree.js +12 -37
- package/lib/shared-tree/schematizeTree.js.map +1 -1
- package/lib/shared-tree/schematizingTreeView.d.ts +3 -3
- package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
- package/lib/shared-tree/schematizingTreeView.js +6 -9
- package/lib/shared-tree/schematizingTreeView.js.map +1 -1
- package/lib/shared-tree/sharedTree.d.ts +28 -3
- package/lib/shared-tree/sharedTree.d.ts.map +1 -1
- package/lib/shared-tree/sharedTree.js +29 -4
- package/lib/shared-tree/sharedTree.js.map +1 -1
- package/lib/shared-tree/{treeApi.d.ts → tree.d.ts} +58 -34
- package/lib/shared-tree/tree.d.ts.map +1 -0
- package/lib/shared-tree/{treeApi.js → tree.js} +5 -5
- package/lib/shared-tree/tree.js.map +1 -0
- package/{dist/shared-tree/treeApiAlpha.d.ts → lib/shared-tree/treeAlpha.d.ts} +24 -14
- package/lib/shared-tree/treeAlpha.d.ts.map +1 -0
- package/lib/shared-tree/{treeApiAlpha.js → treeAlpha.js} +8 -6
- package/lib/shared-tree/treeAlpha.js.map +1 -0
- package/lib/shared-tree-core/branchCommitEnricher.d.ts +0 -1
- package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
- package/lib/shared-tree-core/branchCommitEnricher.js +0 -1
- package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
- package/lib/shared-tree-core/transactionEnricher.d.ts +1 -1
- package/lib/shared-tree-core/transactionEnricher.d.ts.map +1 -1
- package/lib/shared-tree-core/transactionEnricher.js +4 -1
- package/lib/shared-tree-core/transactionEnricher.js.map +1 -1
- package/lib/simple-tree/api/conciseTree.d.ts +1 -1
- package/lib/simple-tree/api/conciseTree.js.map +1 -1
- package/lib/simple-tree/api/configuration.d.ts +177 -0
- package/lib/simple-tree/api/configuration.d.ts.map +1 -0
- package/lib/simple-tree/api/configuration.js +157 -0
- package/lib/simple-tree/api/configuration.js.map +1 -0
- package/lib/simple-tree/api/getJsonSchema.js +1 -1
- package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/index.d.ts +9 -5
- package/lib/simple-tree/api/index.d.ts.map +1 -1
- package/lib/simple-tree/api/index.js +5 -4
- package/lib/simple-tree/api/index.js.map +1 -1
- package/lib/simple-tree/api/{view.d.ts → schemaCompatibilityTester.d.ts} +8 -10
- package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -0
- package/lib/simple-tree/api/{view.js → schemaCompatibilityTester.js} +7 -7
- package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -0
- package/lib/simple-tree/api/schemaFactory.d.ts +25 -10
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +27 -12
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +12 -6
- package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryAlpha.js +2 -2
- package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +67 -4
- package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts +1 -1
- package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFromSimple.js +1 -1
- package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
- package/lib/simple-tree/api/storedSchema.d.ts +11 -10
- package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
- package/lib/simple-tree/api/storedSchema.js +20 -13
- package/lib/simple-tree/api/storedSchema.js.map +1 -1
- package/lib/simple-tree/api/tree.d.ts +30 -174
- package/lib/simple-tree/api/tree.d.ts.map +1 -1
- package/lib/simple-tree/api/tree.js +0 -152
- package/lib/simple-tree/api/tree.js.map +1 -1
- package/{dist/simple-tree/api/treeApiBeta.d.ts → lib/simple-tree/api/treeBeta.d.ts} +17 -6
- package/lib/simple-tree/api/treeBeta.d.ts.map +1 -0
- package/lib/simple-tree/api/{treeApiBeta.js → treeBeta.js} +5 -4
- package/lib/simple-tree/api/treeBeta.js.map +1 -0
- package/lib/simple-tree/api/treeChangeEvents.d.ts +83 -0
- package/lib/simple-tree/api/treeChangeEvents.d.ts.map +1 -0
- package/lib/simple-tree/api/treeChangeEvents.js +6 -0
- package/lib/simple-tree/api/treeChangeEvents.js.map +1 -0
- package/lib/simple-tree/api/treeNodeApi.d.ts +2 -1
- package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
- package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.d.ts +4 -9
- package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
- package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
- package/lib/simple-tree/arrayNode.d.ts +30 -2
- package/lib/simple-tree/arrayNode.d.ts.map +1 -1
- package/lib/simple-tree/arrayNode.js +4 -3
- package/lib/simple-tree/arrayNode.js.map +1 -1
- package/lib/simple-tree/arrayNodeTypes.d.ts +3 -3
- package/lib/simple-tree/arrayNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/arrayNodeTypes.js.map +1 -1
- package/lib/simple-tree/core/getOrCreateNode.d.ts +1 -1
- package/lib/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
- package/lib/simple-tree/core/getOrCreateNode.js.map +1 -1
- package/lib/simple-tree/core/index.d.ts +2 -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/treeNode.d.ts +94 -0
- package/lib/simple-tree/core/treeNode.d.ts.map +1 -0
- package/lib/simple-tree/core/treeNode.js +118 -0
- package/lib/simple-tree/core/treeNode.js.map +1 -0
- package/lib/simple-tree/core/treeNodeKernel.d.ts +2 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts +3 -1
- package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
- package/lib/simple-tree/core/types.d.ts +0 -165
- package/lib/simple-tree/core/types.d.ts.map +1 -1
- package/lib/simple-tree/core/types.js +0 -110
- package/lib/simple-tree/core/types.js.map +1 -1
- package/lib/simple-tree/core/withType.d.ts +1 -1
- package/lib/simple-tree/core/withType.d.ts.map +1 -1
- package/lib/simple-tree/core/withType.js.map +1 -1
- package/lib/simple-tree/index.d.ts +4 -4
- 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/mapNode.d.ts +2 -2
- package/lib/simple-tree/mapNode.d.ts.map +1 -1
- package/lib/simple-tree/mapNode.js +2 -2
- package/lib/simple-tree/mapNode.js.map +1 -1
- package/lib/simple-tree/mapNodeTypes.d.ts +3 -3
- package/lib/simple-tree/mapNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/mapNodeTypes.js.map +1 -1
- package/lib/simple-tree/objectNode.d.ts +18 -5
- package/lib/simple-tree/objectNode.d.ts.map +1 -1
- package/lib/simple-tree/objectNode.js +5 -4
- package/lib/simple-tree/objectNode.js.map +1 -1
- package/lib/simple-tree/objectNodeTypes.d.ts +4 -4
- package/lib/simple-tree/objectNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/objectNodeTypes.js.map +1 -1
- package/lib/simple-tree/schemaTypes.d.ts +164 -13
- package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
- package/lib/simple-tree/schemaTypes.js +96 -8
- package/lib/simple-tree/schemaTypes.js.map +1 -1
- package/lib/simple-tree/toStoredSchema.d.ts +8 -8
- package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
- package/lib/simple-tree/toStoredSchema.js +26 -31
- package/lib/simple-tree/toStoredSchema.js.map +1 -1
- package/lib/simple-tree/treeNodeValid.js +2 -2
- package/lib/simple-tree/treeNodeValid.js.map +1 -1
- package/lib/tableSchema.d.ts +455 -125
- package/lib/tableSchema.d.ts.map +1 -1
- package/lib/tableSchema.js +398 -101
- package/lib/tableSchema.js.map +1 -1
- package/lib/treeFactory.d.ts +1 -1
- package/lib/treeFactory.d.ts.map +1 -1
- package/lib/treeFactory.js +30 -75
- package/lib/treeFactory.js.map +1 -1
- package/lib/util/typeUtils.d.ts +1 -1
- package/lib/util/typeUtils.js.map +1 -1
- package/package.json +21 -21
- package/src/codec/codec.ts +6 -1
- package/src/codec/index.ts +1 -0
- package/src/core/index.ts +1 -2
- package/src/core/schema-stored/index.ts +3 -3
- package/src/core/schema-stored/schema.ts +3 -1
- package/src/core/schema-stored/storedSchemaRepository.ts +1 -1
- package/src/core/schema-view/index.ts +0 -1
- package/src/core/schema-view/view.ts +0 -31
- package/src/core/tree/persistedTreeTextFormat.ts +2 -2
- package/src/feature-libraries/forest-summary/format.ts +2 -2
- package/src/feature-libraries/index.ts +7 -1
- package/src/feature-libraries/mapTreeCursor.ts +3 -3
- package/src/feature-libraries/modular-schema/modularChangeFormat.ts +3 -3
- package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +38 -9
- package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +3 -4
- package/src/feature-libraries/schema-index/codec.ts +80 -12
- package/src/feature-libraries/schema-index/{format.ts → formatV1.ts} +4 -4
- package/src/feature-libraries/schema-index/index.ts +7 -2
- package/src/feature-libraries/schema-index/schemaSummarizer.ts +9 -9
- package/src/index.ts +18 -1
- package/src/internalTypes.ts +0 -2
- package/src/jsonDomainSchema.ts +2 -2
- package/src/packageVersion.ts +1 -1
- package/src/serializableDomainSchema.ts +3 -3
- package/src/shared-tree/independentView.ts +4 -3
- package/src/shared-tree/index.ts +5 -6
- package/src/shared-tree/schematizeTree.ts +10 -40
- package/src/shared-tree/schematizingTreeView.ts +12 -17
- package/src/shared-tree/sharedTree.ts +67 -6
- package/src/shared-tree/{treeApi.ts → tree.ts} +75 -51
- package/src/shared-tree/{treeApiAlpha.ts → treeAlpha.ts} +28 -16
- package/src/shared-tree-core/branchCommitEnricher.ts +0 -1
- package/src/shared-tree-core/transactionEnricher.ts +4 -1
- package/src/simple-tree/api/conciseTree.ts +1 -1
- package/src/simple-tree/api/configuration.ts +353 -0
- package/src/simple-tree/api/getJsonSchema.ts +1 -1
- package/src/simple-tree/api/index.ts +23 -15
- package/src/simple-tree/api/{view.ts → schemaCompatibilityTester.ts} +8 -15
- package/src/simple-tree/api/schemaFactory.ts +139 -19
- package/src/simple-tree/api/schemaFactoryAlpha.ts +7 -5
- package/src/simple-tree/api/schemaFactoryRecursive.ts +102 -38
- package/src/simple-tree/api/schemaFromSimple.ts +2 -2
- package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -1
- package/src/simple-tree/api/storedSchema.ts +32 -17
- package/src/simple-tree/api/tree.ts +38 -354
- package/src/simple-tree/api/{treeApiBeta.ts → treeBeta.ts} +20 -6
- package/src/simple-tree/api/treeChangeEvents.ts +84 -0
- package/src/simple-tree/api/treeNodeApi.ts +1 -1
- package/src/simple-tree/api/typesUnsafe.ts +15 -11
- package/src/simple-tree/arrayNode.ts +38 -5
- package/src/simple-tree/arrayNodeTypes.ts +8 -7
- package/src/simple-tree/core/getOrCreateNode.ts +1 -1
- package/src/simple-tree/core/index.ts +5 -4
- package/src/simple-tree/core/treeNode.ts +163 -0
- package/src/simple-tree/core/treeNodeKernel.ts +2 -1
- package/src/simple-tree/core/treeNodeSchema.ts +3 -1
- package/src/simple-tree/core/types.ts +0 -234
- package/src/simple-tree/core/withType.ts +1 -1
- package/src/simple-tree/index.ts +19 -2
- package/src/simple-tree/mapNode.ts +11 -3
- package/src/simple-tree/mapNodeTypes.ts +10 -7
- package/src/simple-tree/objectNode.ts +39 -15
- package/src/simple-tree/objectNodeTypes.ts +9 -5
- package/src/simple-tree/schemaTypes.ts +354 -25
- package/src/simple-tree/toStoredSchema.ts +42 -41
- package/src/simple-tree/treeNodeValid.ts +2 -2
- package/src/tableSchema.ts +1206 -434
- package/src/treeFactory.ts +56 -173
- package/src/util/typeUtils.ts +1 -1
- package/dist/core/schema-stored/format.d.ts.map +0 -1
- package/dist/core/schema-stored/format.js.map +0 -1
- package/dist/feature-libraries/schema-index/format.d.ts.map +0 -1
- package/dist/feature-libraries/schema-index/format.js.map +0 -1
- package/dist/shared-tree/treeApi.d.ts.map +0 -1
- package/dist/shared-tree/treeApi.js.map +0 -1
- package/dist/shared-tree/treeApiAlpha.d.ts.map +0 -1
- package/dist/shared-tree/treeApiAlpha.js.map +0 -1
- package/dist/simple-tree/api/treeApiBeta.d.ts.map +0 -1
- package/dist/simple-tree/api/treeApiBeta.js.map +0 -1
- package/dist/simple-tree/api/view.d.ts.map +0 -1
- package/dist/simple-tree/api/view.js.map +0 -1
- package/lib/core/schema-stored/format.d.ts.map +0 -1
- package/lib/core/schema-stored/format.js.map +0 -1
- package/lib/feature-libraries/schema-index/format.d.ts.map +0 -1
- package/lib/feature-libraries/schema-index/format.js.map +0 -1
- package/lib/shared-tree/treeApi.d.ts.map +0 -1
- package/lib/shared-tree/treeApi.js.map +0 -1
- package/lib/shared-tree/treeApiAlpha.d.ts.map +0 -1
- package/lib/shared-tree/treeApiAlpha.js.map +0 -1
- package/lib/simple-tree/api/treeApiBeta.d.ts.map +0 -1
- package/lib/simple-tree/api/treeApiBeta.js.map +0 -1
- package/lib/simple-tree/api/view.d.ts.map +0 -1
- package/lib/simple-tree/api/view.js.map +0 -1
- /package/src/core/schema-stored/{format.ts → formatV1.ts} +0 -0
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type {
|
|
6
|
+
import type {
|
|
7
|
+
IsUnion,
|
|
8
|
+
RestrictiveStringRecord,
|
|
9
|
+
UnionToIntersection,
|
|
10
|
+
} from "../../util/index.js";
|
|
7
11
|
|
|
8
12
|
import type {
|
|
9
13
|
ApplyKind,
|
|
@@ -239,16 +243,16 @@ export namespace System_Unsafe {
|
|
|
239
243
|
* of the JsonAsTree schema.
|
|
240
244
|
* @system @public
|
|
241
245
|
*/
|
|
242
|
-
export type InsertableTreeNodeFromAllowedTypesUnsafe<TList extends AllowedTypesUnsafe> =
|
|
243
|
-
TList
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
246
|
+
export type InsertableTreeNodeFromAllowedTypesUnsafe<TList extends AllowedTypesUnsafe> =
|
|
247
|
+
IsUnion<TList> extends true
|
|
248
|
+
? never
|
|
249
|
+
: {
|
|
250
|
+
readonly [Property in keyof TList]: TList[Property] extends LazyItem<
|
|
251
|
+
infer TSchema extends TreeNodeSchemaUnsafe
|
|
252
|
+
>
|
|
253
|
+
? InsertableTypedNodeUnsafe<TSchema>
|
|
254
|
+
: never;
|
|
255
|
+
}[number];
|
|
252
256
|
|
|
253
257
|
/**
|
|
254
258
|
* {@link Unenforced} version of {@link InsertableTypedNode}.
|
|
@@ -16,11 +16,14 @@ import {
|
|
|
16
16
|
import { prepareContentForHydration } from "./proxies.js";
|
|
17
17
|
import {
|
|
18
18
|
normalizeAllowedTypes,
|
|
19
|
+
unannotateImplicitAllowedTypes,
|
|
19
20
|
type ImplicitAllowedTypes,
|
|
21
|
+
type ImplicitAnnotatedAllowedTypes,
|
|
20
22
|
type InsertableTreeNodeFromImplicitAllowedTypes,
|
|
21
23
|
type NodeSchemaMetadata,
|
|
22
24
|
type TreeLeafValue,
|
|
23
25
|
type TreeNodeFromImplicitAllowedTypes,
|
|
26
|
+
type UnannotateImplicitAllowedTypes,
|
|
24
27
|
} from "./schemaTypes.js";
|
|
25
28
|
import {
|
|
26
29
|
type WithType,
|
|
@@ -170,8 +173,11 @@ export interface TreeArrayNode<
|
|
|
170
173
|
* For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:
|
|
171
174
|
*
|
|
172
175
|
* - `0` (between the start of the array and `A`'s original position)
|
|
176
|
+
*
|
|
173
177
|
* - `1` (between `A`'s original position and `B`'s original position)
|
|
178
|
+
*
|
|
174
179
|
* - `2` (between `B`'s original position and `C`'s original position)
|
|
180
|
+
*
|
|
175
181
|
* - `3` (between `C`'s original position and the end of the array)
|
|
176
182
|
*
|
|
177
183
|
* So moving `A` between `B` and `C` would require `destinationGap` to be `2`.
|
|
@@ -180,13 +186,17 @@ export interface TreeArrayNode<
|
|
|
180
186
|
* or relative to the start or end of the array:
|
|
181
187
|
*
|
|
182
188
|
* - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)
|
|
189
|
+
*
|
|
183
190
|
* - Move to before some item X: `array.moveToIndex(indexOfX, ...)`
|
|
191
|
+
*
|
|
184
192
|
* - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)
|
|
193
|
+
*
|
|
185
194
|
* - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)
|
|
186
195
|
*
|
|
187
196
|
* This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:
|
|
188
197
|
*
|
|
189
198
|
* - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`
|
|
199
|
+
*
|
|
190
200
|
* - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`
|
|
191
201
|
*
|
|
192
202
|
* Notice the asymmetry between `-1` and `+2` in the above examples.
|
|
@@ -212,8 +222,11 @@ export interface TreeArrayNode<
|
|
|
212
222
|
* For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:
|
|
213
223
|
*
|
|
214
224
|
* - `0` (between the start of the array and `A`'s original position)
|
|
225
|
+
*
|
|
215
226
|
* - `1` (between `A`'s original position and `B`'s original position)
|
|
227
|
+
*
|
|
216
228
|
* - `2` (between `B`'s original position and `C`'s original position)
|
|
229
|
+
*
|
|
217
230
|
* - `3` (between `C`'s original position and the end of the array)
|
|
218
231
|
*
|
|
219
232
|
* So moving `A` between `B` and `C` would require `destinationGap` to be `2`.
|
|
@@ -222,13 +235,17 @@ export interface TreeArrayNode<
|
|
|
222
235
|
* or relative to the start or end of the array:
|
|
223
236
|
*
|
|
224
237
|
* - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)
|
|
238
|
+
*
|
|
225
239
|
* - Move to before some item X: `array.moveToIndex(indexOfX, ...)`
|
|
240
|
+
*
|
|
226
241
|
* - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)
|
|
242
|
+
*
|
|
227
243
|
* - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)
|
|
228
244
|
*
|
|
229
245
|
* This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:
|
|
230
246
|
*
|
|
231
247
|
* - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`
|
|
248
|
+
*
|
|
232
249
|
* - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`
|
|
233
250
|
*
|
|
234
251
|
* Notice the asymmetry between `-1` and `+2` in the above examples.
|
|
@@ -296,8 +313,11 @@ export interface TreeArrayNode<
|
|
|
296
313
|
* For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:
|
|
297
314
|
*
|
|
298
315
|
* - `0` (between the start of the array and `A`'s original position)
|
|
316
|
+
*
|
|
299
317
|
* - `1` (between `A`'s original position and `B`'s original position)
|
|
318
|
+
*
|
|
300
319
|
* - `2` (between `B`'s original position and `C`'s original position)
|
|
320
|
+
*
|
|
301
321
|
* - `3` (between `C`'s original position and the end of the array)
|
|
302
322
|
*
|
|
303
323
|
* So moving `A` between `B` and `C` would require `destinationGap` to be `2`.
|
|
@@ -306,13 +326,17 @@ export interface TreeArrayNode<
|
|
|
306
326
|
* or relative to the start or end of the array:
|
|
307
327
|
*
|
|
308
328
|
* - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)
|
|
329
|
+
*
|
|
309
330
|
* - Move to before some item X: `array.moveToIndex(indexOfX, ...)`
|
|
331
|
+
*
|
|
310
332
|
* - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)
|
|
333
|
+
*
|
|
311
334
|
* - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)
|
|
312
335
|
*
|
|
313
336
|
* This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:
|
|
314
337
|
*
|
|
315
338
|
* - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`
|
|
339
|
+
*
|
|
316
340
|
* - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`
|
|
317
341
|
*
|
|
318
342
|
* Notice the asymmetry between `-1` and `+2` in the above examples.
|
|
@@ -340,8 +364,11 @@ export interface TreeArrayNode<
|
|
|
340
364
|
* For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:
|
|
341
365
|
*
|
|
342
366
|
* - `0` (between the start of the array and `A`'s original position)
|
|
367
|
+
*
|
|
343
368
|
* - `1` (between `A`'s original position and `B`'s original position)
|
|
369
|
+
*
|
|
344
370
|
* - `2` (between `B`'s original position and `C`'s original position)
|
|
371
|
+
*
|
|
345
372
|
* - `3` (between `C`'s original position and the end of the array)
|
|
346
373
|
*
|
|
347
374
|
* So moving `A` between `B` and `C` would require `destinationGap` to be `2`.
|
|
@@ -350,13 +377,17 @@ export interface TreeArrayNode<
|
|
|
350
377
|
* or relative to the start or end of the array:
|
|
351
378
|
*
|
|
352
379
|
* - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)
|
|
380
|
+
*
|
|
353
381
|
* - Move to before some item X: `array.moveToIndex(indexOfX, ...)`
|
|
382
|
+
*
|
|
354
383
|
* - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)
|
|
384
|
+
*
|
|
355
385
|
* - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)
|
|
356
386
|
*
|
|
357
387
|
* This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:
|
|
358
388
|
*
|
|
359
389
|
* - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`
|
|
390
|
+
*
|
|
360
391
|
* - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`
|
|
361
392
|
*
|
|
362
393
|
* Notice the asymmetry between `-1` and `+2` in the above examples.
|
|
@@ -1064,7 +1095,7 @@ abstract class CustomArrayNodeBase<const T extends ImplicitAllowedTypes>
|
|
|
1064
1095
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
1065
1096
|
export function arraySchema<
|
|
1066
1097
|
TName extends string,
|
|
1067
|
-
const T extends
|
|
1098
|
+
const T extends ImplicitAnnotatedAllowedTypes,
|
|
1068
1099
|
const ImplicitlyConstructable extends boolean,
|
|
1069
1100
|
const TCustomMetadata = unknown,
|
|
1070
1101
|
>(
|
|
@@ -1082,7 +1113,9 @@ export function arraySchema<
|
|
|
1082
1113
|
> &
|
|
1083
1114
|
ArrayNodePojoEmulationSchema<TName, T, ImplicitlyConstructable, TCustomMetadata>;
|
|
1084
1115
|
|
|
1085
|
-
const
|
|
1116
|
+
const unannotatedTypes = unannotateImplicitAllowedTypes(info);
|
|
1117
|
+
|
|
1118
|
+
const lazyChildTypes = new Lazy(() => normalizeAllowedTypes(unannotatedTypes));
|
|
1086
1119
|
const lazyAllowedTypesIdentifiers = new Lazy(
|
|
1087
1120
|
() => new Set([...lazyChildTypes.value].map((type) => type.identifier)),
|
|
1088
1121
|
);
|
|
@@ -1091,7 +1124,7 @@ export function arraySchema<
|
|
|
1091
1124
|
|
|
1092
1125
|
// This class returns a proxy from its constructor to handle numeric indexing.
|
|
1093
1126
|
// Alternatively it could extend a normal class which gets tons of numeric properties added.
|
|
1094
|
-
class Schema extends CustomArrayNodeBase<T
|
|
1127
|
+
class Schema extends CustomArrayNodeBase<UnannotateImplicitAllowedTypes<T>> {
|
|
1095
1128
|
public static override prepareInstance<T2>(
|
|
1096
1129
|
this: typeof TreeNodeValid<T2>,
|
|
1097
1130
|
instance: TreeNodeValid<T2>,
|
|
@@ -1178,8 +1211,8 @@ export function arraySchema<
|
|
|
1178
1211
|
return Schema.constructorCached?.constructor as unknown as Output;
|
|
1179
1212
|
}
|
|
1180
1213
|
|
|
1181
|
-
protected get simpleSchema(): T {
|
|
1182
|
-
return
|
|
1214
|
+
protected get simpleSchema(): UnannotateImplicitAllowedTypes<T> {
|
|
1215
|
+
return unannotatedTypes;
|
|
1183
1216
|
}
|
|
1184
1217
|
protected get allowedTypes(): ReadonlySet<TreeNodeSchema> {
|
|
1185
1218
|
return lazyChildTypes.value;
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
import type { TreeArrayNode } from "./arrayNode.js";
|
|
7
7
|
import type {
|
|
8
|
-
|
|
8
|
+
ImplicitAnnotatedAllowedTypes,
|
|
9
9
|
InsertableTreeNodeFromImplicitAllowedTypes,
|
|
10
|
+
UnannotateImplicitAllowedTypes,
|
|
10
11
|
} from "./schemaTypes.js";
|
|
11
12
|
import {
|
|
12
13
|
NodeKind,
|
|
@@ -24,14 +25,14 @@ import type { SimpleArrayNodeSchema } from "./simpleSchema.js";
|
|
|
24
25
|
*/
|
|
25
26
|
export interface ArrayNodeCustomizableSchema<
|
|
26
27
|
out TName extends string = string,
|
|
27
|
-
in out T extends
|
|
28
|
+
in out T extends ImplicitAnnotatedAllowedTypes = ImplicitAnnotatedAllowedTypes,
|
|
28
29
|
out ImplicitlyConstructable extends boolean = true,
|
|
29
30
|
out TCustomMetadata = unknown,
|
|
30
31
|
> extends TreeNodeSchemaClass<
|
|
31
32
|
TName,
|
|
32
33
|
NodeKind.Array,
|
|
33
|
-
TreeArrayNode<T
|
|
34
|
-
Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T
|
|
34
|
+
TreeArrayNode<UnannotateImplicitAllowedTypes<T>> & WithType<TName, NodeKind.Array, T>,
|
|
35
|
+
Iterable<InsertableTreeNodeFromImplicitAllowedTypes<UnannotateImplicitAllowedTypes<T>>>,
|
|
35
36
|
ImplicitlyConstructable,
|
|
36
37
|
T,
|
|
37
38
|
undefined,
|
|
@@ -45,14 +46,14 @@ export interface ArrayNodeCustomizableSchema<
|
|
|
45
46
|
*/
|
|
46
47
|
export interface ArrayNodePojoEmulationSchema<
|
|
47
48
|
out TName extends string = string,
|
|
48
|
-
in out T extends
|
|
49
|
+
in out T extends ImplicitAnnotatedAllowedTypes = ImplicitAnnotatedAllowedTypes,
|
|
49
50
|
out ImplicitlyConstructable extends boolean = true,
|
|
50
51
|
out TCustomMetadata = unknown,
|
|
51
52
|
> extends TreeNodeSchemaNonClass<
|
|
52
53
|
TName,
|
|
53
54
|
NodeKind.Array,
|
|
54
|
-
TreeArrayNode<T
|
|
55
|
-
Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T
|
|
55
|
+
TreeArrayNode<UnannotateImplicitAllowedTypes<T>> & WithType<TName, NodeKind.Array, T>,
|
|
56
|
+
Iterable<InsertableTreeNodeFromImplicitAllowedTypes<UnannotateImplicitAllowedTypes<T>>>,
|
|
56
57
|
ImplicitlyConstructable,
|
|
57
58
|
T,
|
|
58
59
|
undefined,
|
|
@@ -17,13 +17,14 @@ export {
|
|
|
17
17
|
} from "./treeNodeKernel.js";
|
|
18
18
|
export { type WithType, typeNameSymbol, typeSchemaSymbol } from "./withType.js";
|
|
19
19
|
export {
|
|
20
|
-
type TreeChangeEvents,
|
|
21
|
-
TreeNode,
|
|
22
20
|
type Unhydrated,
|
|
23
|
-
inPrototypeChain,
|
|
24
21
|
type InternalTreeNode,
|
|
25
|
-
privateToken,
|
|
26
22
|
} from "./types.js";
|
|
23
|
+
export {
|
|
24
|
+
TreeNode,
|
|
25
|
+
privateToken,
|
|
26
|
+
inPrototypeChain,
|
|
27
|
+
} from "./treeNode.js";
|
|
27
28
|
export {
|
|
28
29
|
type TreeNodeSchema,
|
|
29
30
|
NodeKind,
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
+
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
8
|
+
|
|
9
|
+
import { NodeKind, type TreeNodeSchemaClass } from "./treeNodeSchema.js";
|
|
10
|
+
// eslint-disable-next-line import/no-deprecated
|
|
11
|
+
import { type WithType, typeNameSymbol, type typeSchemaSymbol } from "./withType.js";
|
|
12
|
+
import { tryGetTreeNodeSchema } from "./treeNodeKernel.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A non-{@link NodeKind.Leaf|leaf} SharedTree node. Includes objects, arrays, and maps.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Base type which all nodes extend.
|
|
19
|
+
*
|
|
20
|
+
* This type can be used as a type to indicate/document values which should be tree nodes.
|
|
21
|
+
* Runtime use of this class object (for example when used with `instanceof` or extending it), is not currently supported.
|
|
22
|
+
*
|
|
23
|
+
* There are three ways to get instances of TreeNode:
|
|
24
|
+
*
|
|
25
|
+
* 1. From a {@link TreeView} loading nodes from an existing document, or creating local copies of nodes inserted by a remote collaborator.
|
|
26
|
+
* This case provides an {@link InternalTreeNode} to the constructor: subclasses must not modify how the constructor handles this case.
|
|
27
|
+
*
|
|
28
|
+
* 2. Explicit construction of {@link Unhydrated} nodes using either {@link TreeNodeSchemaClass} as a constructor or {@link TreeNodeSchemaNonClass|TreeNodeSchemaNonClass.create}.
|
|
29
|
+
* Either way the {@link TreeNodeSchema} produced must be produced using a {@link SchemaFactory}.
|
|
30
|
+
*
|
|
31
|
+
* 3. Implicit construction: Several APIs which logically require an unhydrated TreeNode also allow passing in a value which could be used to explicitly construct the node instead.
|
|
32
|
+
* These APIs internally call the constructor with the provided value, so it's really just a special case of the above option.
|
|
33
|
+
* Note that when constructing nodes, sometimes implicit construction is not allowed
|
|
34
|
+
* (either at runtime due to ambiguous types or at compile time due to TypeScript limitations):
|
|
35
|
+
* in such cases, explicit construction must be used.
|
|
36
|
+
*
|
|
37
|
+
* @privateRemarks
|
|
38
|
+
* This is a class not an interface to enable stricter type checking (see {@link TreeNode.#brand})
|
|
39
|
+
* and some runtime enforcement of schema class policy (see the the validation in the constructor).
|
|
40
|
+
* This class is however only `type` exported not value exported, preventing the class object from being used,
|
|
41
|
+
* similar to how interfaces work.
|
|
42
|
+
*
|
|
43
|
+
* Not all node implementations include this in their prototype chain (some hide it with a proxy),
|
|
44
|
+
* and thus cause the default/built in `instanceof` to return false despite our type checking and all other APIs treating them as TreeNodes.
|
|
45
|
+
* This class provides a custom `Symbol.hasInstance` to fix `instanceof` for this class and all classes extending it.
|
|
46
|
+
* For now the type-only export prevents use of `instanceof` on this class (but allows it in subclasses like schema classes).
|
|
47
|
+
* @sealed @public
|
|
48
|
+
*/
|
|
49
|
+
export abstract class TreeNode implements WithType {
|
|
50
|
+
/**
|
|
51
|
+
* This is added to prevent TypeScript from implicitly allowing non-TreeNode types to be used as TreeNodes.
|
|
52
|
+
* @remarks
|
|
53
|
+
* This field forces TypeScript to use nominal instead of structural typing,
|
|
54
|
+
* preventing compiler error messages and tools like "add missing properties"
|
|
55
|
+
* from adding the [type] field as a solution when using a non-TreeNode object where a TreeNode is required.
|
|
56
|
+
* Instead TreeNodes must be created through the appropriate APIs, see the documentation on {@link TreeNode} for details.
|
|
57
|
+
*
|
|
58
|
+
* @privateRemarks
|
|
59
|
+
* This is a JavaScript private field, so is not accessible from outside this class.
|
|
60
|
+
* This prevents it from having name collisions with object fields.
|
|
61
|
+
* Since this is private, the type of this field is stripped in the d.ts file.
|
|
62
|
+
* To get matching type checking within and from outside the package, the least informative type (`unknown`) is used.
|
|
63
|
+
* To avoid this having any runtime impact, the field is uninitialized.
|
|
64
|
+
*
|
|
65
|
+
* Making this field optional results in different type checking within this project than outside of it, since the d.ts file drops the optional aspect of the field.
|
|
66
|
+
* This is extra confusing since since the tests get in-project typing for intellisense and separate project checking at build time.
|
|
67
|
+
* To avoid all this mess, this field is required, not optional.
|
|
68
|
+
*
|
|
69
|
+
* Another option would be to use a symbol (possibly as a private field).
|
|
70
|
+
* That approach ran into some strange difficulties causing SchemaFactory to fail to compile, and was not investigated further.
|
|
71
|
+
*
|
|
72
|
+
* The [type] symbol provides a lot of the value this private brand does, but is not all of it:
|
|
73
|
+
* someone could manually (or via Intellisense auto-implement completion, or in response to a type error)
|
|
74
|
+
* make an object literal with the [type] field and pass it off as a node: this private brand prevents that.
|
|
75
|
+
*/
|
|
76
|
+
readonly #brand!: unknown;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Adds a type symbol for stronger typing.
|
|
80
|
+
* @privateRemarks
|
|
81
|
+
* Subclasses provide more specific strings for this to get strong typing of otherwise type compatible nodes.
|
|
82
|
+
* @deprecated Use {@link typeSchemaSymbol} instead.
|
|
83
|
+
*/
|
|
84
|
+
// eslint-disable-next-line import/no-deprecated
|
|
85
|
+
public abstract get [typeNameSymbol](): string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Adds a type symbol for stronger typing.
|
|
89
|
+
* @privateRemarks
|
|
90
|
+
* Subclasses provide more specific strings for this to get strong typing of otherwise type compatible nodes.
|
|
91
|
+
*/
|
|
92
|
+
public abstract get [typeSchemaSymbol](): TreeNodeSchemaClass;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Provides `instanceof` support for testing if a value is a `TreeNode`.
|
|
96
|
+
* @remarks
|
|
97
|
+
* For more options, like including leaf values or narrowing to collections of schema, use `is` or `schema` from {@link TreeNodeApi}.
|
|
98
|
+
* @privateRemarks
|
|
99
|
+
* Due to type-only export, this functionality is not available outside the package.
|
|
100
|
+
*/
|
|
101
|
+
public static [Symbol.hasInstance](value: unknown): value is TreeNode;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Provides `instanceof` support for all schema classes with public constructors.
|
|
105
|
+
* @remarks
|
|
106
|
+
* For more options, like including leaf values or narrowing to collections of schema, use `is` or `schema` from {@link TreeNodeApi}.
|
|
107
|
+
* @privateRemarks
|
|
108
|
+
* Despite type-only export, this functionality is available outside the package since it is inherited by subclasses.
|
|
109
|
+
*/
|
|
110
|
+
public static [Symbol.hasInstance]<
|
|
111
|
+
TSchema extends abstract new (
|
|
112
|
+
...args: any[]
|
|
113
|
+
) => TreeNode,
|
|
114
|
+
>(this: TSchema, value: unknown): value is InstanceType<TSchema>;
|
|
115
|
+
|
|
116
|
+
public static [Symbol.hasInstance](this: { prototype: object }, value: unknown): boolean {
|
|
117
|
+
const schema = tryGetTreeNodeSchema(value);
|
|
118
|
+
|
|
119
|
+
if (schema === undefined || schema.kind === NodeKind.Leaf) {
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
assert("prototype" in schema, 0x98a /* expected class based schema */);
|
|
124
|
+
return inPrototypeChain(schema.prototype, this.prototype);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* TreeNodes must extend schema classes created by SchemaFactory, and therefore this constructor should not be invoked directly by code outside this package.
|
|
129
|
+
* @privateRemarks
|
|
130
|
+
* `token` must be the {@link privateToken} value, which is not package exported.
|
|
131
|
+
* This is used to detect invalid subclasses.
|
|
132
|
+
*
|
|
133
|
+
* All valid subclass should use {@link TreeNodeValid}, but this code doesn't directly reference it to avoid cyclic dependencies.
|
|
134
|
+
*/
|
|
135
|
+
protected constructor(token: unknown) {
|
|
136
|
+
if (token !== privateToken) {
|
|
137
|
+
throw new UsageError("TreeNodes must extend schema classes created by SchemaFactory");
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* `token` to pass to {@link TreeNode}'s constructor used to detect invalid subclasses.
|
|
144
|
+
*/
|
|
145
|
+
export const privateToken = {};
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Check if the prototype derived's prototype chain contains `base`.
|
|
149
|
+
* @param derived - prototype to check
|
|
150
|
+
* @param base - prototype to search for
|
|
151
|
+
* @returns true iff `base` is in the prototype chain starting at `derived`.
|
|
152
|
+
*/
|
|
153
|
+
// eslint-disable-next-line @rushstack/no-new-null
|
|
154
|
+
export function inPrototypeChain(derived: object | null, base: object): boolean {
|
|
155
|
+
let checking = derived;
|
|
156
|
+
while (checking !== null) {
|
|
157
|
+
if (base === checking) {
|
|
158
|
+
return true;
|
|
159
|
+
}
|
|
160
|
+
checking = Reflect.getPrototypeOf(checking);
|
|
161
|
+
}
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
@@ -7,7 +7,7 @@ import { assert, Lazy, fail, debugAssert } from "@fluidframework/core-utils/inte
|
|
|
7
7
|
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
8
8
|
import { createEmitter } from "@fluid-internal/client-utils";
|
|
9
9
|
import type { Listenable, Off } from "@fluidframework/core-interfaces";
|
|
10
|
-
import type { InternalTreeNode,
|
|
10
|
+
import type { InternalTreeNode, Unhydrated } from "./types.js";
|
|
11
11
|
import {
|
|
12
12
|
anchorSlot,
|
|
13
13
|
type AnchorEvents,
|
|
@@ -31,6 +31,7 @@ import type { TreeNodeSchema } from "./treeNodeSchema.js";
|
|
|
31
31
|
import { makeTree } from "../../feature-libraries/flex-tree/lazyNode.js";
|
|
32
32
|
import { SimpleContextSlot, type Context, type HydratedContext } from "./context.js";
|
|
33
33
|
import { UnhydratedFlexTreeNode } from "./unhydratedFlexTree.js";
|
|
34
|
+
import type { TreeNode } from "./treeNode.js";
|
|
34
35
|
|
|
35
36
|
const treeNodeToKernel = new WeakMap<TreeNode, TreeNodeKernel>();
|
|
36
37
|
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import type { TreeLeafValue } from "../schemaTypes.js";
|
|
7
7
|
import type { SimpleNodeSchemaBase } from "../simpleSchema.js";
|
|
8
|
-
import type {
|
|
8
|
+
import type { TreeNode } from "./treeNode.js";
|
|
9
|
+
import type { InternalTreeNode, Unhydrated } from "./types.js";
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Schema for a {@link TreeNode} or {@link TreeLeafValue}.
|
|
@@ -136,6 +137,7 @@ export type TreeNodeSchemaNonClass<
|
|
|
136
137
|
* // If both get used, its an error!
|
|
137
138
|
* class Invalid extends base {}
|
|
138
139
|
* ```
|
|
140
|
+
*
|
|
139
141
|
* - Do not modify the constructor input parameter types or values:
|
|
140
142
|
* ```typescript
|
|
141
143
|
* class Invalid extends schemaFactory.object("A", {
|