diff --git a/packages/dds/tree/api-report/tree.alpha.api.md b/packages/dds/tree/api-report/tree.alpha.api.md index 96c3754d6d41..1f9bd343be8a 100644 --- a/packages/dds/tree/api-report/tree.alpha.api.md +++ b/packages/dds/tree/api-report/tree.alpha.api.md @@ -246,7 +246,7 @@ export type InsertableObjectFromSchemaRecordUnsafe> = [TSchema] extends [FieldSchema] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes : never; +export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchema ? ApplyKindInput, Kind, true> : TSchema extends ImplicitAllowedTypes ? InsertableTreeNodeFromImplicitAllowedTypes : never; // @public export type InsertableTreeFieldFromImplicitFieldUnsafe, TSchema = UnionToIntersection> = [TSchema] extends [FieldSchemaUnsafe] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypesUnsafe : never; @@ -479,9 +479,11 @@ export const noopValidator: JsonValidator; // @public type ObjectFromSchemaRecord> = { - -readonly [Property in keyof T as Property extends string ? [AssignableTreeFieldFromImplicitField] extends [never] ? never : Property : never]: Property extends string ? TreeFieldFromImplicitField : unknown; + -readonly [Property in keyof T as [ + AssignableTreeFieldFromImplicitField + ] extends [never | undefined] ? never : Property]: TreeFieldFromImplicitField; } & { - readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitField : unknown; + readonly [Property in keyof T]: TreeFieldFromImplicitField; }; // @public diff --git a/packages/dds/tree/api-report/tree.beta.api.md b/packages/dds/tree/api-report/tree.beta.api.md index c102e49d9a8c..d01416239694 100644 --- a/packages/dds/tree/api-report/tree.beta.api.md +++ b/packages/dds/tree/api-report/tree.beta.api.md @@ -132,7 +132,7 @@ export type InsertableObjectFromSchemaRecordUnsafe> = [TSchema] extends [FieldSchema] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes : never; +export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchema ? ApplyKindInput, Kind, true> : TSchema extends ImplicitAllowedTypes ? InsertableTreeNodeFromImplicitAllowedTypes : never; // @public export type InsertableTreeFieldFromImplicitFieldUnsafe, TSchema = UnionToIntersection> = [TSchema] extends [FieldSchemaUnsafe] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypesUnsafe : never; @@ -284,9 +284,11 @@ export enum NodeKind { // @public type ObjectFromSchemaRecord> = { - -readonly [Property in keyof T as Property extends string ? [AssignableTreeFieldFromImplicitField] extends [never] ? never : Property : never]: Property extends string ? TreeFieldFromImplicitField : unknown; + -readonly [Property in keyof T as [ + AssignableTreeFieldFromImplicitField + ] extends [never | undefined] ? never : Property]: TreeFieldFromImplicitField; } & { - readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitField : unknown; + readonly [Property in keyof T]: TreeFieldFromImplicitField; }; // @public diff --git a/packages/dds/tree/api-report/tree.legacy.alpha.api.md b/packages/dds/tree/api-report/tree.legacy.alpha.api.md index 4adf43db3e23..cec77ed4c5b4 100644 --- a/packages/dds/tree/api-report/tree.legacy.alpha.api.md +++ b/packages/dds/tree/api-report/tree.legacy.alpha.api.md @@ -132,7 +132,7 @@ export type InsertableObjectFromSchemaRecordUnsafe> = [TSchema] extends [FieldSchema] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes : never; +export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchema ? ApplyKindInput, Kind, true> : TSchema extends ImplicitAllowedTypes ? InsertableTreeNodeFromImplicitAllowedTypes : never; // @public export type InsertableTreeFieldFromImplicitFieldUnsafe, TSchema = UnionToIntersection> = [TSchema] extends [FieldSchemaUnsafe] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypesUnsafe : never; @@ -279,9 +279,11 @@ export enum NodeKind { // @public type ObjectFromSchemaRecord> = { - -readonly [Property in keyof T as Property extends string ? [AssignableTreeFieldFromImplicitField] extends [never] ? never : Property : never]: Property extends string ? TreeFieldFromImplicitField : unknown; + -readonly [Property in keyof T as [ + AssignableTreeFieldFromImplicitField + ] extends [never | undefined] ? never : Property]: TreeFieldFromImplicitField; } & { - readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitField : unknown; + readonly [Property in keyof T]: TreeFieldFromImplicitField; }; // @public diff --git a/packages/dds/tree/api-report/tree.legacy.public.api.md b/packages/dds/tree/api-report/tree.legacy.public.api.md index 835c08f84e6c..40dceae21b2e 100644 --- a/packages/dds/tree/api-report/tree.legacy.public.api.md +++ b/packages/dds/tree/api-report/tree.legacy.public.api.md @@ -132,7 +132,7 @@ export type InsertableObjectFromSchemaRecordUnsafe> = [TSchema] extends [FieldSchema] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes : never; +export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchema ? ApplyKindInput, Kind, true> : TSchema extends ImplicitAllowedTypes ? InsertableTreeNodeFromImplicitAllowedTypes : never; // @public export type InsertableTreeFieldFromImplicitFieldUnsafe, TSchema = UnionToIntersection> = [TSchema] extends [FieldSchemaUnsafe] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypesUnsafe : never; @@ -279,9 +279,11 @@ export enum NodeKind { // @public type ObjectFromSchemaRecord> = { - -readonly [Property in keyof T as Property extends string ? [AssignableTreeFieldFromImplicitField] extends [never] ? never : Property : never]: Property extends string ? TreeFieldFromImplicitField : unknown; + -readonly [Property in keyof T as [ + AssignableTreeFieldFromImplicitField + ] extends [never | undefined] ? never : Property]: TreeFieldFromImplicitField; } & { - readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitField : unknown; + readonly [Property in keyof T]: TreeFieldFromImplicitField; }; // @public diff --git a/packages/dds/tree/api-report/tree.public.api.md b/packages/dds/tree/api-report/tree.public.api.md index 835c08f84e6c..40dceae21b2e 100644 --- a/packages/dds/tree/api-report/tree.public.api.md +++ b/packages/dds/tree/api-report/tree.public.api.md @@ -132,7 +132,7 @@ export type InsertableObjectFromSchemaRecordUnsafe> = [TSchema] extends [FieldSchema] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes : never; +export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchema ? ApplyKindInput, Kind, true> : TSchema extends ImplicitAllowedTypes ? InsertableTreeNodeFromImplicitAllowedTypes : never; // @public export type InsertableTreeFieldFromImplicitFieldUnsafe, TSchema = UnionToIntersection> = [TSchema] extends [FieldSchemaUnsafe] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypesUnsafe : never; @@ -279,9 +279,11 @@ export enum NodeKind { // @public type ObjectFromSchemaRecord> = { - -readonly [Property in keyof T as Property extends string ? [AssignableTreeFieldFromImplicitField] extends [never] ? never : Property : never]: Property extends string ? TreeFieldFromImplicitField : unknown; + -readonly [Property in keyof T as [ + AssignableTreeFieldFromImplicitField + ] extends [never | undefined] ? never : Property]: TreeFieldFromImplicitField; } & { - readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitField : unknown; + readonly [Property in keyof T]: TreeFieldFromImplicitField; }; // @public diff --git a/packages/dds/tree/package.json b/packages/dds/tree/package.json index 73ef5d1e08d6..40cec6e98368 100644 --- a/packages/dds/tree/package.json +++ b/packages/dds/tree/package.json @@ -234,6 +234,13 @@ }, "Interface_InternalTypes_TreeArrayNodeBase": { "backCompat": false + }, + "TypeAlias_InsertableTreeFieldFromImplicitField": { + "backCompat": false + }, + "TypeAlias_InternalTypes_InsertableObjectFromSchemaRecord": { + "backCompat": false, + "forwardCompat": false } }, "entrypoint": "public" diff --git a/packages/dds/tree/src/test/types/validateTreePrevious.generated.ts b/packages/dds/tree/src/test/types/validateTreePrevious.generated.ts index 989b9ebdb489..7a505d71d1fe 100644 --- a/packages/dds/tree/src/test/types/validateTreePrevious.generated.ts +++ b/packages/dds/tree/src/test/types/validateTreePrevious.generated.ts @@ -673,6 +673,7 @@ declare type old_as_current_for_TypeAlias_InsertableTreeFieldFromImplicitField = * typeValidation.broken: * "TypeAlias_InsertableTreeFieldFromImplicitField": {"backCompat": false} */ +// @ts-expect-error compatibility expected to be broken declare type current_as_old_for_TypeAlias_InsertableTreeFieldFromImplicitField = requireAssignableTo>, TypeOnly>> /* @@ -961,6 +962,7 @@ declare type current_as_old_for_TypeAlias_InternalTypes_FlexListToUnion = requir * typeValidation.broken: * "TypeAlias_InternalTypes_InsertableObjectFromSchemaRecord": {"forwardCompat": false} */ +// @ts-expect-error compatibility expected to be broken declare type old_as_current_for_TypeAlias_InternalTypes_InsertableObjectFromSchemaRecord = requireAssignableTo>, TypeOnly>> /* @@ -970,6 +972,7 @@ declare type old_as_current_for_TypeAlias_InternalTypes_InsertableObjectFromSche * typeValidation.broken: * "TypeAlias_InternalTypes_InsertableObjectFromSchemaRecord": {"backCompat": false} */ +// @ts-expect-error compatibility expected to be broken declare type current_as_old_for_TypeAlias_InternalTypes_InsertableObjectFromSchemaRecord = requireAssignableTo>, TypeOnly>> /* diff --git a/packages/framework/fluid-framework/api-report/fluid-framework.alpha.api.md b/packages/framework/fluid-framework/api-report/fluid-framework.alpha.api.md index cf2d76e3f116..df4b23994db3 100644 --- a/packages/framework/fluid-framework/api-report/fluid-framework.alpha.api.md +++ b/packages/framework/fluid-framework/api-report/fluid-framework.alpha.api.md @@ -556,7 +556,7 @@ export type InsertableObjectFromSchemaRecordUnsafe> = [TSchema] extends [FieldSchema] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes : never; +export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchema ? ApplyKindInput, Kind, true> : TSchema extends ImplicitAllowedTypes ? InsertableTreeNodeFromImplicitAllowedTypes : never; // @public export type InsertableTreeFieldFromImplicitFieldUnsafe, TSchema = UnionToIntersection> = [TSchema] extends [FieldSchemaUnsafe] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypesUnsafe : never; @@ -827,9 +827,11 @@ export const noopValidator: JsonValidator; // @public type ObjectFromSchemaRecord> = { - -readonly [Property in keyof T as Property extends string ? [AssignableTreeFieldFromImplicitField] extends [never] ? never : Property : never]: Property extends string ? TreeFieldFromImplicitField : unknown; + -readonly [Property in keyof T as [ + AssignableTreeFieldFromImplicitField + ] extends [never | undefined] ? never : Property]: TreeFieldFromImplicitField; } & { - readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitField : unknown; + readonly [Property in keyof T]: TreeFieldFromImplicitField; }; // @public 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 9225c4586889..d7666521872e 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 @@ -439,7 +439,7 @@ export type InsertableObjectFromSchemaRecordUnsafe> = [TSchema] extends [FieldSchema] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes : never; +export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchema ? ApplyKindInput, Kind, true> : TSchema extends ImplicitAllowedTypes ? InsertableTreeNodeFromImplicitAllowedTypes : never; // @public export type InsertableTreeFieldFromImplicitFieldUnsafe, TSchema = UnionToIntersection> = [TSchema] extends [FieldSchemaUnsafe] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypesUnsafe : never; @@ -629,9 +629,11 @@ export enum NodeKind { // @public type ObjectFromSchemaRecord> = { - -readonly [Property in keyof T as Property extends string ? [AssignableTreeFieldFromImplicitField] extends [never] ? never : Property : never]: Property extends string ? TreeFieldFromImplicitField : unknown; + -readonly [Property in keyof T as [ + AssignableTreeFieldFromImplicitField + ] extends [never | undefined] ? never : Property]: TreeFieldFromImplicitField; } & { - readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitField : unknown; + readonly [Property in keyof T]: TreeFieldFromImplicitField; }; // @public diff --git a/packages/framework/fluid-framework/api-report/fluid-framework.legacy.alpha.api.md b/packages/framework/fluid-framework/api-report/fluid-framework.legacy.alpha.api.md index 0cdd740268b6..b43ed349d434 100644 --- a/packages/framework/fluid-framework/api-report/fluid-framework.legacy.alpha.api.md +++ b/packages/framework/fluid-framework/api-report/fluid-framework.legacy.alpha.api.md @@ -539,7 +539,7 @@ export type InsertableObjectFromSchemaRecordUnsafe> = [TSchema] extends [FieldSchema] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes : never; +export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchema ? ApplyKindInput, Kind, true> : TSchema extends ImplicitAllowedTypes ? InsertableTreeNodeFromImplicitAllowedTypes : never; // @public export type InsertableTreeFieldFromImplicitFieldUnsafe, TSchema = UnionToIntersection> = [TSchema] extends [FieldSchemaUnsafe] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypesUnsafe : never; @@ -926,9 +926,11 @@ export enum NodeKind { // @public type ObjectFromSchemaRecord> = { - -readonly [Property in keyof T as Property extends string ? [AssignableTreeFieldFromImplicitField] extends [never] ? never : Property : never]: Property extends string ? TreeFieldFromImplicitField : unknown; + -readonly [Property in keyof T as [ + AssignableTreeFieldFromImplicitField + ] extends [never | undefined] ? never : Property]: TreeFieldFromImplicitField; } & { - readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitField : unknown; + readonly [Property in keyof T]: TreeFieldFromImplicitField; }; // @public diff --git a/packages/framework/fluid-framework/api-report/fluid-framework.legacy.public.api.md b/packages/framework/fluid-framework/api-report/fluid-framework.legacy.public.api.md index 44ae800eadd0..aaba5575164e 100644 --- a/packages/framework/fluid-framework/api-report/fluid-framework.legacy.public.api.md +++ b/packages/framework/fluid-framework/api-report/fluid-framework.legacy.public.api.md @@ -467,7 +467,7 @@ export type InsertableObjectFromSchemaRecordUnsafe> = [TSchema] extends [FieldSchema] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes : never; +export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchema ? ApplyKindInput, Kind, true> : TSchema extends ImplicitAllowedTypes ? InsertableTreeNodeFromImplicitAllowedTypes : never; // @public export type InsertableTreeFieldFromImplicitFieldUnsafe, TSchema = UnionToIntersection> = [TSchema] extends [FieldSchemaUnsafe] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypesUnsafe : never; @@ -660,9 +660,11 @@ export enum NodeKind { // @public type ObjectFromSchemaRecord> = { - -readonly [Property in keyof T as Property extends string ? [AssignableTreeFieldFromImplicitField] extends [never] ? never : Property : never]: Property extends string ? TreeFieldFromImplicitField : unknown; + -readonly [Property in keyof T as [ + AssignableTreeFieldFromImplicitField + ] extends [never | undefined] ? never : Property]: TreeFieldFromImplicitField; } & { - readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitField : unknown; + readonly [Property in keyof T]: TreeFieldFromImplicitField; }; // @public 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 3e17c2124377..6c7d901bddb5 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 @@ -439,7 +439,7 @@ export type InsertableObjectFromSchemaRecordUnsafe> = [TSchema] extends [FieldSchema] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes : never; +export type InsertableTreeFieldFromImplicitField> = TSchema extends FieldSchema ? ApplyKindInput, Kind, true> : TSchema extends ImplicitAllowedTypes ? InsertableTreeNodeFromImplicitAllowedTypes : never; // @public export type InsertableTreeFieldFromImplicitFieldUnsafe, TSchema = UnionToIntersection> = [TSchema] extends [FieldSchemaUnsafe] ? ApplyKindInput, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypesUnsafe : never; @@ -624,9 +624,11 @@ export enum NodeKind { // @public type ObjectFromSchemaRecord> = { - -readonly [Property in keyof T as Property extends string ? [AssignableTreeFieldFromImplicitField] extends [never] ? never : Property : never]: Property extends string ? TreeFieldFromImplicitField : unknown; + -readonly [Property in keyof T as [ + AssignableTreeFieldFromImplicitField + ] extends [never | undefined] ? never : Property]: TreeFieldFromImplicitField; } & { - readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitField : unknown; + readonly [Property in keyof T]: TreeFieldFromImplicitField; }; // @public