fluid-framework 2.32.0 → 2.33.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.
@@ -4,20 +4,17 @@
4
4
 
5
5
  ```ts
6
6
 
7
- // @public
7
+ // @public @system
8
8
  export type AllowedTypes = readonly LazyItem<TreeNodeSchema>[];
9
9
 
10
- // @public
11
- type AllowedTypesUnsafe = readonly LazyItem<TreeNodeSchemaUnsafe>[];
12
-
13
- // @public
10
+ // @public @system
14
11
  type ApplyKind<T, Kind extends FieldKind> = {
15
12
  [FieldKind.Required]: T;
16
13
  [FieldKind.Optional]: T | undefined;
17
14
  [FieldKind.Identifier]: T;
18
15
  }[Kind];
19
16
 
20
- // @public
17
+ // @public @system
21
18
  type ApplyKindInput<T, Kind extends FieldKind, DefaultsAreOptional extends boolean> = [
22
19
  Kind
23
20
  ] extends [FieldKind.Required] ? T : [Kind] extends [FieldKind.Optional] ? T | undefined : [Kind] extends [FieldKind.Identifier] ? DefaultsAreOptional extends true ? T | undefined : T : never;
@@ -70,11 +67,11 @@ export interface ContainerSchema {
70
67
  readonly initialObjects: Record<string, SharedObjectKind>;
71
68
  }
72
69
 
73
- // @public @sealed
70
+ // @public @sealed @system
74
71
  interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldProvider"> {
75
72
  }
76
73
 
77
- // @alpha (undocumented)
74
+ // @alpha @legacy (undocumented)
78
75
  export type DeserializeCallback = (properties: PropertySet) => void;
79
76
 
80
77
  // @public @sealed
@@ -83,15 +80,12 @@ export abstract class ErasedType<out Name = unknown> {
83
80
  protected abstract brand(dummy: never): Name;
84
81
  }
85
82
 
86
- // @public
83
+ // @public @system
87
84
  type ExtractItemType<Item extends LazyItem> = Item extends () => infer Result ? Result : Item;
88
85
 
89
- // @public
86
+ // @public @system
90
87
  type FieldHasDefault<T extends ImplicitFieldSchema> = T extends FieldSchema<FieldKind.Optional | FieldKind.Identifier> ? true : false;
91
88
 
92
- // @public @sealed
93
- type FieldHasDefaultUnsafe<T extends ImplicitFieldSchemaUnsafe> = T extends FieldSchemaUnsafe<FieldKind.Optional | FieldKind.Identifier, ImplicitAllowedTypesUnsafe> ? true : false;
94
-
95
89
  // @public
96
90
  export enum FieldKind {
97
91
  Identifier = 2,
@@ -127,22 +121,15 @@ export interface FieldSchemaMetadata<TCustomMetadata = unknown> {
127
121
  readonly description?: string | undefined;
128
122
  }
129
123
 
130
- // @public @sealed
131
- export interface FieldSchemaUnsafe<out Kind extends FieldKind, out Types extends ImplicitAllowedTypesUnsafe, out TCustomMetadata = unknown> extends FieldSchema<Kind, any, TCustomMetadata> {
132
- readonly allowedTypes: Types;
133
- readonly allowedTypeSet: ReadonlySet<TreeNodeSchema>;
134
- readonly kind: Kind;
135
- }
136
-
137
- // @public
124
+ // @public @system
138
125
  type FlattenKeys<T> = [{
139
126
  [Property in keyof T]: T[Property];
140
127
  }][_InlineTrick];
141
128
 
142
- // @public
129
+ // @public @system
143
130
  type FlexList<Item = unknown> = readonly LazyItem<Item>[];
144
131
 
145
- // @public
132
+ // @public @system
146
133
  type FlexListToUnion<TList extends FlexList> = ExtractItemType<TList[number]>;
147
134
 
148
135
  // @public
@@ -153,7 +140,7 @@ export type FluidObject<T = unknown> = {
153
140
  // @public
154
141
  export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
155
142
 
156
- // @alpha
143
+ // @alpha @legacy
157
144
  export interface IBranchOrigin {
158
145
  id: string;
159
146
  minimumSequenceNumber: number;
@@ -169,7 +156,7 @@ export interface IConnection {
169
156
  // @public
170
157
  export type ICriticalContainerError = IErrorBase;
171
158
 
172
- // @public @sealed
159
+ // @public @sealed @legacy
173
160
  export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryEvents>, Partial<IDisposable> {
174
161
  readonly absolutePath: string;
175
162
  countSubDirectory?(): number;
@@ -183,7 +170,7 @@ export interface IDirectory extends Map<string, any>, IEventProvider<IDirectoryE
183
170
  subdirectories(): IterableIterator<[string, IDirectory]>;
184
171
  }
185
172
 
186
- // @public @sealed
173
+ // @public @sealed @legacy
187
174
  export interface IDirectoryEvents extends IEvent {
188
175
  (event: "containedValueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
189
176
  (event: "subDirectoryCreated", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
@@ -192,7 +179,7 @@ export interface IDirectoryEvents extends IEvent {
192
179
  (event: "undisposed", listener: (target: IEventThisPlaceHolder) => void): any;
193
180
  }
194
181
 
195
- // @public @sealed
182
+ // @public @sealed @legacy
196
183
  export interface IDirectoryValueChanged extends IValueChanged {
197
184
  path: string;
198
185
  }
@@ -435,7 +422,7 @@ export interface IFluidLoadable extends IProvideFluidLoadable {
435
422
  readonly handle: IFluidHandle;
436
423
  }
437
424
 
438
- // @alpha
425
+ // @alpha @legacy
439
426
  export interface IInterval {
440
427
  // (undocumented)
441
428
  clone(): IInterval;
@@ -448,7 +435,7 @@ export interface IInterval {
448
435
  union(b: IInterval): IInterval;
449
436
  }
450
437
 
451
- // @alpha @deprecated
438
+ // @alpha @deprecated @legacy
452
439
  export interface IIntervalCollection<TInterval extends ISerializableInterval> extends TypedEventEmitter<IIntervalCollectionEvent<TInterval>> {
453
440
  // (undocumented)
454
441
  [Symbol.iterator](): Iterator<TInterval>;
@@ -489,7 +476,7 @@ export interface IIntervalCollection<TInterval extends ISerializableInterval> ex
489
476
  removeIntervalById(id: string): TInterval | undefined;
490
477
  }
491
478
 
492
- // @alpha
479
+ // @alpha @deprecated @legacy
493
480
  export interface IIntervalCollectionEvent<TInterval extends ISerializableInterval> extends IEvent {
494
481
  (event: "changeInterval", listener: (interval: TInterval, previousInterval: TInterval, local: boolean, op: ISequencedDocumentMessage | undefined, slide: boolean) => void): void;
495
482
  (event: "addInterval" | "deleteInterval", listener: (interval: TInterval, local: boolean, op: ISequencedDocumentMessage | undefined) => void): void;
@@ -506,27 +493,21 @@ export interface IMember {
506
493
  // @public
507
494
  export type ImplicitAllowedTypes = AllowedTypes | TreeNodeSchema;
508
495
 
509
- // @public
510
- export type ImplicitAllowedTypesUnsafe = TreeNodeSchemaUnsafe | readonly LazyItem<Unenforced<TreeNodeSchema>>[];
511
-
512
496
  // @public
513
497
  export type ImplicitFieldSchema = FieldSchema | ImplicitAllowedTypes;
514
498
 
515
- // @public
516
- export type ImplicitFieldSchemaUnsafe = FieldSchemaUnsafe<FieldKind, ImplicitAllowedTypesUnsafe> | ImplicitAllowedTypesUnsafe;
517
-
518
499
  // @public
519
500
  export type InitialObjects<T extends ContainerSchema> = {
520
501
  [K in keyof T["initialObjects"]]: T["initialObjects"][K] extends SharedObjectKind<infer TChannel> ? TChannel : never;
521
502
  };
522
503
 
523
- // @public
504
+ // @public @system
524
505
  type _InlineTrick = 0;
525
506
 
526
- // @public
507
+ // @public @system
527
508
  export type Input<T extends never> = T;
528
509
 
529
- // @public
510
+ // @public @system
530
511
  type InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = RestrictiveStringRecord<ImplicitFieldSchema> extends T ? {
531
512
  arbitraryKey: "arbitraryValue";
532
513
  } extends T ? Record<string, never> : never : FlattenKeys<{
@@ -535,45 +516,25 @@ type InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<Implicit
535
516
  readonly [Property in keyof T as FieldHasDefault<T[Property & string]> extends false ? Property : never]: InsertableTreeFieldFromImplicitField<T[Property & string]>;
536
517
  }>;
537
518
 
538
- // @public
539
- export type InsertableObjectFromSchemaRecordUnsafe<T extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>> = {
540
- readonly [Property in keyof T as FieldHasDefaultUnsafe<T[Property & string]> extends false ? Property : never]: InsertableTreeFieldFromImplicitFieldUnsafe<T[Property & string]>;
541
- } & {
542
- readonly [Property in keyof T as FieldHasDefaultUnsafe<T[Property & string]> extends true ? Property : never]?: InsertableTreeFieldFromImplicitFieldUnsafe<T[Property & string]>;
543
- };
544
-
545
519
  // @public
546
520
  export type InsertableTreeFieldFromImplicitField<TSchemaInput extends ImplicitFieldSchema, TSchema = UnionToIntersection<TSchemaInput>> = [TSchema] extends [FieldSchema<infer Kind, infer Types>] ? ApplyKindInput<InsertableTreeNodeFromImplicitAllowedTypes<Types>, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TSchema> : never;
547
521
 
548
- // @public
549
- export type InsertableTreeFieldFromImplicitFieldUnsafe<TSchemaInput extends ImplicitFieldSchemaUnsafe, TSchema = UnionToIntersection<TSchemaInput>> = [TSchema] extends [FieldSchemaUnsafe<infer Kind, infer Types>] ? ApplyKindInput<InsertableTreeNodeFromImplicitAllowedTypesUnsafe<Types>, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TSchema> : never;
550
-
551
- // @public
552
- export type InsertableTreeNodeFromAllowedTypes<TList extends AllowedTypes> = TList extends readonly [
522
+ // @public @system
523
+ export type InsertableTreeNodeFromAllowedTypes<TList extends AllowedTypes> = [TList] extends [
524
+ readonly [
553
525
  LazyItem<infer TSchema extends TreeNodeSchema>,
554
526
  ...infer Rest extends AllowedTypes
527
+ ]
555
528
  ] ? InsertableTypedNode<TSchema> | InsertableTreeNodeFromAllowedTypes<Rest> : never;
556
529
 
557
- // @public
558
- export type InsertableTreeNodeFromAllowedTypesUnsafe<TList extends AllowedTypesUnsafe> = TList extends readonly [
559
- LazyItem<infer TSchema extends TreeNodeSchemaUnsafe>,
560
- ...infer Rest extends AllowedTypesUnsafe
561
- ] ? InsertableTypedNodeUnsafe<TSchema> | InsertableTreeNodeFromAllowedTypesUnsafe<Rest> : never;
562
-
563
530
  // @public
564
531
  export type InsertableTreeNodeFromImplicitAllowedTypes<TSchema extends ImplicitAllowedTypes> = [
565
532
  TSchema
566
533
  ] extends [TreeNodeSchema] ? InsertableTypedNode<TSchema> : [TSchema] extends [AllowedTypes] ? InsertableTreeNodeFromAllowedTypes<TSchema> : never;
567
534
 
568
- // @public
569
- export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TSchema extends ImplicitAllowedTypesUnsafe> = [TSchema] extends [TreeNodeSchemaUnsafe] ? InsertableTypedNodeUnsafe<TSchema> : [TSchema] extends [AllowedTypesUnsafe] ? InsertableTreeNodeFromAllowedTypesUnsafe<TSchema> : never;
570
-
571
535
  // @public
572
536
  export type InsertableTypedNode<TSchema extends TreeNodeSchema, T = UnionToIntersection<TSchema>> = (T extends TreeNodeSchema<string, NodeKind, TreeNode | TreeLeafValue, never, true> ? NodeBuilderData<T> : never) | (T extends TreeNodeSchema ? Unhydrated<TreeNode extends NodeFromSchema<T> ? never : NodeFromSchema<T>> : never);
573
537
 
574
- // @public
575
- type InsertableTypedNodeUnsafe<TSchema extends TreeNodeSchemaUnsafe, T = UnionToIntersection<TSchema>> = (T extends TreeNodeSchemaUnsafe<string, NodeKind, TreeNode | TreeLeafValue, never, true> ? NodeBuilderDataUnsafe<T> : never) | (T extends TreeNodeSchemaUnsafe ? NodeFromSchemaUnsafe<T> : never);
576
-
577
538
  export { InteriorSequencePlace }
578
539
 
579
540
  // @public @sealed
@@ -592,24 +553,6 @@ declare namespace InternalTypes {
592
553
  DefaultProvider,
593
554
  typeNameSymbol,
594
555
  InsertableObjectFromSchemaRecord,
595
- ObjectFromSchemaRecord,
596
- FieldHasDefaultUnsafe,
597
- ObjectFromSchemaRecordUnsafe,
598
- TreeObjectNodeUnsafe,
599
- TreeFieldFromImplicitFieldUnsafe,
600
- TreeNodeFromImplicitAllowedTypesUnsafe,
601
- InsertableTreeNodeFromImplicitAllowedTypesUnsafe,
602
- TreeArrayNodeUnsafe,
603
- TreeMapNodeUnsafe,
604
- InsertableObjectFromSchemaRecordUnsafe,
605
- InsertableTreeFieldFromImplicitFieldUnsafe,
606
- InsertableTypedNodeUnsafe,
607
- NodeBuilderDataUnsafe,
608
- NodeFromSchemaUnsafe,
609
- ReadonlyMapInlined,
610
- TreeNodeSchemaUnsafe,
611
- AllowedTypesUnsafe,
612
- TreeNodeSchemaNonClassUnsafe,
613
556
  FlexList,
614
557
  FlexListToUnion,
615
558
  ExtractItemType,
@@ -618,13 +561,13 @@ declare namespace InternalTypes {
618
561
  }
619
562
  export { InternalTypes }
620
563
 
621
- // @alpha
564
+ // @alpha @deprecated @legacy
622
565
  export interface IntervalIndex<TInterval extends ISerializableInterval> {
623
566
  add(interval: TInterval): void;
624
567
  remove(interval: TInterval): void;
625
568
  }
626
569
 
627
- // @alpha
570
+ // @alpha @legacy
628
571
  export const IntervalStickiness: {
629
572
  readonly NONE: 0;
630
573
  readonly START: 1;
@@ -632,10 +575,10 @@ export const IntervalStickiness: {
632
575
  readonly FULL: 3;
633
576
  };
634
577
 
635
- // @alpha
578
+ // @alpha @legacy
636
579
  export type IntervalStickiness = (typeof IntervalStickiness)[keyof typeof IntervalStickiness];
637
580
 
638
- // @alpha (undocumented)
581
+ // @alpha @legacy (undocumented)
639
582
  export enum IntervalType {
640
583
  // (undocumented)
641
584
  Simple = 0,
@@ -648,7 +591,7 @@ export interface IProvideFluidLoadable {
648
591
  readonly IFluidLoadable: IFluidLoadable;
649
592
  }
650
593
 
651
- // @alpha
594
+ // @alpha @legacy
652
595
  export interface ISequencedDocumentMessage {
653
596
  clientId: string | null;
654
597
  clientSequenceNumber: number;
@@ -669,7 +612,7 @@ export interface ISequencedDocumentMessage {
669
612
  type: string;
670
613
  }
671
614
 
672
- // @alpha
615
+ // @alpha @legacy
673
616
  export interface ISequenceDeltaRange<TOperation extends MergeTreeDeltaOperationTypes = MergeTreeDeltaOperationTypes> {
674
617
  operation: TOperation;
675
618
  position: number;
@@ -677,7 +620,7 @@ export interface ISequenceDeltaRange<TOperation extends MergeTreeDeltaOperationT
677
620
  segment: ISegment;
678
621
  }
679
622
 
680
- // @alpha
623
+ // @alpha @legacy
681
624
  export interface ISequenceIntervalCollection extends TypedEventEmitter<ISequenceIntervalCollectionEvents> {
682
625
  // (undocumented)
683
626
  [Symbol.iterator](): Iterator<SequenceInterval>;
@@ -718,7 +661,7 @@ export interface ISequenceIntervalCollection extends TypedEventEmitter<ISequence
718
661
  removeIntervalById(id: string): SequenceInterval | undefined;
719
662
  }
720
663
 
721
- // @alpha
664
+ // @alpha @legacy
722
665
  export interface ISequenceIntervalCollectionEvents extends IEvent {
723
666
  (event: "changeInterval", listener: (interval: SequenceInterval, previousInterval: SequenceInterval, local: boolean, op: ISequencedDocumentMessage | undefined, slide: boolean) => void): void;
724
667
  (event: "addInterval" | "deleteInterval", listener: (interval: SequenceInterval, local: boolean, op: ISequencedDocumentMessage | undefined) => void): void;
@@ -726,7 +669,7 @@ export interface ISequenceIntervalCollectionEvents extends IEvent {
726
669
  (event: "changed", listener: (interval: SequenceInterval, propertyDeltas: PropertySet, previousInterval: SequenceInterval | undefined, local: boolean, slide: boolean) => void): void;
727
670
  }
728
671
 
729
- // @alpha (undocumented)
672
+ // @alpha @legacy (undocumented)
730
673
  export interface ISerializableInterval extends IInterval {
731
674
  getIntervalId(): string;
732
675
  properties: PropertySet;
@@ -734,7 +677,7 @@ export interface ISerializableInterval extends IInterval {
734
677
  serialize(): ISerializedInterval;
735
678
  }
736
679
 
737
- // @alpha
680
+ // @alpha @legacy
738
681
  export interface ISerializedInterval {
739
682
  end: number | "start" | "end";
740
683
  // (undocumented)
@@ -767,7 +710,7 @@ export interface IServiceAudienceEvents<M extends IMember> extends IEvent {
767
710
  // @public
768
711
  export function isFluidHandle(value: unknown): value is IFluidHandle;
769
712
 
770
- // @alpha @sealed
713
+ // @alpha @sealed @legacy
771
714
  export interface ISharedDirectory extends ISharedObject<ISharedDirectoryEvents & IDirectoryEvents>, Omit<IDirectory, "on" | "once" | "off"> {
772
715
  // (undocumented)
773
716
  [Symbol.iterator](): IterableIterator<[string, any]>;
@@ -775,7 +718,7 @@ export interface ISharedDirectory extends ISharedObject<ISharedDirectoryEvents &
775
718
  readonly [Symbol.toStringTag]: string;
776
719
  }
777
720
 
778
- // @alpha @sealed
721
+ // @alpha @sealed @legacy
779
722
  export interface ISharedDirectoryEvents extends ISharedObjectEvents {
780
723
  (event: "valueChanged", listener: (changed: IDirectoryValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
781
724
  (event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
@@ -783,30 +726,30 @@ export interface ISharedDirectoryEvents extends ISharedObjectEvents {
783
726
  (event: "subDirectoryDeleted", listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
784
727
  }
785
728
 
786
- // @alpha (undocumented)
729
+ // @alpha @deprecated @legacy (undocumented)
787
730
  export interface ISharedIntervalCollection<TInterval extends ISerializableInterval> {
788
731
  // (undocumented)
789
732
  getIntervalCollection(label: string): IIntervalCollection<TInterval>;
790
733
  }
791
734
 
792
- // @alpha @sealed
735
+ // @alpha @sealed @legacy
793
736
  export interface ISharedMap extends ISharedObject<ISharedMapEvents>, Map<string, any> {
794
737
  get<T = any>(key: string): T | undefined;
795
738
  set<T = unknown>(key: string, value: T): this;
796
739
  }
797
740
 
798
- // @alpha @sealed
741
+ // @alpha @sealed @legacy
799
742
  export interface ISharedMapEvents extends ISharedObjectEvents {
800
743
  (event: "valueChanged", listener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void): any;
801
744
  (event: "clear", listener: (local: boolean, target: IEventThisPlaceHolder) => void): any;
802
745
  }
803
746
 
804
- // @alpha
747
+ // @alpha @legacy
805
748
  export interface ISharedObject<TEvent extends ISharedObjectEvents = ISharedObjectEvents> extends IChannel, IEventProvider<TEvent> {
806
749
  bindToContext(): void;
807
750
  }
808
751
 
809
- // @alpha
752
+ // @alpha @legacy
810
753
  export interface ISharedObjectEvents extends IErrorEvent {
811
754
  // @eventProperty
812
755
  (event: "pre-op", listener: (op: ISequencedDocumentMessage, local: boolean, target: IEventThisPlaceHolder) => void): any;
@@ -814,7 +757,7 @@ export interface ISharedObjectEvents extends IErrorEvent {
814
757
  (event: "op", listener: (op: ISequencedDocumentMessage, local: boolean, target: IEventThisPlaceHolder) => void): any;
815
758
  }
816
759
 
817
- // @alpha (undocumented)
760
+ // @alpha @legacy (undocumented)
818
761
  export interface ISharedSegmentSequence<T extends ISegment> extends ISharedObject<ISharedSegmentSequenceEvents>, MergeTreeRevertibleDriver {
819
762
  annotateAdjustRange(start: number, end: number, adjust: MapLike<AdjustParams>): void;
820
763
  annotateRange(start: number, end: number, props: PropertySet): void;
@@ -852,7 +795,7 @@ export interface ISharedSegmentSequence<T extends ISegment> extends ISharedObjec
852
795
  walkSegments<TClientData>(handler: ISegmentAction<TClientData>, start?: number, end?: number, accum?: TClientData, splitRange?: boolean): void;
853
796
  }
854
797
 
855
- // @alpha
798
+ // @alpha @legacy
856
799
  export interface ISharedSegmentSequenceEvents extends ISharedObjectEvents {
857
800
  // (undocumented)
858
801
  (event: "createIntervalCollection", listener: (label: string, local: boolean, target: IEventThisPlaceHolder) => void): void;
@@ -862,7 +805,7 @@ export interface ISharedSegmentSequenceEvents extends ISharedObjectEvents {
862
805
  (event: "maintenance", listener: (event: SequenceMaintenanceEvent, target: IEventThisPlaceHolder) => void): void;
863
806
  }
864
807
 
865
- // @alpha
808
+ // @alpha @legacy
866
809
  export interface ISharedString extends ISharedSegmentSequence<SharedStringSegment> {
867
810
  annotateMarker(marker: Marker, props: PropertySet): void;
868
811
  getMarkerFromId(id: string): ISegment | undefined;
@@ -892,7 +835,7 @@ export class IterableTreeArrayContent<T> implements Iterable<T> {
892
835
  [Symbol.iterator](): Iterator<T>;
893
836
  }
894
837
 
895
- // @alpha
838
+ // @alpha @legacy
896
839
  export interface ITrace {
897
840
  action: string;
898
841
  service: string;
@@ -914,7 +857,7 @@ export interface ITreeViewConfiguration<TSchema extends ImplicitFieldSchema = Im
914
857
  readonly schema: TSchema;
915
858
  }
916
859
 
917
- // @public @sealed
860
+ // @public @sealed @legacy
918
861
  export interface IValueChanged {
919
862
  readonly key: string;
920
863
  readonly previousValue: any;
@@ -923,7 +866,7 @@ export interface IValueChanged {
923
866
  // @public
924
867
  export type LazyItem<Item = unknown> = Item | (() => Item);
925
868
 
926
- // @public @sealed
869
+ // @public @sealed @system
927
870
  export interface LeafSchema<Name extends string, T extends TreeLeafValue> extends TreeNodeSchemaNonClass<`com.fluidframework.leaf.${Name}`, NodeKind.Leaf, T, T, true> {
928
871
  }
929
872
 
@@ -942,7 +885,7 @@ export type Listeners<T extends object> = {
942
885
  export interface MakeNominal {
943
886
  }
944
887
 
945
- // @public
888
+ // @public @system
946
889
  export type MapNodeInsertableData<T extends ImplicitAllowedTypes> = Iterable<readonly [string, InsertableTreeNodeFromImplicitAllowedTypes<T>]> | RestrictiveStringRecord<InsertableTreeNodeFromImplicitAllowedTypes<T>>;
947
890
 
948
891
  // @public
@@ -953,18 +896,12 @@ export type Myself<M extends IMember = IMember> = M & {
953
896
  readonly currentConnection: string;
954
897
  };
955
898
 
956
- // @public
899
+ // @public @system
957
900
  type NodeBuilderData<T extends TreeNodeSchemaCore<string, NodeKind, boolean>> = T extends TreeNodeSchemaCore<string, NodeKind, boolean, unknown, infer TBuild> ? TBuild : never;
958
901
 
959
- // @public
960
- type NodeBuilderDataUnsafe<T extends Unenforced<TreeNodeSchema>> = T extends TreeNodeSchemaUnsafe<string, NodeKind, unknown, infer TBuild> ? TBuild : never;
961
-
962
902
  // @public
963
903
  export type NodeFromSchema<T extends TreeNodeSchema> = T extends TreeNodeSchemaClass<string, NodeKind, infer TNode> ? TNode : T extends TreeNodeSchemaNonClass<string, NodeKind, infer TNode> ? TNode : never;
964
904
 
965
- // @public
966
- type NodeFromSchemaUnsafe<T extends Unenforced<TreeNodeSchema>> = T extends TreeNodeSchemaUnsafe<string, NodeKind, infer TNode> ? TNode : never;
967
-
968
905
  // @public
969
906
  export interface NodeInDocumentConstraint {
970
907
  // (undocumented)
@@ -992,39 +929,18 @@ export interface NodeSchemaOptions<out TCustomMetadata = unknown> {
992
929
  readonly metadata?: NodeSchemaMetadata<TCustomMetadata> | undefined;
993
930
  }
994
931
 
995
- // @public
996
- type ObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = RestrictiveStringRecord<ImplicitFieldSchema> extends T ? {} : {
932
+ // @public @system
933
+ export type ObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = RestrictiveStringRecord<ImplicitFieldSchema> extends T ? {} : {
997
934
  -readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitField<T[Property]> : unknown;
998
935
  };
999
936
 
1000
- // @public
1001
- type ObjectFromSchemaRecordUnsafe<T extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>> = {
1002
- -readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitFieldUnsafe<T[Property]> : unknown;
1003
- };
1004
-
1005
937
  // @public
1006
938
  export type Off = () => void;
1007
939
 
1008
- // @public @sealed
940
+ // @public @sealed @system
1009
941
  export interface ReadonlyArrayNode<out T = TreeNode | TreeLeafValue> extends ReadonlyArray<T>, Awaited<TreeNode & WithType<string, NodeKind.Array>> {
1010
942
  }
1011
943
 
1012
- // @public @sealed
1013
- interface ReadonlyMapInlined<K, T extends ImplicitAllowedTypesUnsafe> {
1014
- [Symbol.iterator](): IterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;
1015
- entries(): IterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;
1016
- // (undocumented)
1017
- forEach(callbackfn: (value: TreeNodeFromImplicitAllowedTypesUnsafe<T>, key: K, map: ReadonlyMap<K, TreeNodeFromImplicitAllowedTypesUnsafe<T>>) => void, thisArg?: any): void;
1018
- // (undocumented)
1019
- get(key: K): TreeNodeFromImplicitAllowedTypesUnsafe<T> | undefined;
1020
- // (undocumented)
1021
- has(key: K): boolean;
1022
- keys(): IterableIterator<K>;
1023
- // (undocumented)
1024
- readonly size: number;
1025
- values(): IterableIterator<TreeNodeFromImplicitAllowedTypesUnsafe<T>>;
1026
- }
1027
-
1028
944
  // @public
1029
945
  export type ReplaceIEventThisPlaceHolder<L extends any[], TThis> = L extends any[] ? {
1030
946
  [K in keyof L]: L[K] extends IEventThisPlaceHolder ? TThis : L[K];
@@ -1035,7 +951,7 @@ export type RestrictiveReadonlyRecord<K extends symbol | string, T> = {
1035
951
  readonly [P in symbol | string]: P extends K ? T : never;
1036
952
  };
1037
953
 
1038
- // @public
954
+ // @public @system
1039
955
  export type RestrictiveStringRecord<T> = {
1040
956
  readonly [P in string]: T;
1041
957
  } & {
@@ -1093,8 +1009,8 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
1093
1009
  scope: TScope);
1094
1010
  array<const T extends TreeNodeSchema | readonly TreeNodeSchema[]>(allowedTypes: T): TreeNodeSchemaNonClass<ScopedSchemaName<TScope, `Array<${string}>`>, NodeKind.Array, TreeArrayNode<T> & WithType<ScopedSchemaName<TScope, `Array<${string}>`>, NodeKind.Array>, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>, true, T, undefined>;
1095
1011
  array<const Name extends TName, const T extends ImplicitAllowedTypes>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Array, TreeArrayNode<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Array>, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>, true, T, undefined>;
1096
- arrayRecursive<const Name extends TName, const T extends ImplicitAllowedTypesUnsafe>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Array, TreeArrayNodeUnsafe<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Array, unknown>, {
1097
- [Symbol.iterator](): Iterator<InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>;
1012
+ arrayRecursive<const Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Array, System_Unsafe.TreeArrayNodeUnsafe<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Array, unknown>, {
1013
+ [Symbol.iterator](): Iterator<System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>;
1098
1014
  }, false, T, undefined>;
1099
1015
  readonly boolean: LeafSchema<"boolean", boolean>;
1100
1016
  static readonly boolean: LeafSchema<"boolean", boolean>;
@@ -1105,34 +1021,34 @@ export class SchemaFactory<out TScope extends string | undefined = string | unde
1105
1021
  static readonly leaves: readonly [LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
1106
1022
  map<const T extends TreeNodeSchema | readonly TreeNodeSchema[]>(allowedTypes: T): TreeNodeSchemaNonClass<ScopedSchemaName<TScope, `Map<${string}>`>, NodeKind.Map, TreeMapNode<T> & WithType<ScopedSchemaName<TScope, `Map<${string}>`>, NodeKind.Map>, MapNodeInsertableData<T>, true, T, undefined>;
1107
1023
  map<Name extends TName, const T extends ImplicitAllowedTypes>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Map, TreeMapNode<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Map>, MapNodeInsertableData<T>, true, T, undefined>;
1108
- mapRecursive<Name extends TName, const T extends ImplicitAllowedTypesUnsafe>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Map, TreeMapNodeUnsafe<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Map, unknown>, {
1024
+ mapRecursive<Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Map, System_Unsafe.TreeMapNodeUnsafe<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Map, unknown>, {
1109
1025
  [Symbol.iterator](): Iterator<[
1110
1026
  string,
1111
- InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>
1027
+ System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>
1112
1028
  ]>;
1113
1029
  } | {
1114
- readonly [x: string]: InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;
1030
+ readonly [x: string]: System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>;
1115
1031
  }, false, T, undefined>;
1116
1032
  readonly null: LeafSchema<"null", null>;
1117
1033
  static readonly null: LeafSchema<"null", null>;
1118
1034
  readonly number: LeafSchema<"number", number>;
1119
1035
  static readonly number: LeafSchema<"number", number>;
1120
1036
  object<const Name extends TName, const T extends RestrictiveStringRecord<ImplicitFieldSchema>>(name: Name, fields: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, TreeObjectNode<T, ScopedSchemaName<TScope, Name>>, object & InsertableObjectFromSchemaRecord<T>, true, T>;
1121
- objectRecursive<const Name extends TName, const T extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>>(name: Name, t: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>, object & InsertableObjectFromSchemaRecordUnsafe<T>, false, T>;
1037
+ objectRecursive<const Name extends TName, const T extends RestrictiveStringRecord<System_Unsafe.ImplicitFieldSchemaUnsafe>>(name: Name, t: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, System_Unsafe.TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>, object & System_Unsafe.InsertableObjectFromSchemaRecordUnsafe<T>, false, T>;
1122
1038
  readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
1123
1039
  static readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
1124
- readonly optionalRecursive: <const T extends ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
1125
- static readonly optionalRecursive: <const T extends ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
1040
+ readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
1041
+ static readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
1126
1042
  readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
1127
1043
  static readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
1128
- readonly requiredRecursive: <const T extends ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
1129
- static readonly requiredRecursive: <const T extends ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
1044
+ readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
1045
+ static readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
1130
1046
  readonly scope: TScope;
1131
1047
  readonly string: LeafSchema<"string", string>;
1132
1048
  static readonly string: LeafSchema<"string", string>;
1133
1049
  }
1134
1050
 
1135
- // @public @sealed
1051
+ // @public @sealed @system
1136
1052
  export interface SchemaStatics {
1137
1053
  readonly boolean: LeafSchema<"boolean", boolean>;
1138
1054
  readonly handle: LeafSchema<"handle", IFluidHandle>;
@@ -1146,23 +1062,23 @@ export interface SchemaStatics {
1146
1062
  readonly null: LeafSchema<"null", null>;
1147
1063
  readonly number: LeafSchema<"number", number>;
1148
1064
  readonly optional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">) => FieldSchema<FieldKind.Optional, T, TCustomMetadata>;
1149
- readonly optionalRecursive: <const T extends ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">) => FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
1065
+ readonly optionalRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, T, TCustomMetadata>;
1150
1066
  readonly required: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">) => FieldSchema<FieldKind.Required, T, TCustomMetadata>;
1151
- readonly requiredRecursive: <const T extends ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">) => FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
1067
+ readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider">) => System_Unsafe.FieldSchemaUnsafe<FieldKind.Required, T, TCustomMetadata>;
1152
1068
  readonly string: LeafSchema<"string", string>;
1153
1069
  }
1154
1070
 
1155
- // @public
1071
+ // @public @system
1156
1072
  type ScopedSchemaName<TScope extends string | undefined, TName extends number | string> = TScope extends undefined ? `${TName}` : `${TScope}.${TName}`;
1157
1073
 
1158
- // @alpha
1074
+ // @alpha @legacy
1159
1075
  export interface SequenceDeltaEvent extends SequenceEvent<MergeTreeDeltaOperationType> {
1160
1076
  readonly isLocal: boolean;
1161
1077
  // (undocumented)
1162
1078
  readonly opArgs: IMergeTreeDeltaOpArgs;
1163
1079
  }
1164
1080
 
1165
- // @alpha
1081
+ // @alpha @legacy
1166
1082
  export interface SequenceEvent<TOperation extends MergeTreeDeltaOperationTypes = MergeTreeDeltaOperationTypes> {
1167
1083
  readonly clientId: string | undefined;
1168
1084
  // (undocumented)
@@ -1174,7 +1090,7 @@ export interface SequenceEvent<TOperation extends MergeTreeDeltaOperationTypes =
1174
1090
  readonly ranges: readonly Readonly<ISequenceDeltaRange<TOperation>>[];
1175
1091
  }
1176
1092
 
1177
- // @alpha
1093
+ // @alpha @legacy
1178
1094
  export interface SequenceInterval extends ISerializableInterval {
1179
1095
  addPositionChangeListeners(beforePositionChange: () => void, afterPositionChange: () => void): void;
1180
1096
  // (undocumented)
@@ -1202,13 +1118,13 @@ export interface SequenceInterval extends ISerializableInterval {
1202
1118
  union(b: SequenceInterval): SequenceInterval;
1203
1119
  }
1204
1120
 
1205
- // @alpha
1121
+ // @alpha @legacy
1206
1122
  export interface SequenceIntervalIndex {
1207
1123
  add(interval: SequenceInterval): void;
1208
1124
  remove(interval: SequenceInterval): void;
1209
1125
  }
1210
1126
 
1211
- // @alpha
1127
+ // @alpha @legacy
1212
1128
  export interface SequenceMaintenanceEvent extends SequenceEvent<MergeTreeMaintenanceType> {
1213
1129
  // (undocumented)
1214
1130
  readonly opArgs: IMergeTreeDeltaOpArgs | undefined;
@@ -1216,16 +1132,16 @@ export interface SequenceMaintenanceEvent extends SequenceEvent<MergeTreeMainten
1216
1132
 
1217
1133
  export { SequencePlace }
1218
1134
 
1219
- // @alpha
1135
+ // @alpha @legacy
1220
1136
  export const SharedDirectory: ISharedObjectKind<ISharedDirectory> & SharedObjectKind_2<ISharedDirectory>;
1221
1137
 
1222
- // @alpha
1138
+ // @alpha @legacy
1223
1139
  export type SharedDirectory = ISharedDirectory;
1224
1140
 
1225
- // @alpha
1141
+ // @alpha @legacy
1226
1142
  export const SharedMap: ISharedObjectKind<ISharedMap> & SharedObjectKind_2<ISharedMap>;
1227
1143
 
1228
- // @alpha
1144
+ // @alpha @legacy
1229
1145
  export type SharedMap = ISharedMap;
1230
1146
 
1231
1147
  // @public @sealed
@@ -1233,13 +1149,13 @@ export interface SharedObjectKind<out TSharedObject = unknown> extends ErasedTyp
1233
1149
  is(value: IFluidLoadable): value is IFluidLoadable & TSharedObject;
1234
1150
  }
1235
1151
 
1236
- // @alpha
1152
+ // @alpha @legacy
1237
1153
  export const SharedString: ISharedObjectKind<ISharedString> & SharedObjectKind_2<ISharedString>;
1238
1154
 
1239
- // @alpha
1155
+ // @alpha @legacy
1240
1156
  export type SharedString = ISharedString;
1241
1157
 
1242
- // @alpha (undocumented)
1158
+ // @alpha @legacy (undocumented)
1243
1159
  export type SharedStringSegment = TextSegment | Marker;
1244
1160
 
1245
1161
  // @public
@@ -1247,12 +1163,100 @@ export const SharedTree: SharedObjectKind<ITree>;
1247
1163
 
1248
1164
  export { Side }
1249
1165
 
1250
- // @public @sealed
1166
+ // @public @sealed @system
1251
1167
  export interface SimpleNodeSchemaBase<out TNodeKind extends NodeKind, out TCustomMetadata = unknown> {
1252
1168
  readonly kind: TNodeKind;
1253
1169
  readonly metadata: NodeSchemaMetadata<TCustomMetadata>;
1254
1170
  }
1255
1171
 
1172
+ // @public @system
1173
+ export namespace System_Unsafe {
1174
+ // @system
1175
+ export type AllowedTypesUnsafe = readonly LazyItem<TreeNodeSchemaUnsafe>[];
1176
+ // @sealed @system
1177
+ export type FieldHasDefaultUnsafe<T extends ImplicitFieldSchemaUnsafe> = T extends FieldSchemaUnsafe<FieldKind.Optional | FieldKind.Identifier, ImplicitAllowedTypesUnsafe> ? true : false;
1178
+ // @sealed @system
1179
+ export interface FieldSchemaUnsafe<out Kind extends FieldKind, out Types extends ImplicitAllowedTypesUnsafe, out TCustomMetadata = unknown> extends FieldSchema<Kind, any, TCustomMetadata> {
1180
+ readonly allowedTypes: Types;
1181
+ readonly allowedTypeSet: ReadonlySet<TreeNodeSchema>;
1182
+ readonly kind: Kind;
1183
+ }
1184
+ // @system
1185
+ export type ImplicitAllowedTypesUnsafe = TreeNodeSchemaUnsafe | readonly LazyItem<Unenforced<TreeNodeSchema>>[];
1186
+ // @system
1187
+ export type ImplicitFieldSchemaUnsafe = FieldSchemaUnsafe<FieldKind, ImplicitAllowedTypesUnsafe> | ImplicitAllowedTypesUnsafe;
1188
+ // @system
1189
+ export type InsertableObjectFromSchemaRecordUnsafe<T extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>> = {
1190
+ readonly [Property in keyof T as FieldHasDefaultUnsafe<T[Property & string]> extends false ? Property : never]: InsertableTreeFieldFromImplicitFieldUnsafe<T[Property & string]>;
1191
+ } & {
1192
+ readonly [Property in keyof T as FieldHasDefaultUnsafe<T[Property & string]> extends true ? Property : never]?: InsertableTreeFieldFromImplicitFieldUnsafe<T[Property & string]>;
1193
+ };
1194
+ // @system
1195
+ export type InsertableTreeFieldFromImplicitFieldUnsafe<TSchemaInput extends ImplicitFieldSchemaUnsafe, TSchema = UnionToIntersection<TSchemaInput>> = [TSchema] extends [FieldSchemaUnsafe<infer Kind, infer Types>] ? ApplyKindInput<InsertableTreeNodeFromImplicitAllowedTypesUnsafe<Types>, Kind, true> : [TSchema] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TSchema> : never;
1196
+ // @system
1197
+ export type InsertableTreeNodeFromAllowedTypesUnsafe<TList extends AllowedTypesUnsafe> = [
1198
+ TList
1199
+ ] extends [
1200
+ readonly [
1201
+ LazyItem<infer TSchema extends TreeNodeSchemaUnsafe>,
1202
+ ...infer Rest extends AllowedTypesUnsafe
1203
+ ]
1204
+ ] ? InsertableTypedNodeUnsafe<TSchema> | InsertableTreeNodeFromAllowedTypesUnsafe<Rest> : never;
1205
+ // @system
1206
+ export type InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TSchema extends ImplicitAllowedTypesUnsafe> = [TSchema] extends [TreeNodeSchemaUnsafe] ? InsertableTypedNodeUnsafe<TSchema> : [TSchema] extends [AllowedTypesUnsafe] ? InsertableTreeNodeFromAllowedTypesUnsafe<TSchema> : never;
1207
+ // @system
1208
+ export type InsertableTypedNodeUnsafe<TSchema extends TreeNodeSchemaUnsafe, T = UnionToIntersection<TSchema>> = (T extends TreeNodeSchemaUnsafe<string, NodeKind, TreeNode | TreeLeafValue, never, true> ? NodeBuilderDataUnsafe<T> : never) | (T extends TreeNodeSchemaUnsafe ? NodeFromSchemaUnsafe<T> : never);
1209
+ // @system
1210
+ export type NodeBuilderDataUnsafe<T extends Unenforced<TreeNodeSchema>> = T extends TreeNodeSchemaUnsafe<string, NodeKind, unknown, infer TBuild> ? TBuild : never;
1211
+ // @system
1212
+ export type NodeFromSchemaUnsafe<T extends Unenforced<TreeNodeSchema>> = T extends TreeNodeSchemaUnsafe<string, NodeKind, infer TNode> ? TNode : never;
1213
+ // @system
1214
+ export type ObjectFromSchemaRecordUnsafe<T extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>> = {
1215
+ -readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitFieldUnsafe<T[Property]> : unknown;
1216
+ };
1217
+ // @sealed @system
1218
+ export interface ReadonlyMapInlined<K, T extends ImplicitAllowedTypesUnsafe> {
1219
+ [Symbol.iterator](): IterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;
1220
+ entries(): IterableIterator<[K, TreeNodeFromImplicitAllowedTypesUnsafe<T>]>;
1221
+ // (undocumented)
1222
+ forEach(callbackfn: (value: TreeNodeFromImplicitAllowedTypesUnsafe<T>, key: K, map: ReadonlyMap<K, TreeNodeFromImplicitAllowedTypesUnsafe<T>>) => void, thisArg?: any): void;
1223
+ // (undocumented)
1224
+ get(key: K): TreeNodeFromImplicitAllowedTypesUnsafe<T> | undefined;
1225
+ // (undocumented)
1226
+ has(key: K): boolean;
1227
+ keys(): IterableIterator<K>;
1228
+ // (undocumented)
1229
+ readonly size: number;
1230
+ values(): IterableIterator<TreeNodeFromImplicitAllowedTypesUnsafe<T>>;
1231
+ }
1232
+ // @sealed @system
1233
+ export interface TreeArrayNodeUnsafe<TAllowedTypes extends ImplicitAllowedTypesUnsafe> extends TreeArrayNode<TAllowedTypes, TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>, InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>> {
1234
+ }
1235
+ // @system
1236
+ export type TreeFieldFromImplicitFieldUnsafe<TSchema extends ImplicitFieldSchemaUnsafe> = TSchema extends FieldSchemaUnsafe<infer Kind, infer Types> ? ApplyKind<TreeNodeFromImplicitAllowedTypesUnsafe<Types>, Kind> : TSchema extends ImplicitAllowedTypesUnsafe ? TreeNodeFromImplicitAllowedTypesUnsafe<TSchema> : unknown;
1237
+ // @sealed @system
1238
+ export interface TreeMapNodeUnsafe<T extends ImplicitAllowedTypesUnsafe> extends ReadonlyMapInlined<string, T>, TreeNode {
1239
+ delete(key: string): void;
1240
+ set(key: string, value: InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T> | undefined): void;
1241
+ }
1242
+ // @system
1243
+ export type TreeNodeFromImplicitAllowedTypesUnsafe<TSchema extends ImplicitAllowedTypesUnsafe> = TSchema extends TreeNodeSchemaUnsafe ? NodeFromSchemaUnsafe<TSchema> : TSchema extends AllowedTypesUnsafe ? NodeFromSchemaUnsafe<FlexListToUnion<TSchema>> : unknown;
1244
+ // @system
1245
+ export interface TreeNodeSchemaClassUnsafe<out Name extends string, out Kind extends NodeKind, out TNode extends Unenforced<TreeNode>, in TInsertable, out ImplicitlyConstructable extends boolean, out Info, out TCustomMetadata = unknown> extends TreeNodeSchemaCore<Name, Kind, ImplicitlyConstructable, Info, never, TCustomMetadata> {
1246
+ // @sealed
1247
+ new (data: TInsertable | InternalTreeNode): Unhydrated<TNode>;
1248
+ }
1249
+ // @system
1250
+ export interface TreeNodeSchemaNonClassUnsafe<out Name extends string, out Kind extends NodeKind, out TNode extends Unenforced<TreeNode | TreeLeafValue>, in TInsertable, out ImplicitlyConstructable extends boolean, out Info = unknown> extends TreeNodeSchemaCore<Name, Kind, ImplicitlyConstructable, Info> {
1251
+ // (undocumented)
1252
+ create(data: TInsertable): TNode;
1253
+ }
1254
+ // @system
1255
+ export type TreeNodeSchemaUnsafe<Name extends string = string, Kind extends NodeKind = NodeKind, TNode extends Unenforced<TreeNode | TreeLeafValue> = unknown, TBuild = never, ImplicitlyConstructable extends boolean = boolean, Info = unknown> = TreeNodeSchemaClassUnsafe<Name, Kind, TNode, TBuild, ImplicitlyConstructable, Info> | TreeNodeSchemaNonClassUnsafe<Name, Kind, TNode, TBuild, ImplicitlyConstructable, Info>;
1256
+ // @system
1257
+ export type TreeObjectNodeUnsafe<T extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>, TypeName extends string = string> = TreeNode & ObjectFromSchemaRecordUnsafe<T> & WithType<TypeName, NodeKind.Object, T>;
1258
+ }
1259
+
1256
1260
  // @public
1257
1261
  export interface Tagged<V, T extends string = string> {
1258
1262
  // (undocumented)
@@ -1273,14 +1277,14 @@ export type TransformedEvent<TThis, E, A extends any[]> = (event: E, listener: (
1273
1277
  // @public
1274
1278
  export const Tree: TreeApi;
1275
1279
 
1276
- // @public @sealed
1280
+ // @public @sealed @system
1277
1281
  interface TreeApi extends TreeNodeApi {
1278
1282
  contains(node: TreeNode, other: TreeNode): boolean;
1279
1283
  readonly runTransaction: RunTransaction;
1280
1284
  }
1281
1285
 
1282
1286
  // @public @sealed
1283
- export interface TreeArrayNode<TAllowedTypes extends ImplicitAllowedTypesUnsafe = ImplicitAllowedTypes, out T = [TAllowedTypes] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TAllowedTypes> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, in TNew = [TAllowedTypes] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TAllowedTypes> : InsertableTreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, in TMoveFrom = ReadonlyArrayNode> extends ReadonlyArrayNode<T> {
1287
+ export interface TreeArrayNode<TAllowedTypes extends System_Unsafe.ImplicitAllowedTypesUnsafe = ImplicitAllowedTypes, out T = [TAllowedTypes] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TAllowedTypes> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, in TNew = [TAllowedTypes] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TAllowedTypes> : InsertableTreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, in TMoveFrom = ReadonlyArrayNode> extends ReadonlyArrayNode<T> {
1284
1288
  insertAt(index: number, ...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;
1285
1289
  insertAtEnd(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;
1286
1290
  insertAtStart(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;
@@ -1306,10 +1310,6 @@ export const TreeArrayNode: {
1306
1310
  readonly spread: <T>(content: Iterable<T>) => IterableTreeArrayContent<T>;
1307
1311
  };
1308
1312
 
1309
- // @public @sealed
1310
- export interface TreeArrayNodeUnsafe<TAllowedTypes extends ImplicitAllowedTypesUnsafe> extends TreeArrayNode<TAllowedTypes, TreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>, InsertableTreeNodeFromImplicitAllowedTypesUnsafe<TAllowedTypes>> {
1311
- }
1312
-
1313
1313
  // @public @sealed
1314
1314
  export interface TreeChangeEvents {
1315
1315
  nodeChanged(unstable?: unknown): void;
@@ -1319,9 +1319,6 @@ export interface TreeChangeEvents {
1319
1319
  // @public
1320
1320
  export type TreeFieldFromImplicitField<TSchema extends ImplicitFieldSchema = FieldSchema> = TSchema extends FieldSchema<infer Kind, infer Types> ? ApplyKind<TreeNodeFromImplicitAllowedTypes<Types>, Kind> : TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes<TSchema> : TreeNode | TreeLeafValue | undefined;
1321
1321
 
1322
- // @public
1323
- type TreeFieldFromImplicitFieldUnsafe<TSchema extends ImplicitFieldSchemaUnsafe> = TSchema extends FieldSchemaUnsafe<infer Kind, infer Types> ? ApplyKind<TreeNodeFromImplicitAllowedTypesUnsafe<Types>, Kind> : TSchema extends ImplicitAllowedTypesUnsafe ? TreeNodeFromImplicitAllowedTypesUnsafe<TSchema> : unknown;
1324
-
1325
1322
  // @public
1326
1323
  export type TreeLeafValue = number | string | boolean | IFluidHandle | null;
1327
1324
 
@@ -1335,12 +1332,6 @@ export interface TreeMapNode<T extends ImplicitAllowedTypes = ImplicitAllowedTyp
1335
1332
  values(): IterableIterator<TreeNodeFromImplicitAllowedTypes<T>>;
1336
1333
  }
1337
1334
 
1338
- // @public @sealed
1339
- export interface TreeMapNodeUnsafe<T extends ImplicitAllowedTypesUnsafe> extends ReadonlyMapInlined<string, T>, TreeNode {
1340
- delete(key: string): void;
1341
- set(key: string, value: InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T> | undefined): void;
1342
- }
1343
-
1344
1335
  // @public @sealed
1345
1336
  export abstract class TreeNode implements WithType {
1346
1337
  static [Symbol.hasInstance](value: unknown): value is TreeNode;
@@ -1365,9 +1356,6 @@ export interface TreeNodeApi {
1365
1356
  // @public
1366
1357
  export type TreeNodeFromImplicitAllowedTypes<TSchema extends ImplicitAllowedTypes = TreeNodeSchema> = TSchema extends TreeNodeSchema ? NodeFromSchema<TSchema> : TSchema extends AllowedTypes ? NodeFromSchema<FlexListToUnion<TSchema>> : unknown;
1367
1358
 
1368
- // @public
1369
- type TreeNodeFromImplicitAllowedTypesUnsafe<TSchema extends ImplicitAllowedTypesUnsafe> = TSchema extends TreeNodeSchemaUnsafe ? NodeFromSchemaUnsafe<TSchema> : TSchema extends AllowedTypesUnsafe ? NodeFromSchemaUnsafe<FlexListToUnion<TSchema>> : unknown;
1370
-
1371
1359
  // @public @sealed
1372
1360
  export type TreeNodeSchema<Name extends string = string, Kind extends NodeKind = NodeKind, TNode extends TreeNode | TreeLeafValue = TreeNode | TreeLeafValue, TBuild = never, ImplicitlyConstructable extends boolean = boolean, Info = unknown, TCustomMetadata = unknown> = (TNode extends TreeNode ? TreeNodeSchemaClass<Name, Kind, TNode, TBuild, ImplicitlyConstructable, Info, never, TCustomMetadata> : never) | TreeNodeSchemaNonClass<Name, Kind, TNode, TBuild, ImplicitlyConstructable, Info, never, TCustomMetadata>;
1373
1361
 
@@ -1378,44 +1366,27 @@ export type TreeNodeSchemaClass<Name extends string = string, Kind extends NodeK
1378
1366
  new (data: TInsertable | InternalTreeNode | TConstructorExtra): Unhydrated<TNode>;
1379
1367
  });
1380
1368
 
1381
- // @public
1382
- export interface TreeNodeSchemaClassUnsafe<out Name extends string, out Kind extends NodeKind, out TNode extends Unenforced<TreeNode>, in TInsertable, out ImplicitlyConstructable extends boolean, out Info, out TCustomMetadata = unknown> extends TreeNodeSchemaCore<Name, Kind, ImplicitlyConstructable, Info, never, TCustomMetadata> {
1383
- // @sealed
1384
- new (data: TInsertable | InternalTreeNode): Unhydrated<TNode>;
1385
- }
1386
-
1387
1369
  // @public @sealed
1388
1370
  export interface TreeNodeSchemaCore<out Name extends string, out Kind extends NodeKind, out ImplicitlyConstructable extends boolean, out Info = unknown, out TInsertable = never, out TCustomMetadata = unknown> extends SimpleNodeSchemaBase<Kind, TCustomMetadata> {
1371
+ // @system
1389
1372
  readonly childTypes: ReadonlySet<TreeNodeSchema>;
1390
- // @sealed
1373
+ // @sealed @system
1391
1374
  createFromInsertable(data: TInsertable): Unhydrated<TreeNode | TreeLeafValue>;
1392
1375
  readonly identifier: Name;
1393
1376
  readonly implicitlyConstructable: ImplicitlyConstructable;
1394
1377
  readonly info: Info;
1395
1378
  }
1396
1379
 
1397
- // @public @sealed
1380
+ // @public @sealed @system
1398
1381
  export type TreeNodeSchemaNonClass<Name extends string = string, Kind extends NodeKind = NodeKind, TNode extends TreeNode | TreeLeafValue = TreeNode | TreeLeafValue, TInsertable = never, ImplicitlyConstructable extends boolean = boolean, Info = unknown, TConstructorExtra = never, TCustomMetadata = unknown> = TreeNodeSchemaCore<Name, Kind, ImplicitlyConstructable, Info, TInsertable, TCustomMetadata> & (undefined extends TConstructorExtra ? {
1399
1382
  create(data?: TInsertable | TConstructorExtra): TNode;
1400
1383
  } : {
1401
1384
  create(data: TInsertable | TConstructorExtra): TNode;
1402
1385
  });
1403
1386
 
1404
- // @public
1405
- interface TreeNodeSchemaNonClassUnsafe<out Name extends string, out Kind extends NodeKind, out TNode extends Unenforced<TreeNode | TreeLeafValue>, in TInsertable, out ImplicitlyConstructable extends boolean, out Info = unknown> extends TreeNodeSchemaCore<Name, Kind, ImplicitlyConstructable, Info> {
1406
- // (undocumented)
1407
- create(data: TInsertable): TNode;
1408
- }
1409
-
1410
- // @public
1411
- type TreeNodeSchemaUnsafe<Name extends string = string, Kind extends NodeKind = NodeKind, TNode extends Unenforced<TreeNode | TreeLeafValue> = unknown, TBuild = never, ImplicitlyConstructable extends boolean = boolean, Info = unknown> = TreeNodeSchemaClassUnsafe<Name, Kind, TNode, TBuild, ImplicitlyConstructable, Info> | TreeNodeSchemaNonClassUnsafe<Name, Kind, TNode, TBuild, ImplicitlyConstructable, Info>;
1412
-
1413
1387
  // @public
1414
1388
  export type TreeObjectNode<T extends RestrictiveStringRecord<ImplicitFieldSchema>, TypeName extends string = string> = TreeNode & ObjectFromSchemaRecord<T> & WithType<TypeName, NodeKind.Object, T>;
1415
1389
 
1416
- // @public
1417
- export type TreeObjectNodeUnsafe<T extends RestrictiveStringRecord<ImplicitFieldSchemaUnsafe>, TypeName extends string = string> = TreeNode & ObjectFromSchemaRecordUnsafe<T> & WithType<TypeName, NodeKind.Object, T>;
1418
-
1419
1390
  // @public
1420
1391
  export enum TreeStatus {
1421
1392
  Deleted = 2,
@@ -1452,10 +1423,10 @@ export interface TreeViewEvents {
1452
1423
  schemaChanged(): void;
1453
1424
  }
1454
1425
 
1455
- // @public @deprecated
1426
+ // @public @deprecated @system
1456
1427
  const typeNameSymbol: unique symbol;
1457
1428
 
1458
- // @public
1429
+ // @public @system
1459
1430
  export const typeSchemaSymbol: unique symbol;
1460
1431
 
1461
1432
  // @public
@@ -1464,7 +1435,7 @@ export type Unenforced<_DesiredExtendsConstraint> = unknown;
1464
1435
  // @public
1465
1436
  export type Unhydrated<T> = T;
1466
1437
 
1467
- // @public
1438
+ // @public @system
1468
1439
  export type UnionToIntersection<T> = (T extends T ? (k: T) => unknown : never) extends (k: infer U) => unknown ? U : never;
1469
1440
 
1470
1441
  // @public
@@ -1478,7 +1449,7 @@ export type ValidateRecursiveSchema<T extends TreeNodeSchemaClass<string, NodeKi
1478
1449
  [NodeKind.Map]: ImplicitAllowedTypes;
1479
1450
  }[T["kind"]]>> = true;
1480
1451
 
1481
- // @public @sealed
1452
+ // @public @sealed @system
1482
1453
  export interface ViewableTree {
1483
1454
  viewWith<TRoot extends ImplicitFieldSchema>(config: TreeViewConfiguration<TRoot>): TreeView<TRoot>;
1484
1455
  }