From 8896b91219ae8896a8f36ba545507e3641fe690d Mon Sep 17 00:00:00 2001 From: Michael Zhen <112977307+zhenmichael@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:27:23 +0000 Subject: [PATCH 1/5] move flex list types to internal --- packages/dds/tree/api-report/tree.api.md | 21 ++++++++++++------- .../flex-tree/flexTreeTypes.ts | 4 ++-- .../dds/tree/src/feature-libraries/index.ts | 2 +- .../schema-aware/schemaAware.ts | 4 ++-- .../feature-libraries/typed-schema/index.ts | 4 +++- .../typed-schema/internalTypes.ts | 8 +++++++ packages/dds/tree/src/index.ts | 2 +- .../dds/tree/src/simple-tree/schemaTypes.ts | 11 +++++++--- .../dds/tree/src/simple-tree/typesUnsafe.ts | 6 +++--- .../schemaFactoryRecursive.spec.ts | 4 ++-- .../api-report/fluid-framework.api.md | 17 ++++++++++----- pnpm-lock.yaml | 3 +++ 12 files changed, 59 insertions(+), 27 deletions(-) create mode 100644 packages/dds/tree/src/feature-libraries/typed-schema/internalTypes.ts diff --git a/packages/dds/tree/api-report/tree.api.md b/packages/dds/tree/api-report/tree.api.md index 07a79d370f04..b9158757b865 100644 --- a/packages/dds/tree/api-report/tree.api.md +++ b/packages/dds/tree/api-report/tree.api.md @@ -38,7 +38,7 @@ export type AllowedTypeSet = Any | ReadonlySet; // @internal export type AllowedTypesToFlexInsertableTree = [ -T extends readonly LazyItem[] ? InsertableFlexNode, FlexTreeNodeSchema>> : ContextuallyTypedNodeData +T extends readonly LazyItem[] ? InsertableFlexNode, FlexTreeNodeSchema>> : ContextuallyTypedNodeData ][_InlineTrick]; // @internal @@ -593,7 +593,7 @@ export type FlexImplicitFieldSchema = FlexFieldSchema | FlexImplicitAllowedTypes export type FlexList = readonly LazyItem[]; // @public -export type FlexListToUnion = ExtractItemType; +type FlexListToUnion = ExtractItemType; // @internal export type FlexMapFieldSchema = FlexFieldSchema; @@ -839,7 +839,7 @@ export type FlexTreeTypedFieldInner = TSchema extends LeafNodeSchema ? FlexTreeLeafNode : TSchema extends FlexMapNodeSchema ? FlexTreeMapNode : TSchema extends FlexFieldNodeSchema ? FlexTreeFieldNode : TSchema extends FlexObjectNodeSchema ? FlexTreeObjectNodeTyped : FlexTreeNode; // @internal -export type FlexTreeTypedNodeUnion = T extends FlexList ? FlexTreeTypedNode, FlexTreeNodeSchema>> : FlexTreeNode; +export type FlexTreeTypedNodeUnion = T extends FlexList ? FlexTreeTypedNode, FlexTreeNodeSchema>> : FlexTreeNode; // @internal export type FlexTreeUnboxField = FlexTreeUnboxFieldInner; @@ -1006,10 +1006,10 @@ export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchemaUnsafe ? ApplyKind, Kind, true> : InsertableTreeNodeFromImplicitAllowedTypesUnsafe; // @public -export type InsertableTreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes ? InsertableTypedNode> : never; +export type InsertableTreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes ? InsertableTypedNode> : never; // @public -export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends AllowedTypes ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; +export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends AllowedTypes ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; // @public export type InsertableTypedNode = (T extends { @@ -1021,6 +1021,13 @@ export type InsertableTypedNodeUnsafe> = Un implicitlyConstructable: true; } ? NodeBuilderDataUnsafe : never); +declare namespace InternalFlexListTypes { + export { + FlexListToUnion + } +} +export { InternalFlexListTypes } + // @public export interface InternalTreeNode extends ErasedType<"@fluidframework/tree.InternalTreeNode"> { } @@ -1938,10 +1945,10 @@ export interface TreeNodeApi { } // @public -export type TreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; +export type TreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; // @public -export type TreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; +export type TreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; // @public export type TreeNodeSchema = TreeNodeSchemaClass | TreeNodeSchemaNonClass; diff --git a/packages/dds/tree/src/feature-libraries/flex-tree/flexTreeTypes.ts b/packages/dds/tree/src/feature-libraries/flex-tree/flexTreeTypes.ts index c9af38f505da..17790a4c353a 100644 --- a/packages/dds/tree/src/feature-libraries/flex-tree/flexTreeTypes.ts +++ b/packages/dds/tree/src/feature-libraries/flex-tree/flexTreeTypes.ts @@ -21,11 +21,11 @@ import { FlexFieldNodeSchema, FlexFieldSchema, FlexList, - FlexListToUnion, FlexMapNodeSchema, FlexObjectNodeFields, FlexObjectNodeSchema, FlexTreeNodeSchema, + InternalFlexListTypes, LazyItem, LeafNodeSchema, } from "../typed-schema/index.js"; @@ -1021,7 +1021,7 @@ export type FlexTreeTypedFieldInner< */ export type FlexTreeTypedNodeUnion = T extends FlexList - ? FlexTreeTypedNode, FlexTreeNodeSchema>> + ? FlexTreeTypedNode, FlexTreeNodeSchema>> : FlexTreeNode; /** diff --git a/packages/dds/tree/src/feature-libraries/index.ts b/packages/dds/tree/src/feature-libraries/index.ts index 26013be2b849..8fc289241262 100644 --- a/packages/dds/tree/src/feature-libraries/index.ts +++ b/packages/dds/tree/src/feature-libraries/index.ts @@ -153,8 +153,8 @@ export { FlexMapFieldSchema, SchemaCollection, TreeNodeSchemaBase, - FlexListToUnion, LazyItem, + InternalFlexListTypes, isLazy, NormalizeObjectNodeFields, NormalizeField as NormalizeFieldSchema, diff --git a/packages/dds/tree/src/feature-libraries/schema-aware/schemaAware.ts b/packages/dds/tree/src/feature-libraries/schema-aware/schemaAware.ts index 063750d44d0a..5722b152249a 100644 --- a/packages/dds/tree/src/feature-libraries/schema-aware/schemaAware.ts +++ b/packages/dds/tree/src/feature-libraries/schema-aware/schemaAware.ts @@ -15,11 +15,11 @@ import { FlexAllowedTypes, FlexFieldNodeSchema, FlexFieldSchema, - FlexListToUnion, FlexMapNodeSchema, FlexObjectNodeFields, FlexObjectNodeSchema, FlexTreeNodeSchema, + InternalFlexListTypes, LazyItem, LeafNodeSchema, } from "../typed-schema/index.js"; @@ -102,7 +102,7 @@ export type ApplyMultiplicity = */ export type AllowedTypesToFlexInsertableTree = [ T extends readonly LazyItem[] - ? InsertableFlexNode, FlexTreeNodeSchema>> + ? InsertableFlexNode, FlexTreeNodeSchema>> : ContextuallyTypedNodeData, ][_InlineTrick]; diff --git a/packages/dds/tree/src/feature-libraries/typed-schema/index.ts b/packages/dds/tree/src/feature-libraries/typed-schema/index.ts index db51f3d8e185..8f3ade3ca958 100644 --- a/packages/dds/tree/src/feature-libraries/typed-schema/index.ts +++ b/packages/dds/tree/src/feature-libraries/typed-schema/index.ts @@ -44,9 +44,11 @@ export { export { FlexList, markEager, - FlexListToUnion, LazyItem, isLazy, ExtractItemType, NormalizeLazyItem, } from "./flexList.js"; + +import * as InternalFlexListTypes from "./internalTypes.js"; +export { InternalFlexListTypes }; diff --git a/packages/dds/tree/src/feature-libraries/typed-schema/internalTypes.ts b/packages/dds/tree/src/feature-libraries/typed-schema/internalTypes.ts new file mode 100644 index 000000000000..0b36c46e1aa0 --- /dev/null +++ b/packages/dds/tree/src/feature-libraries/typed-schema/internalTypes.ts @@ -0,0 +1,8 @@ +/*! + * Copyright (c) Microsoft Corporation and contributors. All rights reserved. + * Licensed under the MIT License. + */ + +// Used by public types, but not part of the desired API surface + +export { FlexListToUnion } from "./flexList.js"; diff --git a/packages/dds/tree/src/index.ts b/packages/dds/tree/src/index.ts index b3484cf6a4fe..d5c4edec6ea3 100644 --- a/packages/dds/tree/src/index.ts +++ b/packages/dds/tree/src/index.ts @@ -384,7 +384,7 @@ export { UnbrandedName, EmptyObject, FlexList, - FlexListToUnion, + InternalFlexListTypes, // These field kind types really only need to show up via FieldKinds.name, and not as top level names in the package. // These names also are collision prone. diff --git a/packages/dds/tree/src/simple-tree/schemaTypes.ts b/packages/dds/tree/src/simple-tree/schemaTypes.ts index 0e16ac2b1d94..1f9bba87cabb 100644 --- a/packages/dds/tree/src/simple-tree/schemaTypes.ts +++ b/packages/dds/tree/src/simple-tree/schemaTypes.ts @@ -7,7 +7,12 @@ import { ErasedType, IFluidHandle } from "@fluidframework/core-interfaces"; import { Lazy } from "@fluidframework/core-utils/internal"; import { UsageError } from "@fluidframework/telemetry-utils/internal"; -import { FlexListToUnion, LazyItem, NodeKeyManager, isLazy } from "../feature-libraries/index.js"; +import { + InternalFlexListTypes, + LazyItem, + NodeKeyManager, + isLazy, +} from "../feature-libraries/index.js"; import { MakeNominal, brand, isReadonlyArray } from "../util/index.js"; import { InternalTreeNode, Unhydrated } from "./types.js"; import { FieldKey } from "../core/index.js"; @@ -442,7 +447,7 @@ export type TreeNodeFromImplicitAllowedTypes< > = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes - ? NodeFromSchema> + ? NodeFromSchema> : unknown; /** @@ -454,7 +459,7 @@ export type InsertableTreeNodeFromImplicitAllowedTypes< > = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes - ? InsertableTypedNode> + ? InsertableTypedNode> : never; /** diff --git a/packages/dds/tree/src/simple-tree/typesUnsafe.ts b/packages/dds/tree/src/simple-tree/typesUnsafe.ts index f6f0c3fb7d0f..3bbe9b98a6aa 100644 --- a/packages/dds/tree/src/simple-tree/typesUnsafe.ts +++ b/packages/dds/tree/src/simple-tree/typesUnsafe.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. */ -import { FlexListToUnion, Unenforced } from "../feature-libraries/index.js"; +import { InternalFlexListTypes, Unenforced } from "../feature-libraries/index.js"; import { RestrictiveReadonlyRecord } from "../util/index.js"; import { @@ -75,7 +75,7 @@ export type TreeNodeFromImplicitAllowedTypesUnsafe< : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes - ? NodeFromSchema> + ? NodeFromSchema> : unknown; /** @@ -85,7 +85,7 @@ export type TreeNodeFromImplicitAllowedTypesUnsafe< export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe< TSchema extends Unenforced, > = TSchema extends AllowedTypes - ? InsertableTypedNodeUnsafe> + ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; /** diff --git a/packages/dds/tree/src/test/simple-tree/schemaFactoryRecursive.spec.ts b/packages/dds/tree/src/test/simple-tree/schemaFactoryRecursive.spec.ts index 50ce1de9b9b3..0ae40348acef 100644 --- a/packages/dds/tree/src/test/simple-tree/schemaFactoryRecursive.spec.ts +++ b/packages/dds/tree/src/test/simple-tree/schemaFactoryRecursive.spec.ts @@ -10,7 +10,7 @@ import { strict as assert } from "node:assert"; import { createIdCompressor } from "@fluidframework/id-compressor/internal"; import { MockFluidDataStoreRuntime } from "@fluidframework/test-runtime-utils/internal"; -import { FlexListToUnion } from "../../feature-libraries/index.js"; +import { InternalFlexListTypes } from "../../feature-libraries/index.js"; import { ApplyKind, FieldSchema, @@ -123,7 +123,7 @@ describe("SchemaFactory Recursive methods", () => { : "zzz"; type XTypes = XSchema extends FieldSchemaUnsafe ? Types : "Q"; type Field3 = TreeNodeFromImplicitAllowedTypes; - type Field4 = FlexListToUnion; + type Field4 = InternalFlexListTypes.FlexListToUnion; type _check1 = requireTrue>; type _check2 = requireTrue>; diff --git a/packages/framework/fluid-framework/api-report/fluid-framework.api.md b/packages/framework/fluid-framework/api-report/fluid-framework.api.md index faa868c88bf0..a8db9650d54a 100644 --- a/packages/framework/fluid-framework/api-report/fluid-framework.api.md +++ b/packages/framework/fluid-framework/api-report/fluid-framework.api.md @@ -144,7 +144,7 @@ export interface FieldSchemaUnsafe = readonly LazyItem[]; // @public -export type FlexListToUnion = ExtractItemType; +type FlexListToUnion = ExtractItemType; // @public export interface IBranchOrigin { @@ -314,10 +314,10 @@ export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchemaUnsafe ? ApplyKind, Kind, true> : InsertableTreeNodeFromImplicitAllowedTypesUnsafe; // @public -export type InsertableTreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes ? InsertableTypedNode> : never; +export type InsertableTreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes ? InsertableTypedNode> : never; // @public -export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends AllowedTypes ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; +export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends AllowedTypes ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; // @public export type InsertableTypedNode = (T extends { @@ -337,6 +337,13 @@ export interface InteriorSequencePlace { side: Side; } +declare namespace InternalFlexListTypes { + export { + FlexListToUnion + } +} +export { InternalFlexListTypes } + // @public export interface InternalTreeNode extends ErasedType<"@fluidframework/tree.InternalTreeNode"> { } @@ -939,10 +946,10 @@ export interface TreeNodeApi { } // @public -export type TreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; +export type TreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; // @public -export type TreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; +export type TreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; // @public export type TreeNodeSchema = TreeNodeSchemaClass | TreeNodeSchemaNonClass; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bbd811022abf..57f32c7462fb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31532,6 +31532,7 @@ packages: /clone@1.0.4: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} + requiresBuild: true /clone@2.1.2: resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==} @@ -32790,6 +32791,7 @@ packages: /defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + requiresBuild: true dependencies: clone: 1.0.4 @@ -42442,6 +42444,7 @@ packages: /prr@1.0.1: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} + requiresBuild: true /ps-node@0.1.6: resolution: {integrity: sha512-w7QJhUTbu70hpDso0YXDRNKCPNuchV8UTUZsAv0m7Qj5g85oHOJfr9drA1EjvK4nQK/bG8P97W4L6PJ3IQLoOA==} From 7bc1966f342fd8744d981b9d009a340becd6a8be Mon Sep 17 00:00:00 2001 From: Michael Zhen <112977307+zhenmichael@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:42:58 +0000 Subject: [PATCH 2/5] move simple tree types to internal --- packages/dds/tree/api-report/tree.api.md | 9 ++++++++- packages/dds/tree/src/index.ts | 2 +- packages/dds/tree/src/simple-tree/index.ts | 3 ++- packages/dds/tree/src/simple-tree/internalTypes.ts | 8 ++++++++ .../src/test/simple-tree/schemaFactoryRecursive.spec.ts | 8 ++++++-- .../fluid-framework/api-report/fluid-framework.api.md | 9 ++++++++- 6 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 packages/dds/tree/src/simple-tree/internalTypes.ts diff --git a/packages/dds/tree/api-report/tree.api.md b/packages/dds/tree/api-report/tree.api.md index b9158757b865..f663300cdfd5 100644 --- a/packages/dds/tree/api-report/tree.api.md +++ b/packages/dds/tree/api-report/tree.api.md @@ -135,7 +135,7 @@ export const Any: "Any"; export type Any = typeof Any; // @public -export type ApplyKind = { +type ApplyKind = { [FieldKind.Required]: T; [FieldKind.Optional]: T | undefined; [FieldKind.Identifier]: DefaultsAreOptional extends true ? T | undefined : T; @@ -1028,6 +1028,13 @@ declare namespace InternalFlexListTypes { } export { InternalFlexListTypes } +declare namespace InternalSimpleTreeTypes { + export { + ApplyKind + } +} +export { InternalSimpleTreeTypes } + // @public export interface InternalTreeNode extends ErasedType<"@fluidframework/tree.InternalTreeNode"> { } diff --git a/packages/dds/tree/src/index.ts b/packages/dds/tree/src/index.ts index d5c4edec6ea3..d8802b14f42d 100644 --- a/packages/dds/tree/src/index.ts +++ b/packages/dds/tree/src/index.ts @@ -290,13 +290,13 @@ export { type, WithType, AllowedTypes, - ApplyKind, FieldKind, FieldSchema, ImplicitAllowedTypes, InsertableObjectFromSchemaRecord, InsertableTreeFieldFromImplicitField, InsertableTypedNode, + InternalSimpleTreeTypes, NodeBuilderData, NodeKind, ObjectFromSchemaRecord, diff --git a/packages/dds/tree/src/simple-tree/index.ts b/packages/dds/tree/src/simple-tree/index.ts index b1d8f3f29854..194d72308c1c 100644 --- a/packages/dds/tree/src/simple-tree/index.ts +++ b/packages/dds/tree/src/simple-tree/index.ts @@ -27,7 +27,6 @@ export { type, WithType, AllowedTypes, - ApplyKind, FieldKind, FieldSchema, InsertableTreeFieldFromImplicitField, @@ -37,6 +36,8 @@ export { type FieldProps, normalizeFieldSchema, } from "./schemaTypes.js"; +import * as InternalSimpleTreeTypes from "./internalTypes.js"; +export { InternalSimpleTreeTypes }; export { SchemaFactory, type ScopedSchemaName } from "./schemaFactory.js"; export { getFlexNode } from "./proxyBinding.js"; export { treeNodeApi, TreeNodeApi, TreeChangeEvents } from "./treeNodeApi.js"; diff --git a/packages/dds/tree/src/simple-tree/internalTypes.ts b/packages/dds/tree/src/simple-tree/internalTypes.ts new file mode 100644 index 000000000000..390c2575ecf1 --- /dev/null +++ b/packages/dds/tree/src/simple-tree/internalTypes.ts @@ -0,0 +1,8 @@ +/*! + * Copyright (c) Microsoft Corporation and contributors. All rights reserved. + * Licensed under the MIT License. + */ + +// Used by public types, but not part of the desired API surface + +export { ApplyKind } from "./schemaTypes.js"; diff --git a/packages/dds/tree/src/test/simple-tree/schemaFactoryRecursive.spec.ts b/packages/dds/tree/src/test/simple-tree/schemaFactoryRecursive.spec.ts index 0ae40348acef..c074e1960604 100644 --- a/packages/dds/tree/src/test/simple-tree/schemaFactoryRecursive.spec.ts +++ b/packages/dds/tree/src/test/simple-tree/schemaFactoryRecursive.spec.ts @@ -12,9 +12,9 @@ import { MockFluidDataStoreRuntime } from "@fluidframework/test-runtime-utils/in import { InternalFlexListTypes } from "../../feature-libraries/index.js"; import { - ApplyKind, FieldSchema, InsertableTreeNodeFromImplicitAllowedTypes, + InternalSimpleTreeTypes, NodeFromSchema, TreeConfiguration, TreeNodeFromImplicitAllowedTypes, @@ -119,7 +119,11 @@ describe("SchemaFactory Recursive methods", () => { type XSchema = typeof ObjectRecursive.info.x; type Field2 = XSchema extends FieldSchema - ? ApplyKind, Kind, false> + ? InternalSimpleTreeTypes.ApplyKind< + TreeNodeFromImplicitAllowedTypes, + Kind, + false + > : "zzz"; type XTypes = XSchema extends FieldSchemaUnsafe ? Types : "Q"; type Field3 = TreeNodeFromImplicitAllowedTypes; diff --git a/packages/framework/fluid-framework/api-report/fluid-framework.api.md b/packages/framework/fluid-framework/api-report/fluid-framework.api.md index a8db9650d54a..9bab837e5cad 100644 --- a/packages/framework/fluid-framework/api-report/fluid-framework.api.md +++ b/packages/framework/fluid-framework/api-report/fluid-framework.api.md @@ -44,7 +44,7 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils'; export type AllowedTypes = readonly LazyItem[]; // @public -export type ApplyKind = { +type ApplyKind = { [FieldKind.Required]: T; [FieldKind.Optional]: T | undefined; [FieldKind.Identifier]: DefaultsAreOptional extends true ? T | undefined : T; @@ -344,6 +344,13 @@ declare namespace InternalFlexListTypes { } export { InternalFlexListTypes } +declare namespace InternalSimpleTreeTypes { + export { + ApplyKind + } +} +export { InternalSimpleTreeTypes } + // @public export interface InternalTreeNode extends ErasedType<"@fluidframework/tree.InternalTreeNode"> { } From 8416b534823f481dff115adf49d5323325e1cd6f Mon Sep 17 00:00:00 2001 From: Michael Zhen <112977307+zhenmichael@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:47:58 +0000 Subject: [PATCH 3/5] add ExtractItemType to internalTypes --- packages/dds/tree/api-report/tree.api.md | 5 +++-- packages/dds/tree/src/feature-libraries/index.ts | 1 - .../dds/tree/src/feature-libraries/typed-schema/index.ts | 9 +-------- .../src/feature-libraries/typed-schema/internalTypes.ts | 2 +- packages/dds/tree/src/index.ts | 1 - .../fluid-framework/api-report/fluid-framework.api.md | 5 +++-- 6 files changed, 8 insertions(+), 15 deletions(-) diff --git a/packages/dds/tree/api-report/tree.api.md b/packages/dds/tree/api-report/tree.api.md index f663300cdfd5..afa7da687ebb 100644 --- a/packages/dds/tree/api-report/tree.api.md +++ b/packages/dds/tree/api-report/tree.api.md @@ -441,7 +441,7 @@ export type ExtractFromOpaque> = TOpaq export function extractFromOpaque>(value: TOpaque): ExtractFromOpaque; // @public -export type ExtractItemType = Item extends () => infer Result ? Result : Item; +type ExtractItemType = Item extends () => infer Result ? Result : Item; // @internal (undocumented) export function fail(message: string): never; @@ -1023,7 +1023,8 @@ export type InsertableTypedNodeUnsafe> = Un declare namespace InternalFlexListTypes { export { - FlexListToUnion + FlexListToUnion, + ExtractItemType } } export { InternalFlexListTypes } diff --git a/packages/dds/tree/src/feature-libraries/index.ts b/packages/dds/tree/src/feature-libraries/index.ts index 8fc289241262..df44541b7af7 100644 --- a/packages/dds/tree/src/feature-libraries/index.ts +++ b/packages/dds/tree/src/feature-libraries/index.ts @@ -161,7 +161,6 @@ export { FlexObjectNodeFields, intoStoredSchema, intoStoredSchemaCollection, - ExtractItemType, NormalizeLazyItem, FlexList, } from "./typed-schema/index.js"; diff --git a/packages/dds/tree/src/feature-libraries/typed-schema/index.ts b/packages/dds/tree/src/feature-libraries/typed-schema/index.ts index 8f3ade3ca958..676788bdb733 100644 --- a/packages/dds/tree/src/feature-libraries/typed-schema/index.ts +++ b/packages/dds/tree/src/feature-libraries/typed-schema/index.ts @@ -41,14 +41,7 @@ export { schemaLintDefault, } from "./schemaCollection.js"; -export { - FlexList, - markEager, - LazyItem, - isLazy, - ExtractItemType, - NormalizeLazyItem, -} from "./flexList.js"; +export { FlexList, markEager, LazyItem, isLazy, NormalizeLazyItem } from "./flexList.js"; import * as InternalFlexListTypes from "./internalTypes.js"; export { InternalFlexListTypes }; diff --git a/packages/dds/tree/src/feature-libraries/typed-schema/internalTypes.ts b/packages/dds/tree/src/feature-libraries/typed-schema/internalTypes.ts index 0b36c46e1aa0..0235f4c2f672 100644 --- a/packages/dds/tree/src/feature-libraries/typed-schema/internalTypes.ts +++ b/packages/dds/tree/src/feature-libraries/typed-schema/internalTypes.ts @@ -5,4 +5,4 @@ // Used by public types, but not part of the desired API surface -export { FlexListToUnion } from "./flexList.js"; +export { FlexListToUnion, ExtractItemType } from "./flexList.js"; diff --git a/packages/dds/tree/src/index.ts b/packages/dds/tree/src/index.ts index d8802b14f42d..56a3204d53f4 100644 --- a/packages/dds/tree/src/index.ts +++ b/packages/dds/tree/src/index.ts @@ -225,7 +225,6 @@ export { NormalizeFieldSchema, FlexObjectNodeFields, FlexMapFieldSchema, - ExtractItemType, LazyItem, PropertyNameFromFieldKey, ReservedObjectNodeFieldPropertyNames, diff --git a/packages/framework/fluid-framework/api-report/fluid-framework.api.md b/packages/framework/fluid-framework/api-report/fluid-framework.api.md index 9bab837e5cad..1facd65cdc5d 100644 --- a/packages/framework/fluid-framework/api-report/fluid-framework.api.md +++ b/packages/framework/fluid-framework/api-report/fluid-framework.api.md @@ -109,7 +109,7 @@ export type DeserializeCallback = (properties: PropertySet) => void; export const disposeSymbol: unique symbol; // @public -export type ExtractItemType = Item extends () => infer Result ? Result : Item; +type ExtractItemType = Item extends () => infer Result ? Result : Item; // @public export enum FieldKind { @@ -339,7 +339,8 @@ export interface InteriorSequencePlace { declare namespace InternalFlexListTypes { export { - FlexListToUnion + FlexListToUnion, + ExtractItemType } } export { InternalFlexListTypes } From b387086d375404bfa91c252252af47147e64627d Mon Sep 17 00:00:00 2001 From: Michael Zhen <112977307+zhenmichael@users.noreply.github.com> Date: Fri, 7 Jun 2024 19:53:57 +0000 Subject: [PATCH 4/5] update docs --- .../dds/tree/api-report/tree.alpha.api.md | 29 ++++++++++++++----- packages/dds/tree/api-report/tree.beta.api.md | 29 ++++++++++++++----- .../dds/tree/api-report/tree.public.api.md | 29 ++++++++++++++----- .../api-report/fluid-framework.beta.api.md | 29 ++++++++++++++----- .../api-report/fluid-framework.public.api.md | 29 ++++++++++++++----- 5 files changed, 110 insertions(+), 35 deletions(-) diff --git a/packages/dds/tree/api-report/tree.alpha.api.md b/packages/dds/tree/api-report/tree.alpha.api.md index 6717d655beda..312e4d5f4d8f 100644 --- a/packages/dds/tree/api-report/tree.alpha.api.md +++ b/packages/dds/tree/api-report/tree.alpha.api.md @@ -20,7 +20,7 @@ import type { TSchema } from '@sinclair/typebox'; export type AllowedTypes = readonly LazyItem[]; // @public -export type ApplyKind = { +type ApplyKind = { [FieldKind.Required]: T; [FieldKind.Optional]: T | undefined; [FieldKind.Identifier]: DefaultsAreOptional extends true ? T | undefined : T; @@ -44,7 +44,7 @@ export interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldP } // @public -export type ExtractItemType = Item extends () => infer Result ? Result : Item; +type ExtractItemType = Item extends () => infer Result ? Result : Item; // @public export enum FieldKind { @@ -79,7 +79,7 @@ export interface FieldSchemaUnsafe = readonly LazyItem[]; // @public -export type FlexListToUnion = ExtractItemType; +type FlexListToUnion = ExtractItemType; // @public export type ImplicitAllowedTypes = AllowedTypes | TreeNodeSchema; @@ -104,10 +104,10 @@ export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchemaUnsafe ? ApplyKind, Kind, true> : InsertableTreeNodeFromImplicitAllowedTypesUnsafe; // @public -export type InsertableTreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes ? InsertableTypedNode> : never; +export type InsertableTreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes ? InsertableTypedNode> : never; // @public -export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends AllowedTypes ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; +export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends AllowedTypes ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; // @public export type InsertableTypedNode = (T extends { @@ -119,6 +119,21 @@ export type InsertableTypedNodeUnsafe> = Un implicitlyConstructable: true; } ? NodeBuilderDataUnsafe : never); +declare namespace InternalFlexListTypes { + export { + FlexListToUnion, + ExtractItemType + } +} +export { InternalFlexListTypes } + +declare namespace InternalSimpleTreeTypes { + export { + ApplyKind + } +} +export { InternalSimpleTreeTypes } + // @public export interface InternalTreeNode extends ErasedType<"@fluidframework/tree.InternalTreeNode"> { } @@ -393,10 +408,10 @@ export interface TreeNodeApi { } // @public -export type TreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; +export type TreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; // @public -export type TreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; +export type TreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; // @public export type TreeNodeSchema = TreeNodeSchemaClass | TreeNodeSchemaNonClass; diff --git a/packages/dds/tree/api-report/tree.beta.api.md b/packages/dds/tree/api-report/tree.beta.api.md index 95ec3cde4760..d3c7983f77da 100644 --- a/packages/dds/tree/api-report/tree.beta.api.md +++ b/packages/dds/tree/api-report/tree.beta.api.md @@ -20,7 +20,7 @@ import type { TSchema } from '@sinclair/typebox'; export type AllowedTypes = readonly LazyItem[]; // @public -export type ApplyKind = { +type ApplyKind = { [FieldKind.Required]: T; [FieldKind.Optional]: T | undefined; [FieldKind.Identifier]: DefaultsAreOptional extends true ? T | undefined : T; @@ -44,7 +44,7 @@ export interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldP } // @public -export type ExtractItemType = Item extends () => infer Result ? Result : Item; +type ExtractItemType = Item extends () => infer Result ? Result : Item; // @public export enum FieldKind { @@ -79,7 +79,7 @@ export interface FieldSchemaUnsafe = readonly LazyItem[]; // @public -export type FlexListToUnion = ExtractItemType; +type FlexListToUnion = ExtractItemType; // @public export type ImplicitAllowedTypes = AllowedTypes | TreeNodeSchema; @@ -104,10 +104,10 @@ export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchemaUnsafe ? ApplyKind, Kind, true> : InsertableTreeNodeFromImplicitAllowedTypesUnsafe; // @public -export type InsertableTreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes ? InsertableTypedNode> : never; +export type InsertableTreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes ? InsertableTypedNode> : never; // @public -export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends AllowedTypes ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; +export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends AllowedTypes ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; // @public export type InsertableTypedNode = (T extends { @@ -119,6 +119,21 @@ export type InsertableTypedNodeUnsafe> = Un implicitlyConstructable: true; } ? NodeBuilderDataUnsafe : never); +declare namespace InternalFlexListTypes { + export { + FlexListToUnion, + ExtractItemType + } +} +export { InternalFlexListTypes } + +declare namespace InternalSimpleTreeTypes { + export { + ApplyKind + } +} +export { InternalSimpleTreeTypes } + // @public export interface InternalTreeNode extends ErasedType<"@fluidframework/tree.InternalTreeNode"> { } @@ -390,10 +405,10 @@ export interface TreeNodeApi { } // @public -export type TreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; +export type TreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; // @public -export type TreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; +export type TreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; // @public export type TreeNodeSchema = TreeNodeSchemaClass | TreeNodeSchemaNonClass; diff --git a/packages/dds/tree/api-report/tree.public.api.md b/packages/dds/tree/api-report/tree.public.api.md index 9038fa10c6c4..57d9edcc9e91 100644 --- a/packages/dds/tree/api-report/tree.public.api.md +++ b/packages/dds/tree/api-report/tree.public.api.md @@ -20,7 +20,7 @@ import type { TSchema } from '@sinclair/typebox'; export type AllowedTypes = readonly LazyItem[]; // @public -export type ApplyKind = { +type ApplyKind = { [FieldKind.Required]: T; [FieldKind.Optional]: T | undefined; [FieldKind.Identifier]: DefaultsAreOptional extends true ? T | undefined : T; @@ -44,7 +44,7 @@ export interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldP } // @public -export type ExtractItemType = Item extends () => infer Result ? Result : Item; +type ExtractItemType = Item extends () => infer Result ? Result : Item; // @public export enum FieldKind { @@ -79,7 +79,7 @@ export interface FieldSchemaUnsafe = readonly LazyItem[]; // @public -export type FlexListToUnion = ExtractItemType; +type FlexListToUnion = ExtractItemType; // @public export type ImplicitAllowedTypes = AllowedTypes | TreeNodeSchema; @@ -104,10 +104,10 @@ export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchemaUnsafe ? ApplyKind, Kind, true> : InsertableTreeNodeFromImplicitAllowedTypesUnsafe; // @public -export type InsertableTreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes ? InsertableTypedNode> : never; +export type InsertableTreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes ? InsertableTypedNode> : never; // @public -export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends AllowedTypes ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; +export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends AllowedTypes ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; // @public export type InsertableTypedNode = (T extends { @@ -119,6 +119,21 @@ export type InsertableTypedNodeUnsafe> = Un implicitlyConstructable: true; } ? NodeBuilderDataUnsafe : never); +declare namespace InternalFlexListTypes { + export { + FlexListToUnion, + ExtractItemType + } +} +export { InternalFlexListTypes } + +declare namespace InternalSimpleTreeTypes { + export { + ApplyKind + } +} +export { InternalSimpleTreeTypes } + // @public export interface InternalTreeNode extends ErasedType<"@fluidframework/tree.InternalTreeNode"> { } @@ -390,10 +405,10 @@ export interface TreeNodeApi { } // @public -export type TreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; +export type TreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; // @public -export type TreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; +export type TreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; // @public export type TreeNodeSchema = TreeNodeSchemaClass | TreeNodeSchemaNonClass; diff --git a/packages/framework/fluid-framework/api-report/fluid-framework.beta.api.md b/packages/framework/fluid-framework/api-report/fluid-framework.beta.api.md index ad36f4ece29c..3b6079ecc37f 100644 --- a/packages/framework/fluid-framework/api-report/fluid-framework.beta.api.md +++ b/packages/framework/fluid-framework/api-report/fluid-framework.beta.api.md @@ -44,7 +44,7 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils'; export type AllowedTypes = readonly LazyItem[]; // @public -export type ApplyKind = { +type ApplyKind = { [FieldKind.Required]: T; [FieldKind.Optional]: T | undefined; [FieldKind.Identifier]: DefaultsAreOptional extends true ? T | undefined : T; @@ -103,7 +103,7 @@ export interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldP } // @public -export type ExtractItemType = Item extends () => infer Result ? Result : Item; +type ExtractItemType = Item extends () => infer Result ? Result : Item; // @public export enum FieldKind { @@ -138,7 +138,7 @@ export interface FieldSchemaUnsafe = readonly LazyItem[]; // @public -export type FlexListToUnion = ExtractItemType; +type FlexListToUnion = ExtractItemType; // @public export interface IConnection { @@ -206,10 +206,10 @@ export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchemaUnsafe ? ApplyKind, Kind, true> : InsertableTreeNodeFromImplicitAllowedTypesUnsafe; // @public -export type InsertableTreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes ? InsertableTypedNode> : never; +export type InsertableTreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes ? InsertableTypedNode> : never; // @public -export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends AllowedTypes ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; +export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends AllowedTypes ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; // @public export type InsertableTypedNode = (T extends { @@ -221,6 +221,21 @@ export type InsertableTypedNodeUnsafe> = Un implicitlyConstructable: true; } ? NodeBuilderDataUnsafe : never); +declare namespace InternalFlexListTypes { + export { + FlexListToUnion, + ExtractItemType + } +} +export { InternalFlexListTypes } + +declare namespace InternalSimpleTreeTypes { + export { + ApplyKind + } +} +export { InternalSimpleTreeTypes } + // @public export interface InternalTreeNode extends ErasedType<"@fluidframework/tree.InternalTreeNode"> { } @@ -519,10 +534,10 @@ export interface TreeNodeApi { } // @public -export type TreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; +export type TreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; // @public -export type TreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; +export type TreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; // @public export type TreeNodeSchema = TreeNodeSchemaClass | TreeNodeSchemaNonClass; diff --git a/packages/framework/fluid-framework/api-report/fluid-framework.public.api.md b/packages/framework/fluid-framework/api-report/fluid-framework.public.api.md index 3235b38e07ef..963c171e49e7 100644 --- a/packages/framework/fluid-framework/api-report/fluid-framework.public.api.md +++ b/packages/framework/fluid-framework/api-report/fluid-framework.public.api.md @@ -44,7 +44,7 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils'; export type AllowedTypes = readonly LazyItem[]; // @public -export type ApplyKind = { +type ApplyKind = { [FieldKind.Required]: T; [FieldKind.Optional]: T | undefined; [FieldKind.Identifier]: DefaultsAreOptional extends true ? T | undefined : T; @@ -103,7 +103,7 @@ export interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldP } // @public -export type ExtractItemType = Item extends () => infer Result ? Result : Item; +type ExtractItemType = Item extends () => infer Result ? Result : Item; // @public export enum FieldKind { @@ -138,7 +138,7 @@ export interface FieldSchemaUnsafe = readonly LazyItem[]; // @public -export type FlexListToUnion = ExtractItemType; +type FlexListToUnion = ExtractItemType; // @public export interface IConnection { @@ -206,10 +206,10 @@ export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchemaUnsafe ? ApplyKind, Kind, true> : InsertableTreeNodeFromImplicitAllowedTypesUnsafe; // @public -export type InsertableTreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes ? InsertableTypedNode> : never; +export type InsertableTreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? InsertableTypedNode : TSchema extends AllowedTypes ? InsertableTypedNode> : never; // @public -export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends AllowedTypes ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; +export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends AllowedTypes ? InsertableTypedNodeUnsafe> : InsertableTypedNodeUnsafe; // @public export type InsertableTypedNode = (T extends { @@ -221,6 +221,21 @@ export type InsertableTypedNodeUnsafe> = Un implicitlyConstructable: true; } ? NodeBuilderDataUnsafe : never); +declare namespace InternalFlexListTypes { + export { + FlexListToUnion, + ExtractItemType + } +} +export { InternalFlexListTypes } + +declare namespace InternalSimpleTreeTypes { + export { + ApplyKind + } +} +export { InternalSimpleTreeTypes } + // @public export interface InternalTreeNode extends ErasedType<"@fluidframework/tree.InternalTreeNode"> { } @@ -519,10 +534,10 @@ export interface TreeNodeApi { } // @public -export type TreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; +export type TreeNodeFromImplicitAllowedTypes = TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; // @public -export type TreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; +export type TreeNodeFromImplicitAllowedTypesUnsafe> = TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes : TSchema extends TreeNodeSchema ? NodeFromSchema : TSchema extends AllowedTypes ? NodeFromSchema> : unknown; // @public export type TreeNodeSchema = TreeNodeSchemaClass | TreeNodeSchemaNonClass; From f384fc803703a7240c1c99113efde869c58318a5 Mon Sep 17 00:00:00 2001 From: Michael Zhen <112977307+zhenmichael@users.noreply.github.com> Date: Tue, 11 Jun 2024 17:24:25 +0000 Subject: [PATCH 5/5] remove pnpm-lock changes --- pnpm-lock.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b5230877f029..70f3e973cc5d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31595,7 +31595,6 @@ packages: /clone@1.0.4: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} - requiresBuild: true /clone@2.1.2: resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==} @@ -32854,7 +32853,6 @@ packages: /defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} - requiresBuild: true dependencies: clone: 1.0.4 @@ -42537,7 +42535,6 @@ packages: /prr@1.0.1: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} - requiresBuild: true /ps-node@0.1.6: resolution: {integrity: sha512-w7QJhUTbu70hpDso0YXDRNKCPNuchV8UTUZsAv0m7Qj5g85oHOJfr9drA1EjvK4nQK/bG8P97W4L6PJ3IQLoOA==}