diff --git a/packages/dds/tree/api-report/tree.api.md b/packages/dds/tree/api-report/tree.api.md index 42ab4a3bb88f..be078b0af8aa 100644 --- a/packages/dds/tree/api-report/tree.api.md +++ b/packages/dds/tree/api-report/tree.api.md @@ -22,7 +22,7 @@ import { StableId } from '@fluidframework/runtime-definitions'; import type { Static } from '@sinclair/typebox'; import type { TSchema } from '@sinclair/typebox'; -// @alpha +// @internal export function adaptEnum>(factory: SchemaFactory, members: TEnum): ((value: TValue) => { readonly value: TValue; }) & { readonly [Property in keyof TEnum]: { @@ -35,42 +35,42 @@ export function adaptEnum[]; // @beta type AllowedTypes_2 = readonly LazyItem[]; -// @alpha +// @internal export type AllowedTypeSet = Any | ReadonlySet; -// @alpha +// @internal export type AllowedTypesToFlexInsertableTree = [ T extends readonly LazyItem[] ? InsertableFlexNode, FlexTreeNodeSchema>> : ContextuallyTypedNodeData ][_InlineTrick]; -// @alpha +// @internal export enum AllowedUpdateType { None = 0, SchemaCompatible = 1 } -// @alpha +// @internal export type AllowOptional = [FlattenKeys & OptionalFields>][_InlineTrick]; -// @alpha +// @internal export type AllowOptionalNotFlattened = [RequiredFields & OptionalFields][_InlineTrick]; -// @alpha +// @internal export type Anchor = Brand; -// @alpha +// @internal export interface AnchorEvents { afterChange(anchor: AnchorNode): void; afterDestroy(anchor: AnchorNode): void; @@ -81,19 +81,19 @@ export interface AnchorEvents { valueChanging(anchor: AnchorNode, value: Value): void; } -// @alpha +// @internal export interface AnchorLocator { locate(anchor: Anchor): AnchorNode | undefined; } -// @alpha +// @internal export interface AnchorNode extends UpPath, ISubscribable { child(key: FieldKey, index: number): UpPath; getOrCreateChildRef(key: FieldKey, index: number): [Anchor, AnchorNode]; readonly slots: BrandedMapSubset>; } -// @alpha @sealed +// @internal @sealed export class AnchorSet implements ISubscribable, AnchorLocator { constructor(); acquireVisitor(): AnnouncedVisitor & DeltaVisitor; @@ -109,19 +109,19 @@ export class AnchorSet implements ISubscribable, AnchorLoca track(path: UpPath | null): Anchor; } -// @alpha +// @internal export interface AnchorSetRootEvents { childrenChanging(anchors: AnchorSet): void; treeChanging(anchors: AnchorSet): void; } -// @alpha +// @internal export type AnchorSlot = BrandedKey>, TContent>; -// @alpha +// @internal export function anchorSlot(): AnchorSlot; -// @alpha +// @internal export interface AnnouncedVisitor { // (undocumented) afterAttach(source: FieldKey, destination: Range_2): void; @@ -140,16 +140,16 @@ export interface AnnouncedVisitor { beforeReplace(newContent: FieldKey, oldContent: Range_2, oldContentDestination: FieldKey): void; } -// @alpha +// @internal export const Any: "Any"; -// @alpha +// @internal export type Any = typeof Any; // @beta type ApplyKind = Kind extends FieldKind_2.Required ? T : undefined | T; -// @alpha +// @internal export type ApplyMultiplicity = { [Multiplicity.Forbidden]: undefined; [Multiplicity.Optional]: undefined | TypedChild; @@ -157,7 +157,7 @@ export type ApplyMultiplicity = [Multiplicity.Single]: TypedChild; }[TMultiplicity]; -// @alpha +// @internal export interface ArrayLikeMut extends ArrayLike { // (undocumented) [n: number]: TSet; @@ -166,25 +166,25 @@ export interface ArrayLikeMut extends ArrayLike< // @beta type ArrayToUnion = T extends readonly (infer TValue)[] ? TValue : never; -// @alpha +// @internal export type AssignableFieldKinds = typeof FieldKinds.optional | typeof FieldKinds.required; -// @alpha +// @internal export type Assume = [TInput] extends [TAssumeToBe] ? TInput : TAssumeToBe; -// @alpha +// @internal export type Brand = ValueType & BrandedType; -// @alpha +// @internal export function brand>(value: T extends BrandedType ? ValueType : never): T; -// @alpha +// @internal export type BrandedKey = TKey & Invariant; -// @alpha (undocumented) +// @internal (undocumented) export type BrandedKeyContent> = TKey extends BrandedKey ? TContent : never; -// @alpha +// @internal export interface BrandedMapSubset> { // (undocumented) delete(key: K): boolean; @@ -196,17 +196,17 @@ export interface BrandedMapSubset> { set(key: K2, value: BrandedKeyContent): this; } -// @alpha @sealed +// @internal @sealed export abstract class BrandedType { protected abstract brand(dummy: never): Name; // (undocumented) protected _typeCheck?: Covariant; } -// @alpha +// @internal export function buildTreeConfiguration(config: InitializeAndSchematizeConfiguration): InitializeAndSchematizeConfiguration; -// @alpha +// @internal export type ChangesetLocalId = Brand; // @beta @@ -215,13 +215,13 @@ export interface CheckoutEvents { revertible(revertible: Revertible): void; } -// @alpha +// @internal export type CheckTypesOverlap = [Extract extends never ? never : T][0]; -// @alpha +// @internal export type ChildCollection = FieldKey | RootField; -// @alpha +// @internal export interface ChildLocation { // (undocumented) readonly container: ChildCollection; @@ -229,23 +229,23 @@ export interface ChildLocation { readonly index: number; } -// @alpha +// @internal export type CollectOptions = TValueSchema extends undefined ? FlattenKeys<{ [typeNameSymbol]?: UnbrandedName; } & (TValueSchema extends ValueSchema ? { [valueSymbol]: TreeValue; } : EmptyObject)> & TTypedFields : TValueSchema extends ValueSchema ? TreeValue : undefined; -// @alpha +// @internal export function compareLocalNodeKeys(a: LocalNodeKey, b: LocalNodeKey): -1 | 0 | 1; -// @alpha +// @internal export type ContextuallyTypedFieldData = ContextuallyTypedNodeData | undefined; -// @alpha +// @internal export type ContextuallyTypedNodeData = ContextuallyTypedNodeDataObject | number | string | boolean | null | readonly ContextuallyTypedNodeData[] | MarkedArrayLike; -// @alpha +// @internal export interface ContextuallyTypedNodeDataObject { readonly [typeNameSymbol]?: string; readonly [valueSymbol]?: Value; @@ -253,22 +253,22 @@ export interface ContextuallyTypedNodeDataObject { [key: string]: ContextuallyTypedFieldData; } -// @alpha +// @internal export interface Contravariant { // (undocumented) _removeCovariance?: (_: T) => void; } -// @alpha +// @internal export interface Covariant { // (undocumented) _removeContravariance?: T; } -// @alpha +// @internal export function createEmitter>(noListeners?: NoListenersCallback): ISubscribable & IEmitter & HasListeners; -// @alpha +// @internal export interface CursorAdapter { // (undocumented) getFieldFromNode(node: TNode, key: FieldKey): readonly TNode[]; @@ -280,28 +280,28 @@ export interface CursorAdapter { value(node: TNode): Value; } -// @alpha +// @internal export function cursorForTypedTreeData(context: TreeDataContext, schema: T, data: InsertableFlexNode): ITreeCursorSynchronous; -// @alpha +// @internal export function cursorFromContextualData(context: TreeDataContext, typeSet: AllowedTypeSet, data: ContextuallyTypedNodeData): ITreeCursorSynchronous; -// @alpha (undocumented) +// @internal (undocumented) export const enum CursorLocationType { Fields = 1, Nodes = 0 } -// @alpha +// @internal export interface CursorWithNode extends ITreeCursorSynchronous { fork(): CursorWithNode; getNode(): TNode; } -// @alpha +// @internal export const defaultSchemaPolicy: FullSchemaPolicy; -// @alpha +// @internal export interface DeltaDetachedNodeBuild { // (undocumented) readonly id: DeltaDetachedNodeId; @@ -309,7 +309,7 @@ export interface DeltaDetachedNodeBuild { readonly trees: readonly TTree[]; } -// @alpha +// @internal export interface DeltaDetachedNodeChanges { // (undocumented) readonly fields: DeltaFieldMap; @@ -317,7 +317,7 @@ export interface DeltaDetachedNodeChanges { readonly id: DeltaDetachedNodeId; } -// @alpha +// @internal export interface DeltaDetachedNodeDestruction { // (undocumented) readonly count: number; @@ -325,7 +325,7 @@ export interface DeltaDetachedNodeDestruction { readonly id: DeltaDetachedNodeId; } -// @alpha +// @internal export interface DeltaDetachedNodeId { // (undocumented) readonly major?: string | number; @@ -333,7 +333,7 @@ export interface DeltaDetachedNodeId { readonly minor: number; } -// @alpha +// @internal export interface DeltaDetachedNodeRename { // (undocumented) readonly count: number; @@ -343,7 +343,7 @@ export interface DeltaDetachedNodeRename { readonly oldId: DeltaDetachedNodeId; } -// @alpha +// @internal export interface DeltaFieldChanges { // @deprecated readonly build?: readonly DeltaDetachedNodeBuild[]; @@ -354,10 +354,10 @@ export interface DeltaFieldChanges { readonly rename?: readonly DeltaDetachedNodeRename[]; } -// @alpha (undocumented) +// @internal (undocumented) export type DeltaFieldMap = ReadonlyMap>; -// @alpha +// @internal export interface DeltaMark { readonly attach?: DeltaDetachedNodeId; readonly count: number; @@ -365,17 +365,17 @@ export interface DeltaMark { readonly fields?: DeltaFieldMap; } -// @alpha +// @internal export type DeltaProtoNode = ITreeCursorSynchronous; -// @alpha +// @internal export interface DeltaRoot { readonly build?: readonly DeltaDetachedNodeBuild[]; readonly destroy?: readonly DeltaDetachedNodeDestruction[]; readonly fields?: DeltaFieldMap; } -// @alpha +// @internal export interface DeltaVisitor { attach(source: FieldKey, count: number, destination: PlaceIndex): void; create(content: ProtoNodes, destination: FieldKey): void; @@ -389,14 +389,14 @@ export interface DeltaVisitor { replace(newContentSource: FieldKey, range: Range_2, oldContentDestination: FieldKey): void; } -// @alpha +// @internal export interface DetachedField extends Opaque> { } -// @alpha +// @internal export type DetachedPlaceUpPath = Brand, "DetachedRangeUpPath">; -// @alpha +// @internal export type DetachedRangeUpPath = Brand, "DetachedRangeUpPath">; // @beta @@ -408,7 +408,7 @@ export enum DiscardResult { // @beta export const disposeSymbol: unique symbol; -// @alpha +// @internal export interface EditableTreeEvents { afterChange(event: TreeEvent): void; beforeChange(event: TreeEvent): void; @@ -416,16 +416,16 @@ export interface EditableTreeEvents { subtreeChanging(upPath: UpPath): PathVisitor | void; } -// @alpha +// @internal export const EmptyKey: FieldKey; -// @alpha +// @internal export type EmptyObject = {}; -// @alpha +// @internal export function encodeTreeSchema(schema: TreeStoredSchema): JsonCompatible; -// @alpha +// @internal export function enumFromStrings(factory: SchemaFactory, members: Members[]): ((value: TValue) => { readonly value: TValue; }) & Record = { [P in (string | symbol) & keyof E as IsEvent extends true ? P : never]: E[P]; }; -// @alpha +// @internal export type ExtractFromOpaque> = TOpaque extends BrandedType ? isAny extends true ? unknown : Brand : never; -// @alpha +// @internal export function extractFromOpaque>(value: TOpaque): ExtractFromOpaque; // @beta type ExtractItemType = Item extends () => infer Result ? Result : Item; -// @alpha (undocumented) +// @internal (undocumented) export function fail(message: string): never; -// @alpha +// @internal export interface FieldAnchor { // (undocumented) fieldKey: FieldKey; parent: Anchor | undefined; } -// @alpha +// @internal export type FieldGenerator = () => MapTree[]; -// @alpha +// @internal export type FieldKey = Brand; -// @alpha @sealed +// @internal @sealed export abstract class FieldKind implements FieldKindSpecifier { protected constructor(identifier: TName & FieldKindIdentifier, multiplicity: TMultiplicity); // (undocumented) @@ -483,10 +483,10 @@ enum FieldKind_2 { Required = 1 } -// @alpha +// @internal export type FieldKindIdentifier = Brand; -// @alpha +// @internal export const FieldKinds: { readonly required: Required_2; readonly optional: Optional; @@ -495,13 +495,13 @@ export const FieldKinds: { readonly forbidden: Forbidden; }; -// @alpha +// @internal export interface FieldKindSpecifier { // (undocumented) identifier: T; } -// @alpha +// @internal export interface FieldLocation { // (undocumented) readonly key: FieldKey; @@ -509,13 +509,13 @@ export interface FieldLocation { readonly parent: ForestLocation; } -// @alpha +// @internal export interface FieldMapObject { // (undocumented) [key: string]: TChild[]; } -// @alpha +// @internal export class FieldNodeSchema = TreeFieldSchema> extends TreeNodeSchemaBase { // (undocumented) static create(builder: Named, name: TreeNodeSchemaIdentifier, specification: Specification): FieldNodeSchema; @@ -525,7 +525,7 @@ export class FieldNodeSchema { readonly field: FieldKey; readonly parent: TUpPath | undefined; } -// @alpha +// @internal export type FlattenKeys = [{ [Property in keyof T]: T[Property]; }][_InlineTrick]; -// @alpha +// @internal export type FlexibleFieldContent = InsertableFlexField | ITreeCursorSynchronous; -// @alpha +// @internal export type FlexibleNodeContent = AllowedTypesToFlexInsertableTree | ITreeCursorSynchronous; -// @alpha +// @internal export type FlexibleNodeSubSequence = Iterable> | ITreeCursorSynchronous; -// @alpha +// @internal export type FlexImplicitFieldSchema = TreeFieldSchema | ImplicitAllowedTypes; // @beta @@ -570,7 +570,7 @@ type FlexList = readonly LazyItem[]; // @beta type FlexListToUnion = ExtractItemType>; -// @alpha +// @internal export interface FlexTreeEntity { [boxedIterator](): IterableIterator; readonly [flexTreeMarker]: FlexTreeEntityKind; @@ -579,7 +579,7 @@ export interface FlexTreeEntity { treeStatus(): TreeStatus; } -// @alpha (undocumented) +// @internal (undocumented) export enum FlexTreeEntityKind { // (undocumented) Field = 1, @@ -587,7 +587,7 @@ export enum FlexTreeEntityKind { Node = 0 } -// @alpha +// @internal export interface FlexTreeField extends FlexTreeEntity { // (undocumented) [boxedIterator](): IterableIterator; @@ -599,7 +599,7 @@ export interface FlexTreeField extends FlexTreeEntity { readonly parent?: FlexTreeNode; } -// @alpha +// @internal export interface FlexTreeFieldNode extends FlexTreeNode { readonly boxedContent: FlexTreeTypedField; readonly content: FlexTreeUnboxField; @@ -607,14 +607,14 @@ export interface FlexTreeFieldNode exten readonly schema: TSchema; } -// @alpha +// @internal export interface FlexTreeLeafNode extends FlexTreeNode { // (undocumented) readonly schema: TSchema; readonly value: TreeValue; } -// @alpha +// @internal export interface FlexTreeMapNode extends FlexTreeNode { [boxedIterator](): IterableIterator>; // (undocumented) @@ -639,10 +639,10 @@ export interface FlexTreeMapNode extends F values(): IterableIterator>; } -// @alpha +// @internal export const flexTreeMarker: unique symbol; -// @alpha +// @internal export interface FlexTreeNode extends FlexTreeEntity { // (undocumented) [boxedIterator](): IterableIterator; @@ -661,7 +661,7 @@ export interface FlexTreeNode extends FlexTreeEntity { readonly value?: TreeValue; } -// @alpha +// @internal export interface FlexTreeNodeKeyField extends FlexTreeField { // (undocumented) readonly localNodeKey: LocalNodeKey; @@ -669,17 +669,17 @@ export interface FlexTreeNodeKeyField extends FlexTreeField { readonly stableNodeKey: StableNodeKey; } -// @alpha (undocumented) +// @internal (undocumented) export type FlexTreeNodeSchema = TreeNodeSchemaBase; -// @alpha +// @internal export interface FlexTreeObjectNode extends FlexTreeNode { readonly localNodeKey?: LocalNodeKey; // (undocumented) readonly schema: ObjectNodeSchema; } -// @alpha +// @internal export type FlexTreeObjectNodeFields = FlattenKeys<{ readonly [key in keyof TFields as `boxed${Capitalize}`]: FlexTreeTypedField; } & { @@ -690,10 +690,10 @@ export type FlexTreeObjectNodeFields = FlattenKeys<{ readonly [key in keyof TFields as TFields[key]["kind"] extends AssignableFieldKinds ? `set${Capitalize}` : never]: (content: FlexibleFieldContent) => void; }>; -// @alpha +// @internal export type FlexTreeObjectNodeTyped = ObjectNodeSchema extends TSchema ? FlexTreeObjectNode : FlexTreeObjectNode & FlexTreeObjectNodeFields; -// @alpha +// @internal export interface FlexTreeOptionalField extends FlexTreeField { // (undocumented) readonly boxedContent?: FlexTreeTypedNodeUnion; @@ -702,7 +702,7 @@ export interface FlexTreeOptionalField exten set content(newContent: FlexibleNodeContent | undefined); } -// @alpha +// @internal export interface FlexTreeRequiredField extends FlexTreeField { // (undocumented) readonly boxedContent: FlexTreeTypedNodeUnion; @@ -711,14 +711,14 @@ export interface FlexTreeRequiredField exten set content(content: FlexibleNodeContent); } -// @alpha +// @internal export interface FlexTreeSchema extends SchemaCollection { readonly adapters: Adapters; readonly policy: FullSchemaPolicy; readonly rootFieldSchema: T; } -// @alpha +// @internal export interface FlexTreeSequenceField extends FlexTreeField { // (undocumented) [boxedIterator](): IterableIterator>; @@ -750,36 +750,36 @@ export interface FlexTreeSequenceField exten removeRange(start?: number, end?: number): void; } -// @alpha +// @internal export type FlexTreeTypedField = FlexTreeTypedFieldInner; -// @alpha +// @internal export type FlexTreeTypedFieldInner = Kind extends typeof FieldKinds.sequence ? FlexTreeSequenceField : Kind extends typeof FieldKinds.required ? FlexTreeRequiredField : Kind extends typeof FieldKinds.optional ? FlexTreeOptionalField : Kind extends typeof FieldKinds.nodeKey ? FlexTreeNodeKeyField : FlexTreeField; -// @alpha +// @internal export type FlexTreeTypedNode = TSchema extends LeafNodeSchema ? FlexTreeLeafNode : TSchema extends MapNodeSchema ? FlexTreeMapNode : TSchema extends FieldNodeSchema ? FlexTreeFieldNode : TSchema extends ObjectNodeSchema ? FlexTreeObjectNodeTyped : FlexTreeNode; -// @alpha +// @internal export type FlexTreeTypedNodeUnion = T extends FlexList ? FlexTreeTypedNode, FlexTreeNodeSchema>> : FlexTreeNode; -// @alpha +// @internal export type FlexTreeUnboxField = FlexTreeUnboxFieldInner; -// @alpha +// @internal export type FlexTreeUnboxFieldInner = Kind extends typeof FieldKinds.sequence ? FlexTreeSequenceField : Kind extends typeof FieldKinds.required ? FlexTreeUnboxNodeUnion : Kind extends typeof FieldKinds.optional ? FlexTreeUnboxNodeUnion | (Emptiness extends "notEmpty" ? never : undefined) : Kind extends typeof FieldKinds.nodeKey ? FlexTreeNodeKeyField : unknown; -// @alpha +// @internal export type FlexTreeUnboxNode = TSchema extends LeafNodeSchema ? TreeValue : TSchema extends MapNodeSchema ? FlexTreeMapNode : TSchema extends FieldNodeSchema ? FlexTreeFieldNode : TSchema extends ObjectNodeSchema ? FlexTreeObjectNodeTyped : FlexTreeUnknownUnboxed; -// @alpha +// @internal export type FlexTreeUnboxNodeUnion = TTypes extends readonly [ InternalTypedSchemaTypes.LazyItem ] ? InnerType extends FlexTreeNodeSchema ? FlexTreeUnboxNode : InnerType extends Any ? FlexTreeNode : unknown : boolean extends IsArrayOfOne ? FlexTreeUnknownUnboxed : FlexTreeTypedNodeUnion; -// @alpha +// @internal export type FlexTreeUnknownUnboxed = TreeValue | FlexTreeNode; -// @alpha +// @internal export interface FlexTreeView extends IDisposable { readonly checkout: ITreeCheckout; readonly context: TreeContext; @@ -787,61 +787,61 @@ export interface FlexTreeView extends IDis fork(): ITreeViewFork; } -// @alpha (undocumented) +// @internal (undocumented) export interface Forbidden extends FieldKind { } -// @alpha +// @internal export const forbiddenFieldKindIdentifier = "Forbidden"; -// @alpha +// @internal export interface ForestEvents { afterChange(): void; beforeChange(): void; } -// @alpha +// @internal export type ForestLocation = ITreeSubscriptionCursor | Anchor; -// @alpha +// @internal export enum ForestType { Optimized = 1, Reference = 0 } -// @alpha +// @internal export interface FullSchemaPolicy { readonly fieldKinds: ReadonlyMap; } -// @alpha +// @internal export interface GenericFieldsNode { // (undocumented) fields?: FieldMapObject; } -// @alpha +// @internal export interface GenericTreeNode extends GenericFieldsNode, NodeData { } -// @alpha (undocumented) +// @internal (undocumented) export interface HasListeners> { hasListeners(eventName?: keyof Events): boolean; } -// @alpha +// @internal export interface ICodecOptions { readonly jsonValidator: JsonValidator; } -// @alpha +// @internal export interface IdAllocator { allocate: (count?: number) => TId; // (undocumented) getNextId: () => TId; } -// @alpha +// @internal export interface IDefaultEditBuilder { // (undocumented) addNodeExistsConstraint(path: UpPath): void; @@ -859,18 +859,18 @@ export interface IDisposable { [disposeSymbol](): void; } -// @alpha +// @internal export interface IEditableForest extends IForestSubscription { acquireVisitor(): DeltaVisitor; } -// @alpha +// @internal export interface IEmitter> { emit>(eventName: K, ...args: Parameters): void; emitAndCollect>(eventName: K, ...args: Parameters): ReturnType[]; } -// @alpha +// @internal export interface IForestSubscription extends ISubscribable { allocateCursor(): ITreeSubscriptionCursor; readonly anchors: AnchorSet; @@ -883,7 +883,7 @@ export interface IForestSubscription extends ISubscribable { tryMoveCursorToNode(destination: Anchor, cursorToMove: ITreeSubscriptionCursor): TreeNavigationResult; } -// @alpha +// @internal export type ImplicitAllowedTypes = AllowedTypes | FlexTreeNodeSchema | Any; // @beta @@ -892,19 +892,19 @@ type ImplicitAllowedTypes_2 = AllowedTypes_2 | TreeNodeSchema; // @beta export type ImplicitFieldSchema = FieldSchema | ImplicitAllowedTypes_2; -// @alpha +// @internal export interface InitializeAndSchematizeConfiguration extends TreeContent, SchematizeConfiguration { } -// @alpha +// @internal export type _InlineTrick = 0; -// @alpha +// @internal export type InsertableFlexField = [ ApplyMultiplicity> ][_InlineTrick]; -// @alpha +// @internal export type InsertableFlexNode = FlattenKeys ? TypedFields : TSchema extends FieldNodeSchema ? InsertableFlexField : TSchema extends MapNodeSchema ? { readonly [P in string]: InsertableFlexField; } : EmptyObject, TSchema extends LeafNodeSchema ? TValueSchema : undefined, TSchema["name"]>>; @@ -966,40 +966,40 @@ declare namespace InternalTypes { } export { InternalTypes } -// @alpha +// @internal export interface Invariant extends Contravariant, Covariant { } -// @alpha +// @internal export type isAny = boolean extends (T extends never ? true : false) ? true : false; -// @alpha +// @internal export type IsArrayOfOne = T["length"] extends 1 ? true : 1 extends T["length"] ? boolean : false; -// @alpha +// @internal export interface ISchemaEditor { setStoredSchema(oldSchema: TreeStoredSchema, newSchema: TreeStoredSchema): void; } -// @alpha +// @internal export function isContextuallyTypedNodeDataObject(data: ContextuallyTypedNodeData | undefined): data is ContextuallyTypedNodeDataObject; // @beta export type IsEvent = Event extends (...args: any[]) => any ? true : false; -// @alpha +// @internal export interface ISharedTree extends ISharedObject, ITree { contentSnapshot(): SharedTreeContentSnapshot; requireSchema(schema: FlexTreeSchema, onSchemaIncompatible: () => void): FlexTreeView | undefined; schematizeInternal(config: InitializeAndSchematizeConfiguration): FlexTreeView; } -// @alpha +// @internal export interface ISharedTreeEditor extends IDefaultEditBuilder { schema: ISchemaEditor; } -// @alpha (undocumented) +// @internal (undocumented) export function isNeverField(policy: FullSchemaPolicy, originalData: TreeStoredSchema, field: TreeFieldStoredSchema): boolean; // @beta @@ -1013,7 +1013,7 @@ export class IterableTreeListContent implements Iterable { [Symbol.iterator](): Iterator; } -// @alpha +// @internal export interface ITransaction { abort(): TransactionResult.Abort; commit(): TransactionResult.Commit; @@ -1026,7 +1026,7 @@ export interface ITree extends IChannel { schematize(config: TreeConfiguration): TreeView>; } -// @alpha +// @internal export interface ITreeCheckout extends AnchorLocator { readonly editor: ISharedTreeEditor; readonly events: ISubscribable; @@ -1041,12 +1041,12 @@ export interface ITreeCheckout extends AnchorLocator { updateSchema(newSchema: TreeStoredSchema): void; } -// @alpha +// @internal export interface ITreeCheckoutFork extends ITreeCheckout { rebaseOnto(view: ITreeCheckout): void; } -// @alpha +// @internal export interface ITreeCursor { readonly [CursorMarker]: true; readonly chunkLength: number; @@ -1074,13 +1074,13 @@ export interface ITreeCursor { readonly value: Value; } -// @alpha +// @internal export interface ITreeCursorSynchronous extends ITreeCursor { // (undocumented) readonly pending: false; } -// @alpha +// @internal export interface ITreeSubscriptionCursor extends ITreeCursor { buildAnchor(): Anchor; buildFieldAnchor(): FieldAnchor; @@ -1091,40 +1091,40 @@ export interface ITreeSubscriptionCursor extends ITreeCursor { readonly state: ITreeSubscriptionCursorState; } -// @alpha (undocumented) +// @internal (undocumented) export enum ITreeSubscriptionCursorState { Cleared = 1, Current = 0, Freed = 2 } -// @alpha +// @internal export interface ITreeViewFork extends FlexTreeView { // (undocumented) readonly checkout: ITreeCheckoutFork; } -// @alpha +// @internal export interface JsonableTree extends GenericTreeNode { } -// @alpha +// @internal export function jsonableTreeFromCursor(cursor: ITreeCursor): JsonableTree; -// @alpha +// @internal export type JsonCompatible = string | number | boolean | null | JsonCompatible[] | JsonCompatibleObject; -// @alpha +// @internal export type JsonCompatibleObject = { [P in string]?: JsonCompatible; }; -// @alpha +// @internal export type JsonCompatibleReadOnly = string | number | boolean | null | readonly JsonCompatibleReadOnly[] | { readonly [P in string]?: JsonCompatibleReadOnly; }; -// @alpha +// @internal export interface JsonValidator { compile(schema: Schema): SchemaValidationFunction; } @@ -1132,10 +1132,10 @@ export interface JsonValidator { // @beta type LazyItem = Item | (() => Item); -// @alpha +// @internal export type LazyTreeNodeSchema = FlexTreeNodeSchema | (() => FlexTreeNodeSchema); -// @alpha +// @internal export const leaf: { number: LeafNodeSchema<"com.fluidframework.leaf.number", ValueSchema.Number>; boolean: LeafNodeSchema<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>; @@ -1147,7 +1147,7 @@ export const leaf: { library: SchemaLibrary; }; -// @alpha (undocumented) +// @internal (undocumented) export class LeafNodeSchema = ValueSchema> extends TreeNodeSchemaBase { // (undocumented) static create(builder: Named, name: TreeNodeSchemaIdentifier, specification: Specification): LeafNodeSchema; @@ -1159,7 +1159,7 @@ export class LeafNodeSchema> { } @@ -1167,10 +1167,10 @@ export interface LocalNodeKey extends Opaque; -// @alpha (undocumented) +// @internal (undocumented) export class MapNodeSchema = MapFieldSchema> extends TreeNodeSchemaBase { // (undocumented) static create(builder: Named, name: TreeNodeSchemaIdentifier, specification: Specification): MapNodeSchema; @@ -1182,13 +1182,13 @@ export class MapNodeSchema; } -// @alpha +// @internal export interface MarkedArrayLike extends ArrayLikeMut { // (undocumented) readonly [arrayLikeMarkerSymbol]: true; @@ -1196,7 +1196,7 @@ export interface MarkedArrayLike extends ArrayLi [Symbol.iterator](): IterableIterator; } -// @alpha +// @internal export enum Multiplicity { Forbidden = 3, Optional = 1, @@ -1204,31 +1204,31 @@ export enum Multiplicity { Single = 0 } -// @alpha +// @internal export interface Named { // (undocumented) readonly name: TName; } -// @alpha +// @internal export type NameFromBranded> = T extends BrandedType ? Name : never; -// @alpha +// @internal export type NestedMap = Map>; -// @alpha +// @internal export type NewFieldContent = ITreeCursorSynchronous | readonly ITreeCursorSynchronous[] | ContextuallyTypedFieldData; // @beta type NodeBuilderData = T extends TreeNodeSchema ? TBuild : never; -// @alpha +// @internal export interface NodeData { readonly type: TreeNodeSchemaIdentifier; value?: TreeValue; } -// @alpha (undocumented) +// @internal (undocumented) export interface NodeExistsConstraint { // (undocumented) violated: boolean; @@ -1237,17 +1237,17 @@ export interface NodeExistsConstraint { // @beta export type NodeFromSchema = T extends TreeNodeSchema ? TNode : never; -// @alpha +// @internal export type NodeIndex = number; -// @alpha +// @internal export const nodeKeyFieldKey = "__n_id__"; -// @alpha (undocumented) +// @internal (undocumented) export interface NodeKeyFieldKind extends FieldKind<"NodeKey", Multiplicity.Single> { } -// @alpha +// @internal export interface NodeKeys { generate(): LocalNodeKey; localize(key: StableNodeKey): LocalNodeKey; @@ -1263,22 +1263,22 @@ enum NodeKind { Object = 2 } -// @alpha +// @internal export type NoListenersCallback> = (eventName: keyof Events) => void; -// @alpha +// @internal export const noopValidator: JsonValidator; -// @alpha +// @internal export type NormalizeAllowedTypes = TSchema extends FlexTreeNodeSchema ? readonly [TSchema] : TSchema extends Any ? readonly [Any] : TSchema; -// @alpha +// @internal export type NormalizeField = TSchema extends TreeFieldSchema ? TSchema : TreeFieldSchema>>; -// @alpha +// @internal export type NormalizeFieldSchema = T extends TreeFieldSchema ? T : TreeFieldSchema; -// @alpha (undocumented) +// @internal (undocumented) export type NormalizeObjectNodeFields = { readonly [Property in keyof T]: NormalizeFieldSchema; }; @@ -1288,7 +1288,7 @@ type ObjectFromSchemaRecord; }; -// @alpha (undocumented) +// @internal (undocumented) export class ObjectNodeSchema = Fields> extends TreeNodeSchemaBase { // (undocumented) static create(builder: Named, name: TreeNodeSchemaIdentifier, specification: Specification): ObjectNodeSchema; @@ -1302,36 +1302,36 @@ export class ObjectNodeSchema(set: ReadonlySet | undefined): T | undefined; -// @alpha +// @internal export type Opaque> = T extends Brand ? BrandedType : never; -// @alpha (undocumented) +// @internal (undocumented) export interface Optional extends FieldKind<"Optional", Multiplicity.Optional> { } -// @alpha (undocumented) +// @internal (undocumented) export interface OptionalFieldEditBuilder { set(newContent: ITreeCursor | undefined, wasEmpty: boolean): void; } -// @alpha +// @internal export type OptionalFields = [ { [P in keyof T as undefined extends T[P] ? T[P] extends undefined ? never : P : never]?: T[P]; } ][_InlineTrick]; -// @alpha +// @internal export interface PathRootPrefix { indexOffset?: number; parent?: UpPath | undefined; rootFieldOverride?: FieldKey; } -// @alpha +// @internal export interface PathVisitor { afterAttach(source: DetachedPlaceUpPath, destination: RangeUpPath): void; afterCreate(content: DetachedRangeUpPath): void; @@ -1347,49 +1347,49 @@ export interface PathVisitor { onInsert(path: UpPath, content: ProtoNodes): void; } -// @alpha +// @internal export type PlaceIndex = number; -// @alpha +// @internal export interface PlaceUpPath extends FieldUpPath { readonly index: PlaceIndex; } -// @alpha +// @internal export function prefixFieldPath(prefix: PathRootPrefix | undefined, path: FieldUpPath): FieldUpPath; -// @alpha +// @internal export function prefixPath(prefix: PathRootPrefix | undefined, path: UpPath | undefined): UpPath | undefined; -// @alpha +// @internal export type ProtoNodes = readonly DeltaProtoNode[]; -// @alpha +// @internal interface Range_2 { readonly end: PlaceIndex; readonly start: PlaceIndex; } export { Range_2 as Range } -// @alpha +// @internal export interface RangeQueryResult { length: number; value: T | undefined; } -// @alpha +// @internal export interface RangeUpPath extends FieldUpPath, Range_2 { } -// @alpha +// @internal export type _RecursiveTrick = never; -// @alpha (undocumented) +// @internal (undocumented) interface Required_2 extends FieldKind<"Value", Multiplicity.Single> { } export { Required_2 as Required } -// @alpha +// @internal export type RequiredFields = [ { [P in keyof T as undefined extends T[P] ? never : P]: T[P]; @@ -1425,22 +1425,22 @@ export enum RevertResult { Success = 0 } -// @alpha +// @internal export interface RootField { // (undocumented) readonly key: DetachedField; } -// @alpha (undocumented) +// @internal (undocumented) export const rootField: DetachedField; -// @alpha +// @internal export const rootFieldKey: FieldKey; -// @alpha +// @internal export function runSynchronous(view: ITreeCheckout, transaction: (view: ITreeCheckout) => TransactionResult | void): TransactionResult; -// @alpha +// @internal export class SchemaBuilderBase { constructor(defaultKind: TDefaultKind, options: SchemaBuilderOptions); // (undocumented) @@ -1464,7 +1464,7 @@ export class SchemaBuilderBase(name: Name): TreeNodeSchemaIdentifier<`${TScope}.${Name}`>; } -// @alpha +// @internal export interface SchemaBuilderOptions { libraries?: SchemaLibrary[]; lint?: Partial; @@ -1472,17 +1472,17 @@ export interface SchemaBuilderOptions { scope: TScope; } -// @alpha +// @internal export interface SchemaCollection { readonly nodeSchema: ReadonlyMap; } -// @alpha +// @internal export interface SchemaConfiguration { readonly schema: FlexTreeSchema; } -// @alpha +// @internal export interface SchemaEvents { afterSchemaChange(newSchema: TreeStoredSchema): void; beforeSchemaChange(newSchema: TreeStoredSchema): void; @@ -1509,24 +1509,24 @@ export class SchemaFactory; } -// @alpha +// @internal export function schemaIsFieldNode(schema: FlexTreeNodeSchema): schema is FieldNodeSchema; -// @alpha +// @internal export function schemaIsLeaf(schema: FlexTreeNodeSchema): schema is LeafNodeSchema; -// @alpha +// @internal export function schemaIsMap(schema: FlexTreeNodeSchema): schema is MapNodeSchema; -// @alpha +// @internal export function schemaIsObjectNode(schema: FlexTreeNodeSchema): schema is ObjectNodeSchema; -// @alpha +// @internal export interface SchemaLibrary extends SchemaCollection { readonly libraries: ReadonlySet; } -// @alpha +// @internal export interface SchemaLibraryData extends SchemaCollection { // (undocumented) readonly adapters: Adapters; @@ -1534,7 +1534,7 @@ export interface SchemaLibraryData extends SchemaCollection { readonly name: string; } -// @alpha +// @internal export interface SchemaLintConfiguration { // (undocumented) readonly rejectEmpty: boolean; @@ -1542,22 +1542,22 @@ export interface SchemaLintConfiguration { readonly rejectForbidden: boolean; } -// @alpha +// @internal export interface SchematizeConfiguration extends SchemaConfiguration { readonly allowedSchemaModifications: AllowedUpdateType; } -// @alpha +// @internal export interface SchemaValidationFunction { // (undocumented) check(data: unknown): data is Static; } -// @alpha (undocumented) +// @internal (undocumented) export interface Sequence extends FieldKind<"Sequence", Multiplicity.Sequence> { } -// @alpha (undocumented) +// @internal (undocumented) export interface SequenceFieldEditBuilder { delete(index: number, count: number): void; insert(index: number, newContent: ITreeCursor | readonly ITreeCursor[]): void; @@ -1590,13 +1590,13 @@ export class SharedTree implements ITree { summarize(fullTree?: boolean | undefined, trackState?: boolean | undefined, telemetryContext?: ITelemetryContext | undefined, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext | undefined): Promise; } -// @alpha +// @internal export interface SharedTreeContentSnapshot { readonly schema: TreeStoredSchema; readonly tree: JsonableTree[]; } -// @alpha +// @internal export class SharedTreeFactory implements IChannelFactory { constructor(options?: SharedTreeOptions); // (undocumented) @@ -1609,17 +1609,17 @@ export class SharedTreeFactory implements IChannelFactory { readonly type: string; } -// @alpha (undocumented) +// @internal (undocumented) export interface SharedTreeOptions extends Partial { forest?: ForestType; // (undocumented) summaryEncodeType?: TreeCompressionStrategy; } -// @alpha +// @internal export function singleTextCursor(root: JsonableTree): ITreeCursorSynchronous; -// @alpha +// @internal export function singletonSchema(factory: SchemaFactory, name: TName): { new (data?: EmptyObject): { readonly value: TName; @@ -1630,25 +1630,25 @@ export function singletonSchema; -// @alpha +// @internal export function stackTreeFieldCursor(adapter: CursorAdapter, root: TNode, detachedField?: DetachedField): CursorWithNode; -// @alpha +// @internal export function stackTreeNodeCursor(adapter: CursorAdapter, root: TNode): CursorWithNode; -// @alpha +// @internal export interface StoredSchemaCollection { readonly nodeSchema: ReadonlyMap; } -// @alpha (undocumented) +// @internal (undocumented) export class test_RecursiveObject extends test_RecursiveObject_base { } -// @alpha +// @internal export const test_RecursiveObject_base: TreeNodeSchemaClass<"Test Recursive Domain.testObject", NodeKind.Object, ObjectFromSchemaRecord< { readonly recursive: FieldSchema typeof test_RecursiveObject]>; readonly number: TreeNodeSchema<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number>; @@ -1657,7 +1657,7 @@ readonly recursive: FieldSchema; }>, true>; -// @alpha +// @internal export enum TransactionResult { Abort = 0, Commit = 1 @@ -1666,7 +1666,7 @@ export enum TransactionResult { // @beta export const Tree: TreeApi; -// @alpha (undocumented) +// @internal (undocumented) export interface TreeAdapter { // (undocumented) readonly input: TreeNodeSchemaIdentifier; @@ -1714,7 +1714,7 @@ interface TreeArrayNodeBase extends ReadonlyArray< removeRange(start?: number, end?: number): void; } -// @alpha +// @internal export enum TreeCompressionStrategy { Compressed = 0, Uncompressed = 1 @@ -1729,12 +1729,12 @@ export class TreeConfiguration extends SchemaConfiguration { readonly initialTree: InsertableFlexField | readonly ITreeCursorSynchronous[] | ITreeCursorSynchronous; } -// @alpha +// @internal export interface TreeContext extends ISubscribable { // (undocumented) readonly nodeKeys: NodeKeys; @@ -1742,18 +1742,18 @@ export interface TreeContext extends ISubscribable { readonly schema: FlexTreeSchema; } -// @alpha +// @internal export interface TreeDataContext { fieldSource?(key: FieldKey, schema: TreeFieldStoredSchema): undefined | FieldGenerator; readonly schema: FlexTreeSchema; } -// @alpha +// @internal export interface TreeEvent { readonly target: FlexTreeNode; } -// @alpha +// @internal export class TreeFactory implements IChannelFactory { constructor(options: TreeOptions); // (undocumented) @@ -1769,7 +1769,7 @@ export class TreeFactory implements IChannelFactory { // @beta export type TreeFieldFromImplicitField = TSchema extends FieldSchema ? ApplyKind, Kind> : TSchema extends ImplicitAllowedTypes_2 ? TreeNodeFromImplicitAllowedTypes : unknown; -// @alpha @sealed +// @internal @sealed export class TreeFieldSchema = AllowedTypes> implements TreeFieldStoredSchema { // (undocumented) readonly allowedTypes: TTypes; @@ -1786,7 +1786,7 @@ export class TreeFieldSchema extends ReadonlyMap = TreeNodeSchemaClass | TreeNodeSchemaNonClass; -// @alpha +// @internal export abstract class TreeNodeSchemaBase { protected constructor(builder: Named, name: TreeNodeSchemaIdentifier, info: Specification, stored: TreeNodeStoredSchema); // (undocumented) @@ -1870,7 +1870,7 @@ interface TreeNodeSchemaCore = Brand; // @beta @@ -1879,19 +1879,19 @@ interface TreeNodeSchemaNonClass; } -// @alpha +// @internal export interface TreeOptions extends SharedTreeOptions { readonly subtype?: string; } -// @alpha +// @internal export function treeSchemaFromStoredSchema(schema: TreeStoredSchema): FlexTreeSchema; // @beta @@ -1901,22 +1901,22 @@ export enum TreeStatus { Removed = 1 } -// @alpha +// @internal export interface TreeStoredSchema extends StoredSchemaCollection { readonly rootFieldSchema: TreeFieldStoredSchema; } -// @alpha +// @internal export interface TreeStoredSchemaSubscription extends ISubscribable, TreeStoredSchema { } -// @alpha (undocumented) +// @internal (undocumented) export type TreeType = TreeNodeSchemaIdentifier; -// @alpha +// @internal export type TreeTypeSet = ReadonlySet | undefined; -// @alpha +// @internal export type TreeValue = [ { [ValueSchema.Number]: number; @@ -1933,10 +1933,10 @@ export interface TreeView extends IDisposable { readonly root: TRoot; } -// @alpha +// @internal export const typeboxValidator: JsonValidator; -// @alpha +// @internal export type TypedFields = [ @@ -1947,45 +1947,45 @@ TFields extends { } : EmptyObject ][_InlineTrick]; -// @alpha +// @internal export function typedObjectValues(object: Record): TValues[]; -// @alpha +// @internal export const typeNameSymbol: unique symbol; -// @alpha +// @internal export type UnbrandedName = [ TName extends TreeNodeSchemaIdentifier ? S : string ][_InlineTrick]; -// @alpha +// @internal export type Unenforced<_DesiredExtendsConstraint> = unknown; // @beta export type Unhydrated = T; -// @alpha +// @internal export interface UpPath { readonly parent: TParent | undefined; readonly parentField: FieldKey; readonly parentIndex: NodeIndex; } -// @alpha +// @internal export type UpPathDefault = UpPath; -// @alpha +// @internal export type Value = undefined | TreeValue; -// @alpha (undocumented) +// @internal (undocumented) export interface ValueFieldEditBuilder { set(newContent: ITreeCursor): void; } -// @alpha +// @internal export type ValueFromBranded> = T extends BrandedType ? ValueType : never; -// @alpha +// @internal export enum ValueSchema { // (undocumented) Boolean = 2, @@ -1999,7 +1999,7 @@ export enum ValueSchema { String = 1 } -// @alpha +// @internal export const valueSymbol: unique symbol; // (No @packageDocumentation comment for this package) diff --git a/packages/dds/tree/src/class-tree/index.ts b/packages/dds/tree/src/class-tree/index.ts index 651e9b8e75ae..c1e147ed0db4 100644 --- a/packages/dds/tree/src/class-tree/index.ts +++ b/packages/dds/tree/src/class-tree/index.ts @@ -36,7 +36,7 @@ import * as InternalClassTreeTypes from "./internal"; export { InternalClassTreeTypes }; // Exporting the schema (RecursiveObject) to test that recursive types are working correctly. -// These are `@alpha` so they can't be included in the `InternalClassTreeTypes` due to https://github.com/microsoft/rushstack/issues/3639 +// These are `@internal` so they can't be included in the `InternalClassTreeTypes` due to https://github.com/microsoft/rushstack/issues/3639 export { RecursiveObject as test_RecursiveObject, base as test_RecursiveObject_base, diff --git a/packages/dds/tree/src/class-tree/schemaCreationUtilities.ts b/packages/dds/tree/src/class-tree/schemaCreationUtilities.ts index dd0a33103eee..c32ad48ef79e 100644 --- a/packages/dds/tree/src/class-tree/schemaCreationUtilities.ts +++ b/packages/dds/tree/src/class-tree/schemaCreationUtilities.ts @@ -18,7 +18,7 @@ import { NodeFromSchema, type NodeKind as _dummy } from "./schemaTypes"; * @remarks * This is commonly used in unions when the only information needed is which kind of node the value is. * Enums are a common example of this pattern. - * @alpha + * @internal */ export function singletonSchema( factory: SchemaFactory, @@ -58,7 +58,7 @@ export function singletonSchema>( factory: SchemaFactory, @@ -100,7 +100,7 @@ export function adaptEnum( object: Record, @@ -125,7 +125,7 @@ export function typedObjectValues( * * class Parent extends schemaFactory.object("Parent", { mode: typedObjectValues(Mode) }) {} * ``` - * @alpha + * @internal */ export function enumFromStrings( factory: SchemaFactory, diff --git a/packages/dds/tree/src/class-tree/schemaFactoryRecursive.ts b/packages/dds/tree/src/class-tree/schemaFactoryRecursive.ts index 37bff1154a66..364ad6edbae1 100644 --- a/packages/dds/tree/src/class-tree/schemaFactoryRecursive.ts +++ b/packages/dds/tree/src/class-tree/schemaFactoryRecursive.ts @@ -19,7 +19,7 @@ import { SchemaFactory } from "./schemaFactory"; * * @remarks This is separated from SchemaFactory as these APIs are more experimental, and may be stabilized independently. * - * @sealed @alpha + * @sealed @internal */ export class SchemaFactoryRecursive< TScope extends string, diff --git a/packages/dds/tree/src/class-tree/testRecursiveDomain.ts b/packages/dds/tree/src/class-tree/testRecursiveDomain.ts index ee9289f41b6a..ba5aea9a3eba 100644 --- a/packages/dds/tree/src/class-tree/testRecursiveDomain.ts +++ b/packages/dds/tree/src/class-tree/testRecursiveDomain.ts @@ -34,7 +34,7 @@ builder.fixRecursiveReference(recursiveReference); * Fix API-Extractor to support class based schema, and remove this workaround (inline this type into `RecursiveObject extends` below). * Error: src/class-tree/testRecursiveDomain.ts:32:1 - (ae-forgotten-export) The symbol "RecursiveObject_base" needs to be exported by the entry point index.d.ts * See https://github.com/microsoft/rushstack/issues/4429 - * @alpha + * @internal */ export const base = builder.object("testObject", { recursive: builder.optional([recursiveReference]), @@ -42,6 +42,6 @@ export const base = builder.object("testObject", { }); /** - * @alpha + * @internal */ export class RecursiveObject extends base {} diff --git a/packages/dds/tree/src/codec/codec.ts b/packages/dds/tree/src/codec/codec.ts index 38985d32ec63..652c7646dc3c 100644 --- a/packages/dds/tree/src/codec/codec.ts +++ b/packages/dds/tree/src/codec/codec.ts @@ -33,7 +33,7 @@ export interface IDecoder { /** * Validates data complies with some particular schema. * Implementations are typically created by a {@link JsonValidator}. - * @alpha + * @internal */ export interface SchemaValidationFunction { /** @@ -44,7 +44,7 @@ export interface SchemaValidationFunction { /** * JSON schema validator compliant with draft 6 schema. See https://json-schema.org. - * @alpha + * @internal */ export interface JsonValidator { /** @@ -61,7 +61,7 @@ export interface JsonValidator { /** * Options relating to handling of persisted data. - * @alpha + * @internal */ export interface ICodecOptions { /** diff --git a/packages/dds/tree/src/codec/noopValidator.ts b/packages/dds/tree/src/codec/noopValidator.ts index 859e5ba46999..9e3927677992 100644 --- a/packages/dds/tree/src/codec/noopValidator.ts +++ b/packages/dds/tree/src/codec/noopValidator.ts @@ -10,7 +10,7 @@ import { JsonValidator } from "./codec"; * A {@link JsonValidator} implementation which performs no validation and accepts all data as valid. * @privateRemarks Having this as an option unifies opting out of validation with selection of * validators, simplifying code performing validation. - * @alpha + * @internal */ export const noopValidator: JsonValidator = { compile: () => ({ check: (data): data is Static => true }), diff --git a/packages/dds/tree/src/core/forest/editableForest.ts b/packages/dds/tree/src/core/forest/editableForest.ts index 1dd64c97d9bb..6c6f2ac0b910 100644 --- a/packages/dds/tree/src/core/forest/editableForest.ts +++ b/packages/dds/tree/src/core/forest/editableForest.ts @@ -19,7 +19,7 @@ import { IForestSubscription, ITreeSubscriptionCursor } from "./forest"; /** * Editing APIs. - * @alpha + * @internal */ export interface IEditableForest extends IForestSubscription { /** @@ -55,12 +55,12 @@ export function initializeForest( /** * Ways to refer to a node in an IEditableForest. - * @alpha + * @internal */ export type ForestLocation = ITreeSubscriptionCursor | Anchor; /** - * @alpha + * @internal */ export interface TreeLocation { readonly range: FieldLocation | DetachedField; @@ -73,7 +73,7 @@ export function isFieldLocation(range: FieldLocation | DetachedField): range is /** * Location of a field within a tree that is not a detached/root field. - * @alpha + * @internal */ export interface FieldLocation { readonly key: FieldKey; diff --git a/packages/dds/tree/src/core/forest/forest.ts b/packages/dds/tree/src/core/forest/forest.ts index c03823280b58..663333381588 100644 --- a/packages/dds/tree/src/core/forest/forest.ts +++ b/packages/dds/tree/src/core/forest/forest.ts @@ -31,7 +31,7 @@ import type { IEditableForest } from "./editableForest"; * Events for {@link IForestSubscription}. * * TODO: consider having before and after events per subtree instead while applying anchor (and this just shows what happens at the root). - * @alpha + * @internal */ export interface ForestEvents { /** @@ -53,7 +53,7 @@ export interface ForestEvents { * Not invalidated when schema changes. * * When invalidating, all outstanding cursors must be freed or cleared. - * @alpha + * @internal */ export interface IForestSubscription extends ISubscribable { /** @@ -156,7 +156,7 @@ export function moveToDetachedField( /** * Anchor to a field. * This is structurally based on the parent, so it will move only as the parent moves. - * @alpha + * @internal */ export interface FieldAnchor { /** @@ -169,7 +169,7 @@ export interface FieldAnchor { /** * ITreeCursor supporting IForestSubscription and its changes over time. - * @alpha + * @internal */ export interface ITreeSubscriptionCursor extends ITreeCursor { /** @@ -219,7 +219,7 @@ export interface ITreeSubscriptionCursor extends ITreeCursor { } /** - * @alpha + * @internal */ export enum ITreeSubscriptionCursorState { /** @@ -237,7 +237,7 @@ export enum ITreeSubscriptionCursorState { } /** - * @alpha + * @internal */ export const enum TreeNavigationResult { /** diff --git a/packages/dds/tree/src/core/rebase/changeRebaser.ts b/packages/dds/tree/src/core/rebase/changeRebaser.ts index d015dbfabb72..89e5cb5668a1 100644 --- a/packages/dds/tree/src/core/rebase/changeRebaser.ts +++ b/packages/dds/tree/src/core/rebase/changeRebaser.ts @@ -85,7 +85,7 @@ export interface ChangeRebaser { } /** - * @alpha + * @internal */ export interface TaggedChange { readonly revision: RevisionTag | undefined; @@ -113,12 +113,12 @@ export function mapTaggedChange( * being produced. * * During rebase, the indices of the base changes are all lower than the indices of the change being rebased. - * @alpha + * @internal */ export type RevisionIndexer = (tag: RevisionTag) => number | undefined; /** - * @alpha + * @internal */ export interface RevisionMetadataSource { readonly getIndex: RevisionIndexer; @@ -127,7 +127,7 @@ export interface RevisionMetadataSource { } /** - * @alpha + * @internal */ export interface RevisionInfo { readonly revision: RevisionTag; diff --git a/packages/dds/tree/src/core/rebase/types.ts b/packages/dds/tree/src/core/rebase/types.ts index ad08fe866a09..8f5ddcbf781f 100644 --- a/packages/dds/tree/src/core/rebase/types.ts +++ b/packages/dds/tree/src/core/rebase/types.ts @@ -16,7 +16,7 @@ export const SessionIdSchema = brandedStringType(); /** * A unique identifier for a commit. Commits that have been rebased, but are semantically * the same, will share the same revision tag. - * @alpha + * @internal */ // TODO: These can be compressed by an `IdCompressor` in the future export type RevisionTag = StableId; @@ -27,13 +27,13 @@ export const RevisionTagSchema = brandedStringType(); * An ID which is unique within a revision of a `ModularChangeset`. * A `ModularChangeset` which is a composition of multiple revisions may contain duplicate `ChangesetLocalId`s, * but they are unique when qualified by the revision of the change they are used in. - * @alpha + * @internal */ export type ChangesetLocalId = Brand; /** * A globally unique ID for an atom of change, or a node associated with the atom of change. - * @alpha + * @internal * * @privateRemarks * TODO: Rename this to be more general. @@ -56,12 +56,12 @@ export interface EncodedChangeAtomId { } /** - * @alpha + * @internal */ export type ChangeAtomIdMap = NestedMap; /** - * @alpha + * @internal */ export type ChangeAtomIdRangeMap = Map>; diff --git a/packages/dds/tree/src/core/rebase/utils.ts b/packages/dds/tree/src/core/rebase/utils.ts index 02bf8560f0c2..3d31684e4395 100644 --- a/packages/dds/tree/src/core/rebase/utils.ts +++ b/packages/dds/tree/src/core/rebase/utils.ts @@ -296,7 +296,7 @@ export function rebaseChange( } /** - * @alpha + * @internal */ export function revisionMetadataSourceFromInfo( revInfos: readonly RevisionInfo[], diff --git a/packages/dds/tree/src/core/schema-stored/schema.ts b/packages/dds/tree/src/core/schema-stored/schema.ts index 10a2da3837fb..e80960de251b 100644 --- a/packages/dds/tree/src/core/schema-stored/schema.ts +++ b/packages/dds/tree/src/core/schema-stored/schema.ts @@ -10,7 +10,7 @@ import { Brand, brand, brandedStringType } from "../../util"; * Also known as "Definition" * * Stable identifier, used when persisting data. - * @alpha + * @internal */ export type TreeNodeSchemaIdentifier = Brand< TName, @@ -26,7 +26,7 @@ export const TreeNodeSchemaIdentifierSchema = brandedStringType; @@ -40,14 +40,14 @@ export const FieldKeySchema = brandedStringType(); * Refers to an exact stable policy (ex: specific version of a policy), * for how to handle (ex: edit and merge edits to) fields marked with this kind. * Persisted in documents as part of stored schema. - * @alpha + * @internal */ export type FieldKindIdentifier = Brand; export const FieldKindIdentifierSchema = brandedStringType(); /** * Schema for what {@link TreeValue} is allowed on a Leaf node. - * @alpha + * @internal */ export enum ValueSchema { Number, @@ -85,7 +85,7 @@ export enum ValueSchema { * - Constrain the types allowed based on which types guarantee their data will always meet the constraints. * * Care would need to be taken to make sure this is sound for the schema updating mechanisms. - * @alpha + * @internal */ export type TreeTypeSet = ReadonlySet | undefined; @@ -95,14 +95,14 @@ export type TreeTypeSet = ReadonlySet | undefined; * @remarks * This is used instead of just the FieldKindIdentifier so that it can be subtyped into a more expressive type with additional information. * - * @alpha + * @internal */ export interface FieldKindSpecifier { identifier: T; } /** - * @alpha + * @internal */ export interface TreeFieldStoredSchema { readonly kind: FieldKindSpecifier; @@ -121,7 +121,7 @@ export interface TreeFieldStoredSchema { * 1. The root default field for documents. * 2. The schema used for out of schema fields (which thus must be empty/not exist) on object and leaf nodes. * - * @alpha + * @internal */ export const forbiddenFieldKindIdentifier = "Forbidden"; @@ -137,7 +137,7 @@ export const storedEmptyFieldSchema: TreeFieldStoredSchema = { }; /** - * @alpha + * @internal */ export interface TreeNodeStoredSchema { /** @@ -184,7 +184,7 @@ export interface TreeNodeStoredSchema { * @remarks * Note: the owner of this may modify it over time: * thus if needing to hand onto a specific version, make a copy. - * @alpha + * @internal */ export interface TreeStoredSchema extends StoredSchemaCollection { /** @@ -199,7 +199,7 @@ export interface TreeStoredSchema extends StoredSchemaCollection { * @remarks * Note: the owner of this may modify it over time: * thus if needing to hang onto a specific version, make a copy. - * @alpha + * @internal */ export interface StoredSchemaCollection { /** diff --git a/packages/dds/tree/src/core/schema-stored/storedSchemaRepository.ts b/packages/dds/tree/src/core/schema-stored/storedSchemaRepository.ts index 4a0663a183de..89b31dd7bac0 100644 --- a/packages/dds/tree/src/core/schema-stored/storedSchemaRepository.ts +++ b/packages/dds/tree/src/core/schema-stored/storedSchemaRepository.ts @@ -19,7 +19,7 @@ import { * Events for {@link TreeStoredSchemaSubscription}. * * TODO: consider having before and after events per subtree instead while applying anchor (and this just shows what happens at the root). - * @alpha + * @internal */ export interface SchemaEvents { /** @@ -35,7 +35,7 @@ export interface SchemaEvents { /** * A collection of stored schema that fires events in response to changes. - * @alpha + * @internal */ export interface TreeStoredSchemaSubscription extends ISubscribable, @@ -43,7 +43,7 @@ export interface TreeStoredSchemaSubscription /** * Mutable collection of stored schema. - * @alpha + * @internal */ export interface MutableTreeStoredSchema extends TreeStoredSchemaSubscription { /** diff --git a/packages/dds/tree/src/core/schema-view/view.ts b/packages/dds/tree/src/core/schema-view/view.ts index 4b3be753045d..43f4464b2725 100644 --- a/packages/dds/tree/src/core/schema-view/view.ts +++ b/packages/dds/tree/src/core/schema-view/view.ts @@ -25,7 +25,7 @@ export enum Compatibility { * * TODO: * Currently this does not account for lazy schema updates, and/or use of adapters. - * @alpha + * @internal */ export enum AllowedUpdateType { /** @@ -44,7 +44,7 @@ export enum AllowedUpdateType { } /** - * @alpha + * @internal */ export interface TreeAdapter { readonly output: TreeNodeSchemaIdentifier; @@ -59,7 +59,7 @@ export interface TreeAdapter { * * TODO: Support more kinds of adapters * TODO: support efficient lookup of adapters - * @alpha + * @internal */ export interface Adapters { readonly tree?: readonly TreeAdapter[]; diff --git a/packages/dds/tree/src/core/tree/anchorSet.ts b/packages/dds/tree/src/core/tree/anchorSet.ts index bb07e863aa42..f047430047ac 100644 --- a/packages/dds/tree/src/core/tree/anchorSet.ts +++ b/packages/dds/tree/src/core/tree/anchorSet.ts @@ -34,7 +34,7 @@ import { AnnouncedVisitor } from "./visitorUtils"; /** * A way to refer to a particular tree location within an {@link AnchorSet}. * Associated with a ref count on the underlying {@link AnchorNode}. - * @alpha + * @internal */ export type Anchor = Brand; @@ -45,7 +45,7 @@ const NeverAnchor: Anchor = brand(0); /** * Maps anchors (which must be ones this locator knows about) to paths. - * @alpha + * @internal */ export interface AnchorLocator { /** @@ -63,7 +63,7 @@ export interface AnchorLocator { * Stores arbitrary, user-defined data on an {@link Anchor}. * This data is preserved over the course of that anchor's lifetime. * @see {@link anchorSlot} for creation and an example use case. - * @alpha + * @internal */ export type AnchorSlot = BrandedKey>, TContent>; @@ -76,7 +76,7 @@ export type AnchorSlot = BrandedKey * - Include sub-deltas in events. * - Add more events. * - * @alpha + * @internal */ export interface AnchorEvents { /** @@ -145,7 +145,7 @@ export interface AnchorEvents { * - Include sub-deltas in events. * - Add more events. * - * @alpha + * @internal */ export interface AnchorSetRootEvents { /** @@ -161,7 +161,7 @@ export interface AnchorSetRootEvents { /** * Node in a tree of anchors. - * @alpha + * @internal */ export interface AnchorNode extends UpPath, ISubscribable { /** @@ -204,7 +204,7 @@ export interface AnchorNode extends UpPath, ISubscribable(): AnchorSlot { return brandedSlot>(); @@ -220,7 +220,7 @@ export function anchorSlot(): AnchorSlot { * API surface to a small subset. * * @sealed - * @alpha + * @internal */ export class AnchorSet implements ISubscribable, AnchorLocator { private readonly events = createEmitter(); diff --git a/packages/dds/tree/src/core/tree/cursor.ts b/packages/dds/tree/src/core/tree/cursor.ts index 2d75bf8831a9..9f0706c60f03 100644 --- a/packages/dds/tree/src/core/tree/cursor.ts +++ b/packages/dds/tree/src/core/tree/cursor.ts @@ -28,7 +28,7 @@ export function isCursor(data: unknown): data is ITreeCursor { /** * A stateful low-level interface for reading tree data. - * @alpha + * @internal * * @remarks Cursor exists so that specialized data formats can be viewed through * a common abstraction. This allows performance optimizations to be done based @@ -284,7 +284,7 @@ export interface ITreeCursor { * For example, if a node is being inserted in the 5th position in a field "Foo", you can update a path in that node's subtree to its new path by prefixing it with * `{ parent: theNodeAboveTheMovedNode, rootFieldOverride: Foo, indexOffset: 5 }`. * See {@link prefixPath} and {@link prefixFieldPath} for how to apply the prefix to the paths. - * @alpha + * @internal */ export interface PathRootPrefix { /** @@ -309,7 +309,7 @@ export interface PathRootPrefix { } /** - * @alpha + * @internal */ export const enum CursorLocationType { /** @@ -327,7 +327,7 @@ export const enum CursorLocationType { /** * {@link ITreeCursor} that is never pending. - * @alpha + * @internal */ export interface ITreeCursorSynchronous extends ITreeCursor { readonly pending: false; diff --git a/packages/dds/tree/src/core/tree/delta.ts b/packages/dds/tree/src/core/tree/delta.ts index a3c98a9c6d19..f105600c3581 100644 --- a/packages/dds/tree/src/core/tree/delta.ts +++ b/packages/dds/tree/src/core/tree/delta.ts @@ -67,7 +67,7 @@ import { ITreeCursorSynchronous } from "./cursor"; /** * Represents the change made to a document. * Immutable, therefore safe to retain for async processing. - * @alpha + * @internal */ export interface Root { /** @@ -100,7 +100,7 @@ export interface Root { * Ownership and lifetime of data referenced by this cursor is unclear, * so it is a poor abstraction for this use-case which needs to hold onto the data in a non-exclusive (readonly) way. * Cursors can be one supported way to input data, but aren't a good storage format. - * @alpha + * @internal */ export type ProtoNode = ITreeCursorSynchronous; @@ -112,13 +112,13 @@ export type ProtoNode = ITreeCursorSynchronous; * Additionally, Cursors support sequences, so if using cursors, there are better ways to handle this than an array of cursors, * like using a cursor over all the content (starting in fields mode). * Long term something like TreeChunk should probably be used here. - * @alpha + * @internal */ export type ProtoNodes = readonly ProtoNode[]; /** * Represents a change being made to a part of the document tree. - * @alpha + * @internal */ export interface Mark { /** @@ -148,7 +148,7 @@ export interface Mark { /** * A globally unique ID for a node in a detached field. - * @alpha + * @internal */ export interface DetachedNodeId { readonly major?: string | number; @@ -156,13 +156,13 @@ export interface DetachedNodeId { } /** - * @alpha + * @internal */ export type FieldMap = ReadonlyMap>; /** * Represents changes made to a detached node - * @alpha + * @internal */ export interface DetachedNodeChanges { readonly id: DetachedNodeId; @@ -174,7 +174,7 @@ export interface DetachedNodeChanges { * * Tree creation is idempotent: if a tree with the same ID already exists, * then this build is ignored in favor of the existing tree. - * @alpha + * @internal */ export interface DetachedNodeBuild { readonly id: DetachedNodeId; @@ -183,7 +183,7 @@ export interface DetachedNodeBuild { /** * Represents the destruction of detached nodes - * @alpha + * @internal */ export interface DetachedNodeDestruction { readonly id: DetachedNodeId; @@ -192,7 +192,7 @@ export interface DetachedNodeDestruction { /** * Represents a detached node being assigned a new `DetachedNodeId`. - * @alpha + * @internal */ export interface DetachedNodeRename { readonly count: number; @@ -202,7 +202,7 @@ export interface DetachedNodeRename { /** * Represents the changes to perform on a given field. - * @alpha + * @internal */ export interface FieldChanges { /** diff --git a/packages/dds/tree/src/core/tree/detachedFieldIndex.ts b/packages/dds/tree/src/core/tree/detachedFieldIndex.ts index 143df3819402..97b7679ef217 100644 --- a/packages/dds/tree/src/core/tree/detachedFieldIndex.ts +++ b/packages/dds/tree/src/core/tree/detachedFieldIndex.ts @@ -23,9 +23,9 @@ import { makeDetachedNodeToFieldCodec } from "./detachedFieldIndexCodec"; /** * ID used to create a detached field key for a removed subtree. - * @alpha * * TODO: Move to Forest once forests can support multiple roots. + * @internal */ export type ForestRootId = Brand; diff --git a/packages/dds/tree/src/core/tree/mapTree.ts b/packages/dds/tree/src/core/tree/mapTree.ts index 752e01c65bef..e9e7f03b2ab9 100644 --- a/packages/dds/tree/src/core/tree/mapTree.ts +++ b/packages/dds/tree/src/core/tree/mapTree.ts @@ -13,7 +13,7 @@ import { NodeData } from "./types"; /** * Simple in memory tree representation based on Maps. * MapTrees should not store empty fields. - * @alpha + * @internal */ export interface MapTree extends NodeData { fields: Map; diff --git a/packages/dds/tree/src/core/tree/pathTree.ts b/packages/dds/tree/src/core/tree/pathTree.ts index 0fb22c721b8f..4b5961fecda5 100644 --- a/packages/dds/tree/src/core/tree/pathTree.ts +++ b/packages/dds/tree/src/core/tree/pathTree.ts @@ -11,7 +11,7 @@ import { DetachedField, keyAsDetachedField } from "./types"; * Identical to {@link UpPath}, but a duplicate declaration is needed to make * the default type parameter compile. * - * @alpha + * @internal */ export type UpPathDefault = UpPath; @@ -26,7 +26,7 @@ export type UpPathDefault = UpPath; * * UpPaths can be mutated over time and should be considered to be invalidated when any edits occurs: * Use of an UpPath that was acquired before the most recent edit is undefined behavior. - * @alpha + * @internal */ export interface UpPath { /** @@ -48,7 +48,7 @@ export interface UpPath { * Path from a field in the tree upward. * * See {@link UpPath}. - * @alpha + * @internal */ export interface FieldUpPath { /** @@ -67,13 +67,13 @@ export interface FieldUpPath { * A range of nodes in a detached field. * Unlike RangeUpPath, such ranges are generated by create and detach operations, * as well as consumed by destroy and attach operations. - * @alpha + * @internal */ export type DetachedRangeUpPath = Brand, "DetachedRangeUpPath">; /** * Delimits the extend of a range. - * @alpha + * @internal */ export interface Range { /** @@ -91,13 +91,13 @@ export interface Range { /** * A possibly empty range of nodes in a field. * This object only characterizes the location of the range, it does not own/contain the nodes in the range. - * @alpha + * @internal */ export interface RangeUpPath extends FieldUpPath, Range {} /** * A place in a field. - * @alpha + * @internal */ export interface PlaceUpPath extends FieldUpPath { /** @@ -108,21 +108,21 @@ export interface PlaceUpPath extends FieldUpPat /** * A place in a detached field. - * @alpha + * @internal */ export type DetachedPlaceUpPath = Brand, "DetachedRangeUpPath">; /** * Indicates the index of a node in a field. * Zero indicates the first node in a field. - * @alpha + * @internal */ export type NodeIndex = number; /** * Indicates a place between nodes in a field or at the extremity of a field. * Zero indicates the place at the start of the field (before the first node if any). - * @alpha + * @internal */ export type PlaceIndex = number; diff --git a/packages/dds/tree/src/core/tree/treeTextFormat.ts b/packages/dds/tree/src/core/tree/treeTextFormat.ts index 4ade43e7fe91..bb7fcf62543f 100644 --- a/packages/dds/tree/src/core/tree/treeTextFormat.ts +++ b/packages/dds/tree/src/core/tree/treeTextFormat.ts @@ -48,7 +48,7 @@ import { NodeData } from "./types"; * but even in those cases consider lists of key value pairs for serialization and using `Map` * for runtime. * - * @alpha + * @internal */ export interface FieldMapObject { [key: string]: TChild[]; @@ -57,14 +57,14 @@ export interface FieldMapObject { /** * Json comparable tree node, generic over child type. * Json compatibility assumes `TChild` is also json compatible. - * @alpha + * @internal */ export interface GenericTreeNode extends GenericFieldsNode, NodeData {} /** * Json comparable field collection, generic over child type. * Json compatibility assumes `TChild` is also json compatible. - * @alpha + * @internal */ export interface GenericFieldsNode { fields?: FieldMapObject; @@ -75,7 +75,7 @@ export interface GenericFieldsNode { * Can be passed to `JSON.stringify()` to produce a human-readable/editable JSON tree. * * JsonableTrees should not store empty fields. - * @alpha + * @internal */ export interface JsonableTree extends GenericTreeNode {} diff --git a/packages/dds/tree/src/core/tree/types.ts b/packages/dds/tree/src/core/tree/types.ts index f4c896f498ca..6df2e1af931d 100644 --- a/packages/dds/tree/src/core/tree/types.ts +++ b/packages/dds/tree/src/core/tree/types.ts @@ -8,7 +8,7 @@ import { FieldKey, TreeNodeSchemaIdentifier, ValueSchema } from "../schema-store import { _InlineTrick, brand, Brand, extractFromOpaque, Opaque } from "../../util"; /** - * @alpha + * @internal */ export type TreeType = TreeNodeSchemaIdentifier; @@ -23,7 +23,7 @@ export type TreeType = TreeNodeSchemaIdentifier; * This has to be a FieldKey since different nodes will have different TreeFieldStoredSchema for it. * This makes it prone to collisions and suggests * that this intention may be better conveyed by metadata on the ITreeSchema. - * @alpha + * @internal */ export const EmptyKey: FieldKey = brand(""); @@ -31,19 +31,19 @@ export const EmptyKey: FieldKey = brand(""); * FieldKey to use for the root of documents in places that need to refer to detached sequences or the root. * TODO: if we do want to standardize on a single value for this, * it likely should be namespaced or a UUID to avoid risk of collisions. - * @alpha + * @internal */ export const rootFieldKey: FieldKey = brand("rootFieldKey"); /** - * @alpha + * @internal */ export const rootField = keyAsDetachedField(rootFieldKey); /** * Location of a tree relative to is parent container (which can be a tree or forest). * - * @alpha + * @internal */ export interface ChildLocation { readonly container: ChildCollection; @@ -52,7 +52,7 @@ export interface ChildLocation { /** * Wrapper around DetachedField that can be detected at runtime. - * @alpha + * @internal */ export interface RootField { readonly key: DetachedField; @@ -60,7 +60,7 @@ export interface RootField { /** * Identifier for a child collection, either on a node/tree or at the root of a forest. - * @alpha + * @internal */ export type ChildCollection = FieldKey | RootField; @@ -76,7 +76,7 @@ export type ChildCollection = FieldKey | RootField; * * In some APIs DetachedFields are used as FieldKeys on a special implicit root node * to simplify the APIs and implementation. - * @alpha + * @internal */ export interface DetachedField extends Opaque> {} @@ -85,7 +85,7 @@ export interface DetachedField extends Opaque = [ { @@ -131,7 +131,7 @@ export type TreeValue = [ /** * Value stored on a node. - * @alpha + * @internal */ export type Value = undefined | TreeValue; @@ -142,7 +142,7 @@ export type Value = undefined | TreeValue; * Changes to this type might necessitate changes to `EncodedNodeData` or codecs. * See persistedTreeTextFormat's module documentation for more details. * - * @alpha + * @internal */ export interface NodeData { /** diff --git a/packages/dds/tree/src/core/tree/visitDelta.ts b/packages/dds/tree/src/core/tree/visitDelta.ts index 0c2f3edb2115..1865c5ff4073 100644 --- a/packages/dds/tree/src/core/tree/visitDelta.ts +++ b/packages/dds/tree/src/core/tree/visitDelta.ts @@ -197,7 +197,7 @@ function transferRoots( /** * Visitor for changes in a delta. * Must be freed after use. - * @alpha + * @internal */ export interface DeltaVisitor { /** diff --git a/packages/dds/tree/src/core/tree/visitPath.ts b/packages/dds/tree/src/core/tree/visitPath.ts index d5d1c2c26105..e3ad29dbd439 100644 --- a/packages/dds/tree/src/core/tree/visitPath.ts +++ b/packages/dds/tree/src/core/tree/visitPath.ts @@ -17,7 +17,7 @@ import { ProtoNodes } from "./delta"; * For any of these events, the paths are guaranteed to be valid at the time of the event, * and it is valid to read from the Forest at that path. * - * @alpha + * @internal */ export interface PathVisitor { /** diff --git a/packages/dds/tree/src/core/tree/visitorUtils.ts b/packages/dds/tree/src/core/tree/visitorUtils.ts index 7973bea6a917..810679504837 100644 --- a/packages/dds/tree/src/core/tree/visitorUtils.ts +++ b/packages/dds/tree/src/core/tree/visitorUtils.ts @@ -89,7 +89,7 @@ export function combineVisitors( /** * Visitor that is notified of changes before, after, and when changes are made. * Must be freed after use. - * @alpha + * @internal */ export interface AnnouncedVisitor { /** diff --git a/packages/dds/tree/src/domains/leafDomain.ts b/packages/dds/tree/src/domains/leafDomain.ts index 4492a60b0593..3939bd863e25 100644 --- a/packages/dds/tree/src/domains/leafDomain.ts +++ b/packages/dds/tree/src/domains/leafDomain.ts @@ -24,7 +24,7 @@ const library = builder.intoLibrary(); /** * Built-in {@link LeafNodeSchema}. - * @alpha + * @internal */ export const leaf = { /** diff --git a/packages/dds/tree/src/events/events.ts b/packages/dds/tree/src/events/events.ts index e01e49eb3e7b..9abdee42f50d 100644 --- a/packages/dds/tree/src/events/events.ts +++ b/packages/dds/tree/src/events/events.ts @@ -98,7 +98,7 @@ export interface ISubscribable> { /** * Interface for an event emitter that can emit typed events to subscribed listeners. - * @alpha + * @internal */ export interface IEmitter> { /** @@ -129,7 +129,7 @@ export interface IEmitter> { * * A class can delegate handling {@link ISubscribable} to the returned value while using it to emit the events. * See also `EventEmitter` which be used as a base class to implement {@link ISubscribable} via extension. - * @alpha + * @internal */ export function createEmitter>( noListeners?: NoListenersCallback, @@ -140,12 +140,12 @@ export function createEmitter>( /** * Called when the last listener for `eventName` is removed. * Useful for determining when to clean up resources related to detecting when the event might occurs. - * @alpha + * @internal */ export type NoListenersCallback> = (eventName: keyof Events) => void; /** - * @alpha + * @internal */ export interface HasListeners> { /** diff --git a/packages/dds/tree/src/external-utilities/typeboxValidator.ts b/packages/dds/tree/src/external-utilities/typeboxValidator.ts index e7beb596b7b1..a64eb199af6d 100644 --- a/packages/dds/tree/src/external-utilities/typeboxValidator.ts +++ b/packages/dds/tree/src/external-utilities/typeboxValidator.ts @@ -18,7 +18,7 @@ import type { JsonValidator } from "../codec"; * * Defining this validator in its own file also helps to ensure it is tree-shakeable. * - * @alpha + * @internal */ export const typeboxValidator: JsonValidator = { compile: (schema: Schema) => { diff --git a/packages/dds/tree/src/feature-libraries/contextuallyTyped.ts b/packages/dds/tree/src/feature-libraries/contextuallyTyped.ts index 10c435415427..ee5d7d5dd2f1 100644 --- a/packages/dds/tree/src/feature-libraries/contextuallyTyped.ts +++ b/packages/dds/tree/src/feature-libraries/contextuallyTyped.ts @@ -84,13 +84,13 @@ const scope = "contextuallyTyped"; /** * A symbol for the name of the type of a tree in contexts where string keys are already in use for fields. * See {@link TreeNodeSchemaIdentifier}. - * @alpha + * @internal */ export const typeNameSymbol: unique symbol = Symbol(`${scope}:typeName`); /** * A symbol for the value of a tree node in contexts where string keys are already in use for fields. - * @alpha + * @internal */ export const valueSymbol: unique symbol = Symbol(`${scope}:value`); @@ -148,13 +148,13 @@ export function getPossibleTypes( /** * A symbol used to define a {@link MarkedArrayLike} interface. - * @alpha + * @internal */ export const arrayLikeMarkerSymbol: unique symbol = Symbol("editable-tree:arrayLikeMarker"); /** * Can be used to mark a type which works like an array, but is not compatible with `Array.isArray`. - * @alpha + * @internal */ export interface MarkedArrayLike extends ArrayLikeMut { readonly [arrayLikeMarkerSymbol]: true; @@ -163,7 +163,7 @@ export interface MarkedArrayLike extends ArrayLi /** * Can be used to mark a type which works like an array, but is not compatible with `Array.isArray`. - * @alpha + * @internal */ export interface ReadonlyMarkedArrayLike extends ArrayLike { readonly [arrayLikeMarkerSymbol]: true; @@ -178,7 +178,7 @@ export interface ReadonlyMarkedArrayLike extends ArrayLike { * This is why `TSet extends TGet` is required. * * See https://github.com/microsoft/TypeScript/issues/43826. - * @alpha + * @internal */ export interface ArrayLikeMut extends ArrayLike { [n: number]: TSet; @@ -190,7 +190,7 @@ export interface ArrayLikeMut extends ArrayLike< * This format is intended for concise authoring of tree literals when the schema is statically known. * * Once schema aware APIs are implemented, they can be used to provide schema specific subsets of this type. - * @alpha + * @internal */ export type ContextuallyTypedNodeData = | ContextuallyTypedNodeDataObject @@ -208,7 +208,7 @@ export type ContextuallyTypedNodeData = * This format is intended for concise authoring of tree literals when the schema is statically known. * * Once schema aware APIs are implemented, they can be used to provide schema specific subsets of this type. - * @alpha + * @internal */ export type ContextuallyTypedFieldData = ContextuallyTypedNodeData | undefined; @@ -231,7 +231,7 @@ export function isArrayLike( /** * Checks the type of a `ContextuallyTypedNodeData`. - * @alpha + * @internal */ export function isContextuallyTypedNodeDataObject( data: ContextuallyTypedNodeData | undefined, @@ -241,7 +241,7 @@ export function isContextuallyTypedNodeDataObject( /** * Object case of {@link ContextuallyTypedNodeData}. - * @alpha + * @internal */ export interface ContextuallyTypedNodeDataObject { /** @@ -325,7 +325,7 @@ function shallowCompatibilityTest( * * TODO: this should probably be refactored into a `try` function which either returns a Cursor or a SchemaError with a path to the error. * @returns a cursor in Nodes mode for a single node containing the provided data. - * @alpha + * @internal */ export function cursorFromContextualData( context: TreeDataContext, @@ -339,7 +339,7 @@ export function cursorFromContextualData( /** * Strongly typed {@link cursorFromContextualData} for a TreeNodeSchema. * @returns a cursor in Nodes mode for a single node containing the provided data. - * @alpha + * @internal */ export function cursorForTypedTreeData( context: TreeDataContext, @@ -352,7 +352,7 @@ export function cursorForTypedTreeData( /** * Strongly typed {@link cursorFromContextualData} for AllowedTypes. * @returns a cursor in Nodes mode for a single node containing the provided data. - * @alpha + * @internal */ export function cursorForTypedData( context: TreeDataContext, @@ -383,7 +383,7 @@ export function cursorsFromContextualData( /** * Strongly typed {@link cursorsFromContextualData} for a TreeFieldSchema - * @alpha + * @internal */ export function cursorsForTypedFieldData( context: TreeDataContext, @@ -548,7 +548,7 @@ export function applyFieldTypesFromContext( * * TODO: this should allow a field cursor instead of an array of cursors. * TODO: Make this generic so a variant of this type that allows placeholders for detached sequences to consume. - * @alpha + * @internal */ export type NewFieldContent = | ITreeCursorSynchronous diff --git a/packages/dds/tree/src/feature-libraries/default-schema/defaultEditBuilder.ts b/packages/dds/tree/src/feature-libraries/default-schema/defaultEditBuilder.ts index 77dd3718686e..86ff2df91a08 100644 --- a/packages/dds/tree/src/feature-libraries/default-schema/defaultEditBuilder.ts +++ b/packages/dds/tree/src/feature-libraries/default-schema/defaultEditBuilder.ts @@ -94,7 +94,7 @@ export function relevantRemovedRoots( /** * Default editor for transactional tree data changes. - * @alpha + * @internal */ export interface IDefaultEditBuilder { /** @@ -356,7 +356,7 @@ export class DefaultEditBuilder implements ChangeFamilyEditor, IDefaultEditBuild } /** - * @alpha + * @internal */ export interface ValueFieldEditBuilder { /** @@ -367,7 +367,7 @@ export interface ValueFieldEditBuilder { } /** - * @alpha + * @internal */ export interface OptionalFieldEditBuilder { /** @@ -379,7 +379,7 @@ export interface OptionalFieldEditBuilder { } /** - * @alpha + * @internal */ export interface SequenceFieldEditBuilder { /** diff --git a/packages/dds/tree/src/feature-libraries/default-schema/defaultFieldKinds.ts b/packages/dds/tree/src/feature-libraries/default-schema/defaultFieldKinds.ts index c769ab65acb7..9ba54e3d6b75 100644 --- a/packages/dds/tree/src/feature-libraries/default-schema/defaultFieldKinds.ts +++ b/packages/dds/tree/src/feature-libraries/default-schema/defaultFieldKinds.ts @@ -183,30 +183,30 @@ export const fieldKinds: ReadonlyMap = // TODO: ensure thy work in generated docs. // TODO: add these comments to the rest of the cases below. /** - * @alpha + * @internal */ export interface Required extends FieldKind<"Value", Multiplicity.Single> {} /** - * @alpha + * @internal */ export interface Optional extends FieldKind<"Optional", Multiplicity.Optional> {} /** - * @alpha + * @internal */ export interface Sequence extends FieldKind<"Sequence", Multiplicity.Sequence> {} /** - * @alpha + * @internal */ export interface NodeKeyFieldKind extends FieldKind<"NodeKey", Multiplicity.Single> {} /** - * @alpha + * @internal */ export interface Forbidden extends FieldKind {} /** * Default FieldKinds with their editor types erased. - * @alpha + * @internal */ export const FieldKinds: { // TODO: inheritDoc for these somehow diff --git a/packages/dds/tree/src/feature-libraries/default-schema/defaultSchema.ts b/packages/dds/tree/src/feature-libraries/default-schema/defaultSchema.ts index 4b446ce467d0..f81c41ed252c 100644 --- a/packages/dds/tree/src/feature-libraries/default-schema/defaultSchema.ts +++ b/packages/dds/tree/src/feature-libraries/default-schema/defaultSchema.ts @@ -8,7 +8,7 @@ import { fieldKinds } from "./defaultFieldKinds"; /** * FullSchemaPolicy with the default field kinds. - * @alpha + * @internal */ export const defaultSchemaPolicy: FullSchemaPolicy = { fieldKinds, diff --git a/packages/dds/tree/src/feature-libraries/editableTreeBinder.ts b/packages/dds/tree/src/feature-libraries/editableTreeBinder.ts index 20e9a2437133..4f8cca18bd6f 100644 --- a/packages/dds/tree/src/feature-libraries/editableTreeBinder.ts +++ b/packages/dds/tree/src/feature-libraries/editableTreeBinder.ts @@ -25,7 +25,7 @@ import { FlexTreeNode } from "./flex-tree"; /** * Binder events reflecting atomic data operations - * @alpha + * @internal */ export interface OperationBinderEvents { delete(context: DeleteBindingContext): void; @@ -35,7 +35,7 @@ export interface OperationBinderEvents { /** * Binder events signaling state invalidation - * @alpha + * @internal */ export interface InvalidationBinderEvents { invalidation(context: InvalidationBindingContext): void; @@ -44,21 +44,21 @@ export interface InvalidationBinderEvents { /** * Compare function, generic. * - * @alpha + * @internal */ export type CompareFunction = (a: T, b: T) => number; /** * Compare function for binder events. * - * @alpha + * @internal */ export type BinderEventsCompare = CompareFunction; /** * Compare function for anchors. * - * @alpha + * @internal */ export type AnchorsCompare = CompareFunction; @@ -68,7 +68,7 @@ export type AnchorsCompare = CompareFunction; * TODO: add more options: * `filterFn?: (context: BindingContext) => boolean;` * `pathPolicy?: "relative" | "absolute";` - * @alpha + * @internal */ export interface BinderOptions { sortFn?: BinderEventsCompare; @@ -77,7 +77,7 @@ export interface BinderOptions { /** * Specialized binder options for flushable binders. * - * @alpha + * @internal */ export interface FlushableBinderOptions> extends BinderOptions { autoFlush: boolean; @@ -96,14 +96,14 @@ export interface FlushableBinderOptions> extends BinderOptio * _exact_ semantics include interpreting an `undefined` _index_ field in the {@link PathStep} as a wildcard. * * - * @alpha + * @internal */ export type MatchPolicy = SubtreePolicy | "subtree" | "path"; /** * Subtree match policy where max depth can be specified. * - * @alpha + * @internal */ export interface SubtreePolicy { maxDepth: number; @@ -112,7 +112,7 @@ export interface SubtreePolicy { /** * The data binder interface * - * @alpha + * @internal */ export interface DataBinder { /** @@ -139,7 +139,7 @@ export interface DataBinder { flush(): T; @@ -148,7 +148,7 @@ export interface Flushable { /** * An interface describing a flushable data binder. * - * @alpha + * @internal */ export interface FlushableDataBinder extends DataBinder, @@ -157,7 +157,7 @@ export interface FlushableDataBinder extends PathStep { readonly children: Map; @@ -190,7 +190,7 @@ export interface BindTree extends PathStep { /** * A bind policy is a combination of a {@link BindTree} and a {@link MatchPolicy}. * - * @alpha + * @internal */ export interface BindPolicy { readonly bindTree: BindTree; @@ -200,7 +200,7 @@ export interface BindPolicy { /** * Index symbol for syntax tree * - * @alpha + * @internal */ export const indexSymbol = Symbol("editable-tree-binder:index"); @@ -213,7 +213,7 @@ export const indexSymbol = Symbol("editable-tree-binder:index"); * see {@link BindTree} * see {@link compileSyntaxTree} * - * @alpha + * @internal */ export interface BindSyntaxTree { readonly [indexSymbol]?: number; @@ -226,28 +226,28 @@ export interface BindSyntaxTree { * see {@link BindTree} * see {@link UpPath} * - * @alpha + * @internal */ export type DownPath = PathStep[]; /** * A bind path is a top down path in a bind tree * - * @alpha + * @internal */ export type BindPath = DownPath; /** * A binding context specialized for {@link PathVisitor} triggered binding events. * - * @alpha + * @internal */ export type VisitorBindingContext = DeleteBindingContext | InsertBindingContext; /** * Enumeration of binding categories * - * @alpha + * @internal */ export const BindingType = { Delete: "delete", @@ -259,14 +259,14 @@ export const BindingType = { /** * The type of a binding context * - * @alpha + * @internal */ export type BindingContextType = (typeof BindingType)[keyof typeof BindingType]; /** * The binding context attribution common to all binding events * - * @alpha + * @internal */ export interface BindingContext { readonly type: BindingContextType; @@ -275,7 +275,7 @@ export interface BindingContext { /** * The binding context for a delete event * - * @alpha + * @internal */ export interface DeleteBindingContext extends BindingContext { readonly type: typeof BindingType.Delete; @@ -286,7 +286,7 @@ export interface DeleteBindingContext extends BindingContext { /** * The binding context for an insert event * - * @alpha + * @internal */ export interface InsertBindingContext extends BindingContext { readonly type: typeof BindingType.Insert; @@ -297,7 +297,7 @@ export interface InsertBindingContext extends BindingContext { /** * The binding context for an invalidation event * - * @alpha + * @internal */ export interface InvalidationBindingContext extends BindingContext { readonly type: typeof BindingType.Invalidation; @@ -306,7 +306,7 @@ export interface InvalidationBindingContext extends BindingContext { /** * The binding context for a batch event * - * @alpha + * @internal */ export interface BatchBindingContext extends BindingContext { readonly type: typeof BindingType.Batch; @@ -316,14 +316,14 @@ export interface BatchBindingContext extends BindingContext { /** * The listener interface. Internal. * - * @alpha + * @internal */ type Listener = (...args: unknown[]) => void; /** * A call tree is a {@link BindTree} augmented with listeners. Internal. * - * @alpha + * @internal */ type CallTree = BindTree & { listeners: Set; matchPolicy?: MatchPolicy }; @@ -866,7 +866,7 @@ class InvalidateDataBinder> /** * Compute a top-town {@link DownPath} from an {@link UpPath}. * - * @alpha + * @internal */ export function toDownPath(upPath: UpPath): DownPath { const downPath: UpPath[] = topDownPath(upPath); @@ -880,7 +880,7 @@ export function toDownPath(upPath: UpPath): DownPath { /** * Create a buffering data binder. * - * @alpha + * @internal */ export function createDataBinderBuffering>( view: ISubscribable, @@ -892,7 +892,7 @@ export function createDataBinderBuffering>( /** * Create a direct data binder. * - * @alpha + * @internal */ export function createDataBinderDirect>( view: ISubscribable, @@ -904,7 +904,7 @@ export function createDataBinderDirect>( /** * Create an invalidating data binder. * - * @alpha + * @internal */ export function createDataBinderInvalidating>( view: ISubscribable, @@ -917,7 +917,7 @@ export function createDataBinderInvalidating>( * Create binder options. If not specified, the default values are: * - sortFn: no sorting * - * @alpha + * @internal */ export function createBinderOptions({ sortFn }: { sortFn?: BinderEventsCompare }): BinderOptions { return { sortFn }; @@ -929,7 +929,7 @@ export function createBinderOptions({ sortFn }: { sortFn?: BinderEventsCompare } * - sortAnchorsFn: no sorting * - autoFlush: true * - * @alpha + * @internal */ export function createFlushableBinderOptions>({ sortFn, @@ -955,7 +955,7 @@ export function createFlushableBinderOptions>({ * * @param fns - a list of compare functions * @returns a compare function that can be used for sorting - * @alpha + * @internal */ export function comparePipeline(...fns: CompareFunction[]): CompareFunction { return (a: T, b: T): number => { @@ -985,7 +985,7 @@ function nativeSort(arr: T[], compareFn: CompareFunction): T[] { * The syntax tree is a compact representation of related {@link BindPath}s. * The match policy can be specified. If not specified, the default value is "path". * @returns a {@link BindPolicy} object - * @alpha + * @internal */ export function compileSyntaxTree( syntaxTree: BindSyntaxTree, diff --git a/packages/dds/tree/src/feature-libraries/fieldGenerator.ts b/packages/dds/tree/src/feature-libraries/fieldGenerator.ts index 386fd8dedcdd..86e6d450997f 100644 --- a/packages/dds/tree/src/feature-libraries/fieldGenerator.ts +++ b/packages/dds/tree/src/feature-libraries/fieldGenerator.ts @@ -8,10 +8,10 @@ import { FlexTreeSchema } from "./typed-schema"; /** * Information needed to interpret a subtree described by {@link ContextuallyTypedNodeData} and {@link ContextuallyTypedFieldData}. - * @alpha * TODO: * Currently being exposed at the package level which also requires us to export MapTree at the package level. * Refactor the FieldGenerator to use JsonableTree instead of MapTree, and convert them internally. + * @internal */ export interface TreeDataContext { /** @@ -34,16 +34,16 @@ export interface TreeDataContext { /** * Generates field content for a MapTree on demand. - * @alpha * TODO: * Currently being exposed at the package level which also requires us to export MapTree at the package level. * Refactor the FieldGenerator to use JsonableTree instead of MapTree, and convert them internally. + * @internal */ export type FieldGenerator = () => MapTree[]; /** * Information needed to interpret a subtree described by {@link ContextuallyTypedNodeData} and {@link ContextuallyTypedFieldData}. - * @alpha * TODO: * Currently being exposed at the package level which also requires us to export MapTree at the package level. * Refactor the FieldGenerator to use JsonableTree instead of MapTree, and convert them internally. + * @internal */ diff --git a/packages/dds/tree/src/feature-libraries/flex-tree/context.ts b/packages/dds/tree/src/feature-libraries/flex-tree/context.ts index 864504204860..4dde905e5f66 100644 --- a/packages/dds/tree/src/feature-libraries/flex-tree/context.ts +++ b/packages/dds/tree/src/feature-libraries/flex-tree/context.ts @@ -25,7 +25,7 @@ import { NodeKeys, SimpleNodeKeys } from "./nodeKeys"; /** * A common context of a "forest" of EditableTrees. * It handles group operations like transforming cursors into anchors for edits. - * @alpha + * @internal */ export interface FlexTreeContext extends ISubscribable { /** 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 64a22af67795..2e510f2a8736 100644 --- a/packages/dds/tree/src/feature-libraries/flex-tree/flexTreeTypes.ts +++ b/packages/dds/tree/src/feature-libraries/flex-tree/flexTreeTypes.ts @@ -28,7 +28,7 @@ import { FlexTreeContext } from "./context"; /** * Indicates that an object is a flex tree. - * @alpha + * @internal */ export const flexTreeMarker = Symbol("flexTreeMarker"); @@ -41,7 +41,7 @@ export function isFlexTreeNode(t: unknown): t is FlexTreeNode { } /** - * @alpha + * @internal */ export enum FlexTreeEntityKind { Node, @@ -67,7 +67,7 @@ export const boxedIterator = Symbol(); * Design and document iterator invalidation rules and ordering rules. * Providing a custom iterator type with place anchor semantics would be a good approach. * - * @alpha + * @internal */ export interface FlexTreeEntity { /** @@ -146,7 +146,7 @@ export const onNextChange = Symbol("onNextChange"); * the schema aware API may be more ergonomic. * All editing is actually done via {@link FlexTreeField}s: the nodes are immutable other than that they contain mutable fields. * - * @alpha + * @internal */ export interface FlexTreeNode extends FlexTreeEntity { readonly [flexTreeMarker]: FlexTreeEntityKind.Node; @@ -224,7 +224,7 @@ export interface FlexTreeNode extends FlexTreeEntity { * All content in the tree is accessible without down-casting, but if the schema is known, * the schema aware API may be more ergonomic. * - * @alpha + * @internal */ export interface FlexTreeField extends FlexTreeEntity { readonly [flexTreeMarker]: FlexTreeEntityKind.Field; @@ -274,7 +274,7 @@ export interface FlexTreeField extends FlexTreeEntity { * Additionally empty fields (those containing no nodes) are not distinguished from fields which do not exist. * This differs from JavaScript Maps which have a subtle distinction between storing undefined as a value in the map and deleting an entry from the map. * - * @alpha + * @internal */ export interface FlexTreeMapNode extends FlexTreeNode { readonly schema: TSchema; @@ -437,7 +437,7 @@ export interface FlexTreeMapNode extends F * @privateRemarks * FieldNodes do not unbox to their content, so in schema aware APIs which do unboxing, the FieldNode will NOT be skipped over. * This is a change from the old behavior to simplify unboxing and prevent cases where arbitrary deep chains of field nodes could unbox omitting information about the tree depth. - * @alpha + * @internal */ export interface FlexTreeFieldNode extends FlexTreeNode { readonly schema: TSchema; @@ -479,7 +479,7 @@ export interface FlexTreeFieldNode exten * For example, TypeScript has a built in `Record` type, but it requires all of the fields to have the same type, * putting its semantics half way between this library's "Object" schema and {@link FlexTreeMapNode}. * - * @alpha + * @internal */ export interface FlexTreeObjectNode extends FlexTreeNode { readonly schema: ObjectNodeSchema; @@ -496,7 +496,7 @@ export interface FlexTreeObjectNode extends FlexTreeNode { * @remarks * Leaves are immutable and have no children. * Leaf unboxes its content, so in schema aware APIs which do unboxing, the Leaf itself will be skipped over and its value will be returned directly. - * @alpha + * @internal */ export interface FlexTreeLeafNode extends FlexTreeNode { readonly schema: TSchema; @@ -515,7 +515,7 @@ export interface FlexTreeLeafNode extends * The corresponding implementation logic for this lives in `LazyTree.ts` under `buildStructClass`. * If you change the signature here, you will need to update that logic to match. * - * @alpha + * @internal */ export type FlexTreeObjectNodeTyped = ObjectNodeSchema extends TSchema @@ -532,7 +532,7 @@ export type FlexTreeObjectNodeTyped = * 2. Do we keep assignment operator + "setFoo" methods, or just use methods? * Inconsistency in the API experience could confusing for consumers. * - * @alpha + * @internal */ export type FlexTreeObjectNodeFields = FlattenKeys< { @@ -565,7 +565,7 @@ export type FlexTreeObjectNodeFields = FlattenKeys< /** * Field kinds that allow value assignment. * - * @alpha + * @internal */ export type AssignableFieldKinds = typeof FieldKinds.optional | typeof FieldKinds.required; @@ -577,7 +577,7 @@ export type AssignableFieldKinds = typeof FieldKinds.optional | typeof FieldKind * Strongly typed tree literals for inserting as the content of a field. * * If a cursor is provided, it must be in Fields mode. - * @alpha + * @internal */ export type FlexibleFieldContent = | InsertableFlexField @@ -587,7 +587,7 @@ export type FlexibleFieldContent = * Strongly typed tree literals for inserting as a node. * * If a cursor is provided, it must be in Nodes mode. - * @alpha + * @internal */ export type FlexibleNodeContent = | AllowedTypesToFlexInsertableTree @@ -599,7 +599,7 @@ export type FlexibleNodeContent = * Used to insert a batch of 0 or more nodes into some location in a {@link FlexTreeSequenceField}. * * If a cursor is provided, it must be in Fields mode. - * @alpha + * @internal */ export type FlexibleNodeSubSequence = | Iterable> @@ -611,7 +611,7 @@ export type FlexibleNodeSubSequence = * Examples: * CheckTypesOverlap\ = number | boolean * CheckTypesOverlap\ = never - * @alpha + * @internal */ export type CheckTypesOverlap = [Extract extends never ? never : T][0]; @@ -630,7 +630,7 @@ export type CheckTypesOverlap = [Extract extends never ? n * TODO: * Add anchor API that can actually hold onto locations in a sequence. * Currently only nodes can be held onto with anchors, and this does not replicate the behavior implemented for editing. - * @alpha + * @internal */ export interface FlexTreeSequenceField extends FlexTreeField { /** @@ -849,7 +849,7 @@ export interface FlexTreeSequenceField exten * * @remarks * Unboxes its content, so in schema aware APIs which do unboxing, the RequiredField itself will be skipped over and its content will be returned directly. - * @alpha + * @internal */ export interface FlexTreeRequiredField extends FlexTreeField { get content(): FlexTreeUnboxNodeUnion; @@ -870,7 +870,7 @@ export interface FlexTreeRequiredField exten * TODO: * Better centralize the documentation about what kinds of merge semantics are available for field kinds. * Maybe link editor? - * @alpha + * @internal */ export interface FlexTreeOptionalField extends FlexTreeField { get content(): FlexTreeUnboxNodeUnion | undefined; @@ -881,7 +881,7 @@ export interface FlexTreeOptionalField exten /** * Field that contains an immutable {@link StableNodeKey} identifying this node. - * @alpha + * @internal */ export interface FlexTreeNodeKeyField extends FlexTreeField { readonly localNodeKey: LocalNodeKey; @@ -894,7 +894,7 @@ export interface FlexTreeNodeKeyField extends FlexTreeField { /** * Schema aware specialization of {@link FlexTreeField}. - * @alpha + * @internal */ export type FlexTreeTypedField = FlexTreeTypedFieldInner< TSchema["kind"], @@ -903,7 +903,7 @@ export type FlexTreeTypedField = FlexTreeTypedF /** * Helper for implementing {@link FlexTreeTypedField}. - * @alpha + * @internal */ export type FlexTreeTypedFieldInner< Kind extends FieldKind, @@ -920,7 +920,7 @@ export type FlexTreeTypedFieldInner< /** * Schema aware specialization of {@link FlexTreeNode} for a given {@link AllowedTypes}. - * @alpha + * @internal */ export type FlexTreeTypedNodeUnion = T extends FlexList ? FlexTreeTypedNode, TreeNodeSchema>> @@ -928,7 +928,7 @@ export type FlexTreeTypedNodeUnion = T extends FlexList< /** * Schema aware specialization of {@link FlexTreeNode} for a given {@link TreeNodeSchema}. - * @alpha + * @internal */ export type FlexTreeTypedNode = TSchema extends LeafNodeSchema ? FlexTreeLeafNode @@ -949,7 +949,7 @@ export type FlexTreeTypedNode = TSchema extends * @remarks * Unboxes fields to their content if appropriate for the kind. * Recursively unboxes that content (then its content etc.) as well if the node union does unboxing. - * @alpha + * @internal */ export type FlexTreeUnboxField< TSchema extends TreeFieldSchema, @@ -959,7 +959,7 @@ export type FlexTreeUnboxField< /** * Helper for implementing FlexTreeUnboxField. - * @alpha + * @internal */ export type FlexTreeUnboxFieldInner< Kind extends FieldKind, @@ -982,7 +982,7 @@ export type FlexTreeUnboxFieldInner< * @remarks * Unboxes when not polymorphic. * Recursively unboxes that content as well if the node kind does unboxing. - * @alpha + * @internal */ export type FlexTreeUnboxNodeUnion = TTypes extends readonly [ InternalTypedSchemaTypes.LazyItem, @@ -1001,7 +1001,7 @@ export type FlexTreeUnboxNodeUnion = TTypes extends * `true` if T is known to be an array of one item. * `false` if T is known not to be an array of one item. * `boolean` if it is unknown if T is an array of one item or not. - * @alpha + * @internal */ export type IsArrayOfOne = T["length"] extends 1 ? true @@ -1014,7 +1014,7 @@ export type IsArrayOfOne = T["length"] extends 1 * @remarks * Unboxes if the node kind does unboxing. * Recursively unboxes that content as well if it does unboxing. - * @alpha + * @internal */ export type FlexTreeUnboxNode = TSchema extends LeafNodeSchema ? TreeValue @@ -1028,7 +1028,7 @@ export type FlexTreeUnboxNode = TSchema extends /** * Unboxed tree type for unknown schema cases. - * @alpha + * @internal */ export type FlexTreeUnknownUnboxed = TreeValue | FlexTreeNode; diff --git a/packages/dds/tree/src/feature-libraries/flex-tree/nodeKeys.ts b/packages/dds/tree/src/feature-libraries/flex-tree/nodeKeys.ts index 0f1488b4f044..818ecce1de07 100644 --- a/packages/dds/tree/src/feature-libraries/flex-tree/nodeKeys.ts +++ b/packages/dds/tree/src/feature-libraries/flex-tree/nodeKeys.ts @@ -11,7 +11,7 @@ import { FlexTreeObjectNode } from "./flexTreeTypes"; * A node key can be assigned to a node and allows that node to be easily retrieved from the tree at a later time. (see `nodeKey.map`). * @remarks {@link LocalNodeKey}s are put on {@link FlexTreeObjectNode}s via a special field. * A node with a node key in its schema must always have a node key. - * @alpha + * @internal */ export interface NodeKeys { /** diff --git a/packages/dds/tree/src/feature-libraries/flex-tree/treeEvents.ts b/packages/dds/tree/src/feature-libraries/flex-tree/treeEvents.ts index d04142a416b2..a43b7405a079 100644 --- a/packages/dds/tree/src/feature-libraries/flex-tree/treeEvents.ts +++ b/packages/dds/tree/src/feature-libraries/flex-tree/treeEvents.ts @@ -21,7 +21,7 @@ import { FlexTreeNode } from "./flexTreeTypes"; /** * An event raised on a {@link FlexTreeNode}. * - * @alpha + * @internal */ export interface TreeEvent { /** @@ -41,7 +41,7 @@ export interface TreeEvent { * - Add more events. * - Have some events (or a way to defer events) until the tree can be read. * - * @alpha + * @internal */ export interface EditableTreeEvents { /** diff --git a/packages/dds/tree/src/feature-libraries/memoizedIdRangeAllocator.ts b/packages/dds/tree/src/feature-libraries/memoizedIdRangeAllocator.ts index 97bcf076c4d4..3153e364e5ee 100644 --- a/packages/dds/tree/src/feature-libraries/memoizedIdRangeAllocator.ts +++ b/packages/dds/tree/src/feature-libraries/memoizedIdRangeAllocator.ts @@ -16,7 +16,7 @@ import { /** * A unique ID allocator that returns the output ID for the same input ID. * - * @alpha + * @internal */ export interface MemoizedIdRangeAllocator { /** @@ -42,7 +42,7 @@ export interface MemoizedIdRangeAllocator { } /** - * @alpha + * @internal */ export interface IdRange { readonly first: ChangesetLocalId; @@ -50,7 +50,7 @@ export interface IdRange { } /** - * @alpha + * @internal */ export const MemoizedIdRangeAllocator = { fromNextId(nextId: number = 0): MemoizedIdRangeAllocator { diff --git a/packages/dds/tree/src/feature-libraries/modular-schema/comparison.ts b/packages/dds/tree/src/feature-libraries/modular-schema/comparison.ts index 7c90e531f154..927070011b1a 100644 --- a/packages/dds/tree/src/feature-libraries/modular-schema/comparison.ts +++ b/packages/dds/tree/src/feature-libraries/modular-schema/comparison.ts @@ -172,7 +172,7 @@ export function allowsRepoSuperset( } /** - * @alpha + * @internal */ export function isNeverField( policy: FullSchemaPolicy, diff --git a/packages/dds/tree/src/feature-libraries/modular-schema/crossFieldQueries.ts b/packages/dds/tree/src/feature-libraries/modular-schema/crossFieldQueries.ts index 4c21f040991c..d37a0faf6f16 100644 --- a/packages/dds/tree/src/feature-libraries/modular-schema/crossFieldQueries.ts +++ b/packages/dds/tree/src/feature-libraries/modular-schema/crossFieldQueries.ts @@ -44,7 +44,7 @@ export function getFirstFromCrossFieldMap( } /** - * @alpha + * @internal */ export enum CrossFieldTarget { Source, @@ -54,7 +54,7 @@ export enum CrossFieldTarget { /** * Used by {@link FieldChangeHandler} implementations for exchanging information across other fields * while rebasing, composing, or inverting a change. - * @alpha + * @internal */ export interface CrossFieldManager { /** diff --git a/packages/dds/tree/src/feature-libraries/modular-schema/fieldChangeHandler.ts b/packages/dds/tree/src/feature-libraries/modular-schema/fieldChangeHandler.ts index 88af1623eb98..1eeefc2f3d16 100644 --- a/packages/dds/tree/src/feature-libraries/modular-schema/fieldChangeHandler.ts +++ b/packages/dds/tree/src/feature-libraries/modular-schema/fieldChangeHandler.ts @@ -164,17 +164,17 @@ export interface FieldEditor { /** * The `index` represents the index of the child node in the input context. * The `index` should be `undefined` iff the child node does not exist in the input context (e.g., an inserted node). - * @alpha + * @internal */ export type ToDelta = (child: NodeChangeset) => DeltaFieldMap; /** - * @alpha + * @internal */ export type NodeChangeInverter = (change: NodeChangeset) => NodeChangeset; /** - * @alpha + * @internal */ export enum NodeExistenceState { Alive, @@ -182,7 +182,7 @@ export enum NodeExistenceState { } /** - * @alpha + * @internal */ export type NodeChangeRebaser = ( change: NodeChangeset | undefined, @@ -195,19 +195,19 @@ export type NodeChangeRebaser = ( ) => NodeChangeset | undefined; /** - * @alpha + * @internal */ export type NodeChangeComposer = (changes: TaggedChange[]) => NodeChangeset; /** - * @alpha + * @internal */ export type NodeChangePruner = (change: NodeChangeset) => NodeChangeset | undefined; /** * A function that returns the set of removed roots that should be in memory for a given node changeset to be applied. * - * @alpha + * @internal */ export type RelevantRemovedRootsFromChild = (child: NodeChangeset) => Iterable; @@ -216,7 +216,7 @@ export interface RebaseRevisionMetadata extends RevisionMetadataSource { } /** - * @alpha + * @internal */ export function getIntention( rev: RevisionTag | undefined, diff --git a/packages/dds/tree/src/feature-libraries/modular-schema/fieldKind.ts b/packages/dds/tree/src/feature-libraries/modular-schema/fieldKind.ts index dc9ae363bee7..ddf97cf4420a 100644 --- a/packages/dds/tree/src/feature-libraries/modular-schema/fieldKind.ts +++ b/packages/dds/tree/src/feature-libraries/modular-schema/fieldKind.ts @@ -27,7 +27,7 @@ import { FieldChangeHandler, FieldEditor } from "./fieldChangeHandler"; * * These policies include the data encoding, change encoding, change rebase and change application. * - * @sealed @alpha + * @sealed @internal * @privateRemarks * This being @sealed is for users of this package. * This package itself may provide implementations. @@ -135,7 +135,7 @@ export function withEditor< /** * Policy from the app for interpreting the stored schema. * The app must ensure consistency for all users of the document. - * @alpha + * @internal */ export interface FullSchemaPolicy { /** diff --git a/packages/dds/tree/src/feature-libraries/modular-schema/modularChangeFamily.ts b/packages/dds/tree/src/feature-libraries/modular-schema/modularChangeFamily.ts index 2562b67d3474..16eabee38f81 100644 --- a/packages/dds/tree/src/feature-libraries/modular-schema/modularChangeFamily.ts +++ b/packages/dds/tree/src/feature-libraries/modular-schema/modularChangeFamily.ts @@ -900,7 +900,7 @@ function deltaFromNodeChange( } /** - * @alpha + * @internal * @param revInfos - This should describe all revisions in the rebase path, even if not part of the current base changeset. * For example, when rebasing change B from a local branch [A, B, C] over a branch [X, Y], the `revInfos` must include * the changes [A⁻¹ X, Y, A'] for each rebase step of B. @@ -989,7 +989,7 @@ function newCrossFieldTable(): CrossFieldTable { } /** - * @alpha + * @internal */ interface ConstraintState { violationCount: number; @@ -1276,7 +1276,7 @@ export class ModularEditBuilder extends EditBuilder { } /** - * @alpha + * @internal */ export interface FieldEditDescription { type: "field"; @@ -1286,7 +1286,7 @@ export interface FieldEditDescription { } /** - * @alpha + * @internal */ export interface GlobalEditDescription { type: "global"; @@ -1294,7 +1294,7 @@ export interface GlobalEditDescription { } /** - * @alpha + * @internal */ export type EditDescription = FieldEditDescription | GlobalEditDescription; diff --git a/packages/dds/tree/src/feature-libraries/modular-schema/modularChangeTypes.ts b/packages/dds/tree/src/feature-libraries/modular-schema/modularChangeTypes.ts index acdfb23e2acc..15a8d7924859 100644 --- a/packages/dds/tree/src/feature-libraries/modular-schema/modularChangeTypes.ts +++ b/packages/dds/tree/src/feature-libraries/modular-schema/modularChangeTypes.ts @@ -15,7 +15,7 @@ import { Brand } from "../../util"; import { TreeChunk } from "../chunked-forest"; /** - * @alpha + * @internal */ export interface ModularChangeset extends HasFieldChanges { /** @@ -36,7 +36,7 @@ export interface ModularChangeset extends HasFieldChanges { } /** - * @alpha + * @internal */ export interface NodeExistsConstraint { violated: boolean; @@ -44,26 +44,26 @@ export interface NodeExistsConstraint { /** * Changeset for a subtree rooted at a specific node. - * @alpha + * @internal */ export interface NodeChangeset extends HasFieldChanges { nodeExistsConstraint?: NodeExistsConstraint; } /** - * @alpha + * @internal */ export interface HasFieldChanges { fieldChanges?: FieldChangeMap; } /** - * @alpha + * @internal */ export type FieldChangeMap = Map; /** - * @alpha + * @internal */ export interface FieldChange { fieldKind: FieldKindIdentifier; @@ -80,6 +80,6 @@ export interface FieldChange { } /** - * @alpha + * @internal */ export type FieldChangeset = Brand; diff --git a/packages/dds/tree/src/feature-libraries/multiplicity.ts b/packages/dds/tree/src/feature-libraries/multiplicity.ts index d91ba9804d72..2b37beca4e92 100644 --- a/packages/dds/tree/src/feature-libraries/multiplicity.ts +++ b/packages/dds/tree/src/feature-libraries/multiplicity.ts @@ -6,7 +6,7 @@ * Describes how a particular field functions. * * This determine its reading and editing APIs, multiplicity, and what merge resolution policies it will use. - * @alpha + * @internal */ export enum Multiplicity { /** diff --git a/packages/dds/tree/src/feature-libraries/node-key/nodeKey.ts b/packages/dds/tree/src/feature-libraries/node-key/nodeKey.ts index 9b2d961452ca..16725bf7c788 100644 --- a/packages/dds/tree/src/feature-libraries/node-key/nodeKey.ts +++ b/packages/dds/tree/src/feature-libraries/node-key/nodeKey.ts @@ -14,7 +14,7 @@ import { TreeNodeSchemaIdentifier } from "../../core"; * However, they are otherwise preferential to use over {@link StableNodeKey}s as they are much smaller. * For example, they are more efficient than {@link StableNodeKey}s when used as keys in a map. * {@link LocalNodeKey}s may be compared or equated via {@link compareLocalNodeKeys}. - * @alpha + * @internal */ export interface LocalNodeKey extends Opaque> {} @@ -22,7 +22,7 @@ export interface LocalNodeKey extends Opaque; @@ -32,7 +32,7 @@ export type StableNodeKey = Brand; * @param a - the first key to compare * @param b - the second key to compare * @returns `0` if `a` and `b` are the same key, otherwise `-1` if `a` is ordered before `b` or `1` if `a` is ordered after `b`. - * @alpha + * @internal */ export function compareLocalNodeKeys(a: LocalNodeKey, b: LocalNodeKey): -1 | 0 | 1 { return a === b ? 0 : a > b ? 1 : -1; @@ -41,7 +41,7 @@ export function compareLocalNodeKeys(a: LocalNodeKey, b: LocalNodeKey): -1 | 0 | /** * The key for the special field for {@link LocalNodeKey}s, * which allows nodes to be given keys that can be used to find the nodes via the node key index. - * @alpha + * @internal * @privateRemarks TODO: Come up with a unified and collision-resistant naming schema for fields defined by the system. * For now, we'll use `__` to reduce the change of collision, since this is what other internal properties use in Fluid. */ @@ -49,7 +49,7 @@ export const nodeKeyFieldKey = "__n_id__"; /** * The TreeNodeSchemaIdentifier for node keys. - * @alpha + * @internal * @privateRemarks TODO: Come up with a unified and collision-resistant naming schema for types defined by the system. * For now, we'll use `__` to reduce the change of collision, since this is what other internal properties use in Fluid. */ 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 5c74cb5f6ea0..7a6324a4bb48 100644 --- a/packages/dds/tree/src/feature-libraries/schema-aware/schemaAware.ts +++ b/packages/dds/tree/src/feature-libraries/schema-aware/schemaAware.ts @@ -22,7 +22,7 @@ import { Multiplicity } from "../multiplicity"; /** * Empty Object for use in type computations that should contribute no fields when `&`ed with another type. - * @alpha + * @internal */ // Using {} instead of interface {} or Record for empty object here produces better IntelliSense in the generated types than `Record` recommended by the linter. // Making this a type instead of an interface prevents it from showing up in IntelliSense, and also avoids breaking the typing somehow. @@ -31,7 +31,7 @@ export type EmptyObject = {}; /** * Collects the various parts of the API together. - * @alpha + * @internal */ export type CollectOptions< TTypedFields, @@ -50,7 +50,7 @@ export type CollectOptions< /** * Remove type brand from name. - * @alpha + * @internal */ export type UnbrandedName = [ TName extends TreeNodeSchemaIdentifier ? S : string, @@ -60,7 +60,7 @@ export type UnbrandedName = [ * `{ [key: string]: FieldSchemaTypeInfo }` to `{ [key: string]: TypedTree }` * * In Editable mode, unwraps the fields. - * @alpha + * @internal */ export type TypedFields = [ TFields extends { [key: string]: TreeFieldSchema } @@ -72,7 +72,7 @@ export type TypedFields = [ ApplyMultiplicity< @@ -83,7 +83,7 @@ export type InsertableFlexField = [ /** * Adjusts the API for a field based on its Multiplicity. - * @alpha + * @internal */ export type ApplyMultiplicity = { [Multiplicity.Forbidden]: undefined; @@ -94,7 +94,7 @@ export type ApplyMultiplicity = /** * Takes in `AllowedTypes` and returns a TypedTree union. - * @alpha + * @internal */ export type AllowedTypesToFlexInsertableTree = [ T extends readonly LazyItem[] @@ -104,7 +104,7 @@ export type AllowedTypesToFlexInsertableTree = [ /** * Generate a schema aware API for a single tree schema. - * @alpha + * @internal */ export type InsertableFlexNode = FlattenKeys< CollectOptions< diff --git a/packages/dds/tree/src/feature-libraries/schema-index/schemaSummarizer.ts b/packages/dds/tree/src/feature-libraries/schema-index/schemaSummarizer.ts index 20cdbf4cfffc..1238addcc414 100644 --- a/packages/dds/tree/src/feature-libraries/schema-index/schemaSummarizer.ts +++ b/packages/dds/tree/src/feature-libraries/schema-index/schemaSummarizer.ts @@ -131,7 +131,7 @@ export class SchemaSummarizer implements Summarizable { * @privateRemarks * This currently uses the schema summary format, but that could be changed to something more human readable (particularly if the encoded format becomes less human readable). * This intentionally does not leak the format types in the API. - * @alpha + * @internal */ export function encodeTreeSchema(schema: TreeStoredSchema): JsonCompatible { return encodeRepo(schema); diff --git a/packages/dds/tree/src/feature-libraries/schemaBuilderBase.ts b/packages/dds/tree/src/feature-libraries/schemaBuilderBase.ts index e1f4f10eece3..4726d31fe7b9 100644 --- a/packages/dds/tree/src/feature-libraries/schemaBuilderBase.ts +++ b/packages/dds/tree/src/feature-libraries/schemaBuilderBase.ts @@ -30,7 +30,7 @@ import { defaultSchemaPolicy } from "./default-schema"; /** * Configuration for a SchemaBuilder. - * @alpha + * @internal */ export interface SchemaBuilderOptions { /** @@ -68,7 +68,7 @@ export interface SchemaBuilderOptions { /** * Builds schema libraries, and the schema within them. - * @alpha + * @internal * * @privateRemarks * This class does not directly depend on any specific field kinds, @@ -348,7 +348,7 @@ export class SchemaBuilderBase< /** * Schema information collected by a SchemaBuilder, including referenced libraries. * Can be aggregated into other libraries by adding to their builders. - * @alpha + * @internal */ export interface SchemaLibrary extends SchemaCollection { /** @@ -359,13 +359,13 @@ export interface SchemaLibrary extends SchemaCollection { /** * Generalized version of AllowedTypes allowing for more concise expressions in some cases. - * @alpha + * @internal */ export type ImplicitAllowedTypes = AllowedTypes | TreeNodeSchema | Any; /** * Normalizes an {@link ImplicitAllowedTypes} into {@link AllowedTypes}. - * @alpha + * @internal */ export type NormalizeAllowedTypes = TSchema extends TreeNodeSchema @@ -392,7 +392,7 @@ export function normalizeAllowedTypes( /** * Normalizes an {@link ImplicitFieldSchema} into a {@link TreeFieldSchema}. - * @alpha + * @internal */ export type NormalizeField< TSchema extends ImplicitFieldSchema, @@ -420,6 +420,6 @@ export function normalizeField = (changes: TaggedChange[]) => TNodeChange; diff --git a/packages/dds/tree/src/feature-libraries/sequence-field/types.ts b/packages/dds/tree/src/feature-libraries/sequence-field/types.ts index e814f6fd5275..4747932b9f01 100644 --- a/packages/dds/tree/src/feature-libraries/sequence-field/types.ts +++ b/packages/dds/tree/src/feature-libraries/sequence-field/types.ts @@ -31,7 +31,7 @@ export type NodeChangeType = NodeChangeset; * Note that `LineageEvent`s with the same revision are not necessarily referring to the same detach. * `LineageEvent`s for a given revision can only be meaningfully compared if it is known that they must refer to the * same detach. - * @alpha + * @internal */ export interface LineageEvent { readonly revision: RevisionTag; @@ -45,7 +45,7 @@ export interface LineageEvent { } /** - * @alpha + * @internal */ export interface HasLineage { /** @@ -60,7 +60,7 @@ export interface IdRange { } /** - * @alpha + * @internal */ export interface CellId extends ChangeAtomId, HasLineage { /** diff --git a/packages/dds/tree/src/feature-libraries/sequence-field/utils.ts b/packages/dds/tree/src/feature-libraries/sequence-field/utils.ts index 2945902cad62..30ebd9367cec 100644 --- a/packages/dds/tree/src/feature-libraries/sequence-field/utils.ts +++ b/packages/dds/tree/src/feature-libraries/sequence-field/utils.ts @@ -922,7 +922,7 @@ export function areComposable(changes: TaggedChange>[]): bool } /** - * @alpha + * @internal */ export interface CrossFieldTable extends CrossFieldManager { srcQueries: CrossFieldQuerySet; @@ -934,7 +934,7 @@ export interface CrossFieldTable extends CrossFieldManager { } /** - * @alpha + * @internal */ export function newCrossFieldTable(): CrossFieldTable { const srcQueries: CrossFieldQuerySet = new Map(); @@ -995,7 +995,7 @@ export function newCrossFieldTable(): CrossFieldTable { } /** - * @alpha + * @internal */ export function newMoveEffectTable(): MoveEffectTable { return newCrossFieldTable(); diff --git a/packages/dds/tree/src/feature-libraries/storedToViewSchema.ts b/packages/dds/tree/src/feature-libraries/storedToViewSchema.ts index 313b0ae0baf7..adee87ba0ffb 100644 --- a/packages/dds/tree/src/feature-libraries/storedToViewSchema.ts +++ b/packages/dds/tree/src/feature-libraries/storedToViewSchema.ts @@ -25,7 +25,7 @@ import { * If the input schema came from a view schema, it will not return the same view schema, and will not be compatible: * the returned TreeSchema is simply one which schematize will not object to. * Assumes the schema uses the default field kinds. - * @alpha + * @internal */ export function treeSchemaFromStoredSchema(schema: TreeStoredSchema): FlexTreeSchema { const map: Map = new Map(); diff --git a/packages/dds/tree/src/feature-libraries/treeCompressionUtils.ts b/packages/dds/tree/src/feature-libraries/treeCompressionUtils.ts index a622b7ec3d64..b86d3eef86cc 100644 --- a/packages/dds/tree/src/feature-libraries/treeCompressionUtils.ts +++ b/packages/dds/tree/src/feature-libraries/treeCompressionUtils.ts @@ -7,7 +7,7 @@ * Selects which heuristics to use when encoding tree content. * All encoding options here are compatible with the same decoder: * the selection here does not impact compatibility. - * @alpha + * @internal */ export enum TreeCompressionStrategy { /** diff --git a/packages/dds/tree/src/feature-libraries/treeCursorUtils.ts b/packages/dds/tree/src/feature-libraries/treeCursorUtils.ts index 1c2eba903833..3d8de0afeb5e 100644 --- a/packages/dds/tree/src/feature-libraries/treeCursorUtils.ts +++ b/packages/dds/tree/src/feature-libraries/treeCursorUtils.ts @@ -22,7 +22,7 @@ import { fail } from "../util"; /** * {@link ITreeCursorSynchronous} that can return the underlying node objects. - * @alpha + * @internal */ export interface CursorWithNode extends ITreeCursorSynchronous { /** @@ -47,7 +47,7 @@ export interface CursorWithNode extends ITreeCursorSynchronous { * Create a cursor, in `nodes` mode at the root of the provided tree. * * @returns an {@link ITreeCursorSynchronous} for a single root in `nodes` mode. - * @alpha + * @internal */ export function stackTreeNodeCursor( adapter: CursorAdapter, @@ -60,7 +60,7 @@ export function stackTreeNodeCursor( * Create a cursor, in `fields` mode at the `detachedField` under the provided `root`. * * @returns an {@link ITreeCursorSynchronous} for `detachedField` of `root` in `fields` mode. - * @alpha + * @internal */ export function stackTreeFieldCursor( adapter: CursorAdapter, @@ -76,7 +76,7 @@ export function stackTreeFieldCursor( /** * Provides functionality to allow a {@link stackTreeNodeCursor} and {@link stackTreeFieldCursor} to implement cursors. - * @alpha + * @internal */ export interface CursorAdapter { /** @@ -382,7 +382,7 @@ class StackCursor extends SynchronousCursor implements CursorWithNode = { /** * Extract a JsonableTree from the contents of the given ITreeCursor's current node. - * @alpha + * @internal */ export function jsonableTreeFromCursor(cursor: ITreeCursor): JsonableTree { assert(cursor.mode === CursorLocationType.Nodes, 0x3ba /* must start at node */); diff --git a/packages/dds/tree/src/feature-libraries/typed-schema/flexList.ts b/packages/dds/tree/src/feature-libraries/typed-schema/flexList.ts index 9cad43716cec..d7369d6731d1 100644 --- a/packages/dds/tree/src/feature-libraries/typed-schema/flexList.ts +++ b/packages/dds/tree/src/feature-libraries/typed-schema/flexList.ts @@ -87,7 +87,7 @@ export function normalizeFlexListEager( export type LazyItem = Item | (() => Item); /** - * @alpha + * @internal */ export type NormalizedFlexList = readonly Item[]; @@ -102,7 +102,7 @@ export type ExtractItemType = Item extends () => infer Re : Item; /** - * @alpha + * @internal */ export type ExtractListItemType = List extends FlexList ? Item @@ -125,7 +125,7 @@ export type FlexListToUnion = ExtractItemType = List extends readonly [ infer Head, diff --git a/packages/dds/tree/src/feature-libraries/typed-schema/schemaCollection.ts b/packages/dds/tree/src/feature-libraries/typed-schema/schemaCollection.ts index 299796e33954..9ce05e64977d 100644 --- a/packages/dds/tree/src/feature-libraries/typed-schema/schemaCollection.ts +++ b/packages/dds/tree/src/feature-libraries/typed-schema/schemaCollection.ts @@ -25,7 +25,7 @@ import { Sourced } from "./view"; /** * Schema data collected by a single SchemaBuilder (does not include referenced libraries). - * @alpha + * @internal */ export interface SchemaLibraryData extends SchemaCollection { readonly name: string; @@ -46,7 +46,7 @@ export interface SourcedAdapters { /** * Allows opting into and out of errors for some unusual schema patterns which are usually bugs. - * @alpha + * @internal */ export interface SchemaLintConfiguration { readonly rejectForbidden: boolean; diff --git a/packages/dds/tree/src/feature-libraries/typed-schema/typedTreeSchema.ts b/packages/dds/tree/src/feature-libraries/typed-schema/typedTreeSchema.ts index f9d81f98f51a..78180f40067f 100644 --- a/packages/dds/tree/src/feature-libraries/typed-schema/typedTreeSchema.ts +++ b/packages/dds/tree/src/feature-libraries/typed-schema/typedTreeSchema.ts @@ -31,14 +31,14 @@ import { LazyItem } from "./flexList"; import { ObjectToMap, objectToMapTyped } from "./typeUtils"; /** - * @alpha + * @internal */ export interface Fields { readonly [key: string]: TreeFieldSchema; } /** - * @alpha + * @internal */ export type NormalizeObjectNodeFields = { readonly [Property in keyof T]: NormalizeField; @@ -50,7 +50,7 @@ export type NormalizeObjectNodeFields = { * These extends constraints only serve as documentation: * to avoid breaking compilation, this type has to not actually enforce anything, and thus is just `unknown`. * Therefore the type safety is the responsibility of the user of the API. - * @alpha + * @internal */ export type Unenforced<_DesiredExtendsConstraint> = unknown; @@ -62,7 +62,7 @@ export type Unenforced<_DesiredExtendsConstraint> = unknown; * T must extend TreeSchemaSpecification. * This can not be enforced using TypeScript since doing so breaks recursive type support. * See note on SchemaBuilder.fieldRecursive. - * @alpha + * @internal */ export abstract class TreeNodeSchemaBase< const out Name extends string = string, @@ -79,7 +79,7 @@ export abstract class TreeNodeSchemaBase< } /** - * @alpha + * @internal */ export class MapNodeSchema< const out Name extends string = string, @@ -107,7 +107,7 @@ export class MapNodeSchema< } /** - * @alpha + * @internal */ export class LeafNodeSchema< const out Name extends string = string, @@ -135,7 +135,7 @@ export class LeafNodeSchema< } /** - * @alpha + * @internal */ export class ObjectNodeSchema< const out Name extends string = string, @@ -184,8 +184,8 @@ export class ObjectNodeSchema< } /** - * @alpha * TODO: replace (or subclass) this with more specific types, like "List". + * @internal */ export class FieldNodeSchema< Name extends string = string, @@ -217,7 +217,7 @@ export class FieldNodeSchema< } /** - * @alpha + * @internal * @privateRemarks * This could be an exhaustive union, or just the common base type. * Using just the base type prevents exhaustive matching, which has both pros and cons. @@ -228,7 +228,7 @@ export type TreeNodeSchema = TreeNodeSchemaBase; /** * Convert FieldSchemaSpecification | undefined into TreeFieldSchema. - * @alpha + * @internal */ export type NormalizeField = T extends TreeFieldSchema ? T @@ -257,19 +257,19 @@ function normalizeField(t: T): NormalizeF /** * Allow any node (as long as it meets the schema for its own type). - * @alpha + * @internal */ export const Any = "Any" as const; /** * Allow any node (as long as it meets the schema for its own type). - * @alpha + * @internal */ export type Any = typeof Any; /** * Tree type, but can be wrapped in a function to allow referring to types before they are declared. * This makes recursive and co-recursive types possible. - * @alpha + * @internal */ export type LazyTreeNodeSchema = TreeNodeSchema | (() => TreeNodeSchema); @@ -277,13 +277,13 @@ export type LazyTreeNodeSchema = TreeNodeSchema | (() => TreeNodeSchema); * Types for use in fields. * * "Any" is boxed in an array to allow use as variadic parameter. - * @alpha + * @internal */ export type AllowedTypes = readonly [Any] | readonly LazyItem[]; /** * Checks if an {@link AllowedTypes} is {@link (Any:type)}. - * @alpha + * @internal */ export function allowedTypesIsAny(t: AllowedTypes): t is readonly [Any] { return t.length === 1 && t[0] === Any; @@ -292,7 +292,7 @@ export function allowedTypesIsAny(t: AllowedTypes): t is readonly [Any] { /** * Subset of TreeFieldSchema thats legal in maps. * This requires empty to be a valid value for the map. - * @alpha + * @internal */ export type MapFieldSchema = TreeFieldSchema< typeof FieldKinds.optional | typeof FieldKinds.sequence @@ -311,7 +311,7 @@ export type MapFieldSchema = TreeFieldSchema< * @typeParam TTypes - The types allowed by the field. * * @sealed - * @alpha + * @internal */ export class TreeFieldSchema< out TKind extends FieldKind = FieldKind, @@ -453,13 +453,13 @@ export class TreeFieldSchema< * @remarks * See {@link TreeTypeSet} for a stored-schema compatible version using the {@link TreeNodeSchemaIdentifier}. * See {@link AllowedTypes} for a compile time optimized version. - * @alpha + * @internal */ export type AllowedTypeSet = Any | ReadonlySet; /** * Convert {@link AllowedTypes} to {@link TreeTypeSet}. - * @alpha + * @internal */ export function allowedTypesSchemaSet(t: AllowedTypes): AllowedTypeSet { if (allowedTypesIsAny(t)) { @@ -476,7 +476,7 @@ export function allowedTypesSchemaSet(t: AllowedTypes): AllowedTypeSet { /** * Convert {@link AllowedTypes} to {@link TreeTypeSet}. - * @alpha + * @internal */ export function allowedTypesToTypeSet(t: AllowedTypes): TreeTypeSet { const list = allowedTypesSchemaSet(t); @@ -498,7 +498,7 @@ export function allowedTypesToTypeSet(t: AllowedTypes): TreeTypeSet { * The type of the rootFieldSchema is used to implement SchemaAware APIs. * Cases that do not require being compile time schema aware can omit the explicit type for it. * - * @alpha + * @internal */ export interface FlexTreeSchema extends SchemaCollection { @@ -539,7 +539,7 @@ export function intoStoredSchemaCollection(treeSchema: SchemaCollection): Stored /** * Schema data that can be be used to view a document. - * @alpha + * @internal * * @privateRemarks * It is convenient that this can be used as a StoredSchemaCollection with no conversion. @@ -556,7 +556,7 @@ export interface SchemaCollection { /** * Checks if a {@link TreeNodeSchema} is a {@link MapNodeSchema}. - * @alpha + * @internal */ export function schemaIsMap(schema: TreeNodeSchema): schema is MapNodeSchema { return schema instanceof MapNodeSchema; @@ -564,7 +564,7 @@ export function schemaIsMap(schema: TreeNodeSchema): schema is MapNodeSchema { /** * Checks if a {@link TreeNodeSchema} is a {@link LeafNodeSchema}. - * @alpha + * @internal */ export function schemaIsLeaf(schema: TreeNodeSchema): schema is LeafNodeSchema { return schema instanceof LeafNodeSchema; @@ -572,7 +572,7 @@ export function schemaIsLeaf(schema: TreeNodeSchema): schema is LeafNodeSchema { /** * Checks if a {@link TreeNodeSchema} is a {@link FieldNodeSchema}. - * @alpha + * @internal */ export function schemaIsFieldNode(schema: TreeNodeSchema): schema is FieldNodeSchema { return schema instanceof FieldNodeSchema; @@ -580,7 +580,7 @@ export function schemaIsFieldNode(schema: TreeNodeSchema): schema is FieldNodeSc /** * Checks if a {@link TreeNodeSchema} is a {@link ObjectNodeSchema}. - * @alpha + * @internal */ export function schemaIsObjectNode(schema: TreeNodeSchema): schema is ObjectNodeSchema { return schema instanceof ObjectNodeSchema; diff --git a/packages/dds/tree/src/feature-libraries/typed-schema/view.ts b/packages/dds/tree/src/feature-libraries/typed-schema/view.ts index a3e4bb7a4f27..ac6171523908 100644 --- a/packages/dds/tree/src/feature-libraries/typed-schema/view.ts +++ b/packages/dds/tree/src/feature-libraries/typed-schema/view.ts @@ -161,7 +161,7 @@ export class ViewSchema { /** * Record where a schema came from for error reporting purposes. - * @alpha + * @internal */ export interface Sourced { readonly builder: Named; diff --git a/packages/dds/tree/src/index.ts b/packages/dds/tree/src/index.ts index 478a53a231f4..d6b89b2d7ed9 100644 --- a/packages/dds/tree/src/index.ts +++ b/packages/dds/tree/src/index.ts @@ -289,7 +289,7 @@ export { typeboxValidator } from "./external-utilities"; import * as InternalTypes from "./internal"; export { InternalTypes }; -// These would be in InternalTypes above but are `@alpha` so they can't be included in the `InternalClassTreeTypes` due to https://github.com/microsoft/rushstack/issues/3639 +// TODO: When previously tagged '@alpha', these types could not be included in `InternalClassTreeTypes` due to https://github.com/microsoft/rushstack/issues/3639 export { Invariant, Contravariant, diff --git a/packages/dds/tree/src/shared-tree/schematizedTree.ts b/packages/dds/tree/src/shared-tree/schematizedTree.ts index 2bd51a69ec42..b08e83a0eef3 100644 --- a/packages/dds/tree/src/shared-tree/schematizedTree.ts +++ b/packages/dds/tree/src/shared-tree/schematizedTree.ts @@ -210,7 +210,7 @@ export function afterSchemaChanges( /** * View Schema for a `SharedTree`. * - * @alpha + * @internal */ export interface SchemaConfiguration { /** @@ -222,7 +222,7 @@ export interface SchemaConfiguration extends SchemaConfiguration { @@ -239,7 +239,7 @@ export interface TreeContent /** * Options used to schematize a `SharedTree`. * - * @alpha + * @internal */ export interface SchematizeConfiguration extends SchemaConfiguration { @@ -252,7 +252,7 @@ export interface SchematizeConfiguration( config: InitializeAndSchematizeConfiguration, diff --git a/packages/dds/tree/src/shared-tree/sharedTree.ts b/packages/dds/tree/src/shared-tree/sharedTree.ts index 8fe3505d01c0..03ed7de32cd6 100644 --- a/packages/dds/tree/src/shared-tree/sharedTree.ts +++ b/packages/dds/tree/src/shared-tree/sharedTree.ts @@ -74,7 +74,7 @@ import { SharedTreeEditBuilder } from "./sharedTreeEditBuilder"; * Copy of data from an {@link ISharedTree} at some point in time. * @remarks * This is unrelated to Fluids concept of "snapshots". - * @alpha + * @internal */ export interface SharedTreeContentSnapshot { /** @@ -96,7 +96,7 @@ export interface SharedTreeContentSnapshot { * powered by {@link @fluidframework/shared-object-base#ISharedObject}. * * See [the README](../../README.md) for details. - * @alpha + * @internal */ export interface ISharedTree extends ISharedObject, ITree { /** @@ -371,7 +371,7 @@ export class SharedTree } /** - * @alpha + * @internal */ export interface SharedTreeOptions extends Partial { /** @@ -383,7 +383,7 @@ export interface SharedTreeOptions extends Partial { /** * Used to distinguish between different forest types. - * @alpha + * @internal */ export enum ForestType { /** @@ -406,7 +406,7 @@ export const defaultSharedTreeOptions: Required = { /** * A channel factory that creates {@link ISharedTree}s. - * @alpha + * @internal */ export class SharedTreeFactory implements IChannelFactory { public readonly type: string = "https://graph.microsoft.com/types/tree"; diff --git a/packages/dds/tree/src/shared-tree/sharedTreeEditBuilder.ts b/packages/dds/tree/src/shared-tree/sharedTreeEditBuilder.ts index ecd9b72074b0..452a741016d0 100644 --- a/packages/dds/tree/src/shared-tree/sharedTreeEditBuilder.ts +++ b/packages/dds/tree/src/shared-tree/sharedTreeEditBuilder.ts @@ -10,26 +10,26 @@ import { SharedTreeChange } from "./sharedTreeChangeTypes"; /** * Editor for schema changes. * The only currently supported operation is to replace the stored schema. - * @alpha + * @internal */ export interface ISchemaEditor { /** * Updates the stored schema. * @param oldSchema - The schema being overwritten. * @param newSchema - The new schema to apply. - * @alpha + * @internal */ setStoredSchema(oldSchema: TreeStoredSchema, newSchema: TreeStoredSchema): void; } /** * SharedTree editor for transactional tree data and schema changes. - * @alpha + * @internal */ export interface ISharedTreeEditor extends IDefaultEditBuilder { /** * Editor for schema changes. - * @alpha + * @internal */ schema: ISchemaEditor; } diff --git a/packages/dds/tree/src/shared-tree/treeCheckout.ts b/packages/dds/tree/src/shared-tree/treeCheckout.ts index 6d43969eac5d..dc66f911dd48 100644 --- a/packages/dds/tree/src/shared-tree/treeCheckout.ts +++ b/packages/dds/tree/src/shared-tree/treeCheckout.ts @@ -64,7 +64,7 @@ export interface CheckoutEvents { * @privateRemarks * API for interacting with a {@link SharedTreeBranch}. * Implementations of this interface must implement the {@link branchKey} property. - * @alpha + * @internal */ export interface ITreeCheckout extends AnchorLocator { /** @@ -201,7 +201,7 @@ export function createTreeCheckout(args?: { * * To avoid updating observers of the view state with intermediate results during a transaction, * use {@link ITreeCheckout#fork} and {@link ISharedTreeFork#merge}. - * @alpha + * @internal */ export interface ITransaction { /** @@ -265,7 +265,7 @@ class Transaction implements ITransaction { * Branch (like in a version control system) of SharedTree. * * {@link ITreeCheckout} that has forked off of the main trunk/branch. - * @alpha + * @internal */ export interface ITreeCheckoutFork extends ITreeCheckout { /** @@ -409,7 +409,7 @@ export class TreeCheckout implements ITreeCheckoutFork { * @param transaction - the transaction function. This will be executed immediately. It is passed `view` as an argument for convenience. * If this function returns an `Abort` result then the transaction will be aborted. Otherwise, it will be committed. * @returns whether or not the transaction was committed or aborted - * @alpha + * @internal */ export function runSynchronous( view: ITreeCheckout, diff --git a/packages/dds/tree/src/shared-tree/treeView.ts b/packages/dds/tree/src/shared-tree/treeView.ts index 13941b3e55b9..b6716ac3937e 100644 --- a/packages/dds/tree/src/shared-tree/treeView.ts +++ b/packages/dds/tree/src/shared-tree/treeView.ts @@ -22,7 +22,7 @@ import { ITreeCheckoutFork, ITreeCheckout } from "./treeCheckout"; * TODO: * 1. Once ISharedTreeView is renamed this can become ISharedTreeView. * 2. This object should be combined with or accessible from the TreeContext to allow easy access to thinks like branching. - * @alpha + * @internal */ export interface FlexTreeView extends IDisposable { /** @@ -57,7 +57,7 @@ export interface FlexTreeView extends IDis * Branch (like in a version control system) of SharedTree. * * {@link FlexTreeView} that has forked off of the main trunk/branch. - * @alpha + * @internal */ export interface ITreeViewFork extends FlexTreeView { readonly checkout: ITreeCheckoutFork; diff --git a/packages/dds/tree/src/test/feature-libraries/modular-schema/comparison.spec.ts b/packages/dds/tree/src/test/feature-libraries/modular-schema/comparison.spec.ts index e0d1ad62483d..9f5d5c104e32 100644 --- a/packages/dds/tree/src/test/feature-libraries/modular-schema/comparison.spec.ts +++ b/packages/dds/tree/src/test/feature-libraries/modular-schema/comparison.spec.ts @@ -43,7 +43,7 @@ const emptyMap: ReadonlyMap = new Map(); /** * Helper for building {@link TreeFieldStoredSchema}. - * @alpha + * @internal */ function fieldSchema( kind: { identifier: FieldKindIdentifier }, diff --git a/packages/dds/tree/src/treeFactory.ts b/packages/dds/tree/src/treeFactory.ts index 6343314effdf..3db00c486370 100644 --- a/packages/dds/tree/src/treeFactory.ts +++ b/packages/dds/tree/src/treeFactory.ts @@ -27,7 +27,7 @@ import { /** * Configuration to specialize a Tree DDS for a particular use. - * @alpha + * @internal */ export interface TreeOptions extends SharedTreeOptions { /** @@ -41,7 +41,7 @@ export interface TreeOptions extends SharedTreeOptions { /** * A channel factory that creates an {@link ITree}. - * @alpha + * @internal */ export class TreeFactory implements IChannelFactory { public readonly type: string; diff --git a/packages/dds/tree/src/util/brand.ts b/packages/dds/tree/src/util/brand.ts index 735b82c6023c..e334da14fd72 100644 --- a/packages/dds/tree/src/util/brand.ts +++ b/packages/dds/tree/src/util/brand.ts @@ -17,7 +17,7 @@ import { Covariant, isAny } from "./typeCheck"; * `Type 'Name1' is not assignable to type 'Name2'.` * * These branded types are not opaque: A `Brand` can still be used as a `B`. - * @alpha + * @internal */ export type Brand = ValueType & BrandedType; @@ -40,7 +40,7 @@ export type Brand = ValueType & BrandedType { protected _typeCheck?: Covariant; @@ -74,7 +74,7 @@ export abstract class BrandedType { * ```typescript * export interface MyType extends Opaque>{} * ``` - * @alpha + * @internal */ export type Opaque> = T extends Brand ? BrandedType @@ -82,7 +82,7 @@ export type Opaque> = T extends Brand> = TOpaque extends BrandedType @@ -94,7 +94,7 @@ export type ExtractFromOpaque> = /** * Implementation detail of type branding. Should not be used directly outside this file, * but shows up as part of branded types so API-Extractor requires it to be exported. - * @alpha + * @internal */ export type ValueFromBranded> = T extends BrandedType< infer ValueType, @@ -106,7 +106,7 @@ export type ValueFromBranded> = T extends Bra /** * Implementation detail of type branding. Should not be used directly outside this file, * but shows up as part of branded types so API-Extractor requires it to be exported. - * @alpha + * @internal */ export type NameFromBranded> = T extends BrandedType< any, @@ -120,7 +120,7 @@ export type NameFromBranded> = T extends Bran * * It is assumed that only code that produces these "opaque" handles does this conversion, * allowing these handles to be considered opaque. - * @alpha + * @internal */ export function extractFromOpaque>( value: TOpaque, @@ -132,7 +132,7 @@ export function extractFromOpaque>( * Adds a type {@link Brand} to a value. * * Only do this when specifically allowed by the requirements of the type being converted to. - * @alpha + * @internal */ export function brand>( value: T extends BrandedType ? ValueType : never, @@ -144,7 +144,7 @@ export function brand>( * Adds a type {@link Brand} to a value, returning it as a {@link Opaque} handle. * * Only do this when specifically allowed by the requirements of the type being converted to. - * @alpha + * @internal */ export function brandOpaque>( value: isAny> extends true ? never : ValueFromBranded, diff --git a/packages/dds/tree/src/util/brandedMap.ts b/packages/dds/tree/src/util/brandedMap.ts index fd5321096557..8805b8dab596 100644 --- a/packages/dds/tree/src/util/brandedMap.ts +++ b/packages/dds/tree/src/util/brandedMap.ts @@ -8,12 +8,12 @@ import { getOrCreate } from "./utils"; /** * Key in a {@link BrandedMapSubset}. - * @alpha + * @internal */ export type BrandedKey = TKey & Invariant; /** - * @alpha + * @internal */ export type BrandedKeyContent> = TKey extends BrandedKey< unknown, @@ -36,7 +36,7 @@ export type BrandedKeyContent> = TKey exte * @remarks * These APIs are designed so that a Map can be used to implement this type. * - * @alpha + * @internal */ export interface BrandedMapSubset> { get(key: K2): BrandedKeyContent | undefined; @@ -66,7 +66,7 @@ let slotCounter = 0; /** * Define a strongly typed slot in which data can be stored in a {@link BrandedMapSubset}. - * @alpha + * @internal */ export function brandedSlot>(): TSlot { return slotCounter++ as TSlot; diff --git a/packages/dds/tree/src/util/idAllocator.ts b/packages/dds/tree/src/util/idAllocator.ts index 8dda506ae6fe..24ad17bd887d 100644 --- a/packages/dds/tree/src/util/idAllocator.ts +++ b/packages/dds/tree/src/util/idAllocator.ts @@ -8,7 +8,7 @@ import { fail } from "./utils"; /** * Used for allocating IDs unique to a particular instance of the allocator. - * @alpha + * @internal */ export interface IdAllocator { /** @@ -27,7 +27,7 @@ export interface IdAllocationState { } /** - * @alpha + * @internal */ export function idAllocatorFromMaxId(maxId: number | undefined = undefined): IdAllocator { return idAllocatorFromState({ maxId: maxId ?? -1 }); diff --git a/packages/dds/tree/src/util/nestedMap.ts b/packages/dds/tree/src/util/nestedMap.ts index 64eded323647..8fa562366e56 100644 --- a/packages/dds/tree/src/util/nestedMap.ts +++ b/packages/dds/tree/src/util/nestedMap.ts @@ -12,14 +12,14 @@ import { MapGetSet } from "./utils"; * * This code assumes values will not be undefined (keys can be undefined). * - * @alpha + * @internal */ export type NestedMap = Map>; /** * If (key1, key2) already has a value in the map, it is returned, otherwise value is added under (key1, key2) and undefined is returned. * - * @alpha + * @internal */ export function tryAddToNestedMap( map: NestedMap, @@ -42,7 +42,7 @@ export function tryAddToNestedMap( /** * Copies over all entries from the source map into the destination map. * - * @alpha + * @internal */ export function populateNestedMap( source: NestedMap, @@ -56,7 +56,7 @@ export function populateNestedMap( * Sets the value at (key1, key2) in map to value. * If there already is a value for (key1, key2), it is replaced with the provided one. * - * @alpha + * @internal */ export function setInNestedMap( map: NestedMap, @@ -89,7 +89,7 @@ export function getOrAddInMap( /** * Returns the value at (key1, key2) in map, or undefined if not present. * - * @alpha + * @internal */ export function tryGetFromNestedMap( map: NestedMap, @@ -107,7 +107,7 @@ export function tryGetFromNestedMap( * If (key1, key2) is not in the map, add value to the map. * Returns whatever is at (key1, key2) in map (which will be value if it was empty before). * - * @alpha + * @internal */ export function getOrAddInNestedMap( map: NestedMap, @@ -127,7 +127,7 @@ export function getOrAddInNestedMap( * If (key1, key2) is not in map, returns value. * If (key1, key2) is in map, return its entry. * - * @alpha + * @internal */ export function getOrDefaultInNestedMap( map: NestedMap, @@ -147,7 +147,7 @@ export function getOrDefaultInNestedMap( * * @returns true iff found. * - * @alpha + * @internal */ export function deleteFromNestedMap( map: NestedMap, @@ -208,7 +208,7 @@ export function forEachInNestedMap( * Map with two keys; same semantics as NestedMap, but maintains a size count for the entire collection. * Note: undefined is not supported as a value, and will cause incorrect behavior. * - * @alpha + * @internal */ export class SizedNestedMap { private readonly nestedMap: NestedMap = new Map(); diff --git a/packages/dds/tree/src/util/rangeMap.ts b/packages/dds/tree/src/util/rangeMap.ts index cb97e4c3bf43..74b35df99125 100644 --- a/packages/dds/tree/src/util/rangeMap.ts +++ b/packages/dds/tree/src/util/rangeMap.ts @@ -17,7 +17,7 @@ export interface RangeEntry { /** * The result of a query about a range of keys. * - * @alpha + * @internal */ export interface RangeQueryResult { /** diff --git a/packages/dds/tree/src/util/transactionResult.ts b/packages/dds/tree/src/util/transactionResult.ts index 7fbd3cf5bcb5..fa35c5d051b0 100644 --- a/packages/dds/tree/src/util/transactionResult.ts +++ b/packages/dds/tree/src/util/transactionResult.ts @@ -6,7 +6,7 @@ /** * Describes the result of a transaction. * Transactions may either succeed and commit, or fail and abort. - * @alpha + * @internal */ export enum TransactionResult { /** diff --git a/packages/dds/tree/src/util/typeCheck.ts b/packages/dds/tree/src/util/typeCheck.ts index 6e782f1f5289..1e3fdb525bab 100644 --- a/packages/dds/tree/src/util/typeCheck.ts +++ b/packages/dds/tree/src/util/typeCheck.ts @@ -95,7 +95,7 @@ export interface MakeNominal {} * protected _typeCheck?: Contravariant; * ``` * - * @alpha + * @internal */ export interface Contravariant { _removeCovariance?: (_: T) => void; @@ -110,7 +110,7 @@ export interface Contravariant { * protected _typeCheck?: Covariant; * ``` * - * @alpha + * @internal */ export interface Covariant { _removeContravariance?: T; @@ -125,7 +125,7 @@ export interface Covariant { * protected _typeCheck?: Invariant; * ``` * - * @alpha + * @internal */ export interface Invariant extends Contravariant, Covariant {} @@ -134,7 +134,7 @@ export interface Invariant extends Contravariant, Covariant {} * To use, simply define a type: * `type _check = requireTrue;` * - * @alpha + * @internal */ export type requireTrue<_X extends true> = true; @@ -143,7 +143,7 @@ export type requireTrue<_X extends true> = true; * To use, simply define a type: * `type _check = requireFalse;` * - * @alpha + * @internal */ export type requireFalse<_X extends false> = true; @@ -153,14 +153,14 @@ export type requireFalse<_X extends false> = true; * @privateRemarks * Use of [] in the extends clause prevents unions from being distributed over this conditional and returning `boolean` in some cases. * @see {@link https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types | distributive-conditional-types} for details. - * @alpha + * @internal */ export type isAssignableTo = [Source] extends [Destination] ? true : false; /** * Returns a type parameter that is true iff Subset is a strict subset of Superset. * - * @alpha + * @internal */ export type isStrictSubset = isAssignableTo extends false ? false @@ -172,7 +172,7 @@ export type isStrictSubset = isAssignableTo * Returns a type parameter that is true iff A and B are assignable to each other, and neither is any. * This is useful for checking if the output of a type meta-function is the expected type. * - * @alpha + * @internal */ export type areSafelyAssignable = eitherIsAny extends true ? false @@ -183,7 +183,7 @@ export type areSafelyAssignable = eitherIsAny extends true /** * Returns a type parameter that is true iff A is any or B is any. * - * @alpha + * @internal */ export type eitherIsAny = true extends isAny | isAny ? true : false; @@ -194,7 +194,7 @@ export type eitherIsAny = true extends isAny | isAny ? true : false; * Only `never` is assignable to `never` (`any` isn't), * but `any` distributes over the `extends` here while nothing else should. * This can be used to detect `any`. - * @alpha + * @internal */ export type isAny = boolean extends (T extends never ? true : false) ? true : false; @@ -203,6 +203,6 @@ export type isAny = boolean extends (T extends never ? true : false) ? true : * To use, simply define a type: * `type _check = requireAssignableTo;` * - * @alpha + * @internal */ export type requireAssignableTo<_A extends B, B> = true; diff --git a/packages/dds/tree/src/util/typeUtils.ts b/packages/dds/tree/src/util/typeUtils.ts index b8c8d510fd9e..40c4289877b6 100644 --- a/packages/dds/tree/src/util/typeUtils.ts +++ b/packages/dds/tree/src/util/typeUtils.ts @@ -10,13 +10,13 @@ /** * Return a type thats equivalent to the input, but with different IntelliSense. * This tends to convert unions and intersections into objects. - * @alpha + * @internal */ export type FlattenKeys = [{ [Property in keyof T]: T[Property] }][_InlineTrick]; /** * Remove all fields which permit undefined from `T`. - * @alpha + * @internal */ export type RequiredFields = [ { @@ -26,7 +26,7 @@ export type RequiredFields = [ /** * Extract fields which permit undefined but can also hold other types. - * @alpha + * @internal */ export type OptionalFields = [ { @@ -48,7 +48,7 @@ export type OptionalFields = [ * flattening since it causes complication issues. * * See also `AllowOptional`. - * @alpha + * @internal */ // export type AllowOptionalNotFlattened = [RequiredFields & OptionalFields][_InlineTrick]; export type AllowOptionalNotFlattened = [RequiredFields & OptionalFields][_InlineTrick]; @@ -56,7 +56,7 @@ export type AllowOptionalNotFlattened = [RequiredFields & OptionalFields = [FlattenKeys & OptionalFields>][_InlineTrick]; @@ -81,7 +81,7 @@ export type AllowOptional = [FlattenKeys & OptionalFields(readonly: T): Mutable { export const clone = structuredClone; /** - * @alpha + * @internal */ export function fail(message: string): never { throw new Error(message); @@ -199,7 +199,7 @@ export function* zipIterables( * * Note that this does not robustly forbid non json comparable data via type checking, * but instead mostly restricts access to it. - * @alpha + * @internal */ export type JsonCompatible = | string @@ -215,7 +215,7 @@ export type JsonCompatible = * * Note that this does not robustly forbid non json comparable data via type checking, * but instead mostly restricts access to it. - * @alpha + * @internal */ export type JsonCompatibleObject = { [P in string]?: JsonCompatible }; @@ -224,7 +224,7 @@ export type JsonCompatibleObject = { [P in string]?: JsonCompatible }; * * Note that this does not robustly forbid non json comparable data via type checking, * but instead mostly restricts access to it. - * @alpha + * @internal */ export type JsonCompatibleReadOnly = | string @@ -309,7 +309,7 @@ export function assertNonNegativeSafeInteger(index: number) { * When the generic code is parameterized with a concrete type, if that type actually does extend `TAssumeToBe`, * it will behave like `TInput` was used directly. * - * @alpha + * @internal */ export type Assume = [TInput] extends [TAssumeToBe] ? TInput : TAssumeToBe; @@ -447,7 +447,7 @@ export function invertMap(input: Map): Map { /** * Returns the value from `set` if it contains exactly one item, otherwise `undefined`. - * @alpha + * @internal */ export function oneFromSet(set: ReadonlySet | undefined): T | undefined { if (set === undefined) { @@ -464,7 +464,7 @@ export function oneFromSet(set: ReadonlySet | undefined): T | undefined { /** * Type with a name describing what it is. * Typically used with values (like schema) that can be stored in a map, but in some representations have their name/key as a field. - * @alpha + * @internal */ export interface Named { readonly name: TName; 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 982ab97d0a6e..5b31607e240c 100644 --- a/packages/framework/fluid-framework/api-report/fluid-framework.api.md +++ b/packages/framework/fluid-framework/api-report/fluid-framework.api.md @@ -92,7 +92,7 @@ import { TreeNodeSchema as TreeNodeSchema_2 } from './schemaTypes'; import { TreeNodeSchemaClass as TreeNodeSchemaClass_2 } from './schemaTypes'; import type { TSchema } from '@sinclair/typebox'; -// @alpha +// @internal export function adaptEnum>(factory: SchemaFactory, members: TEnum): ((value: TValue) => { readonly value: TValue; }) & { readonly [Property in keyof TEnum]: { @@ -105,42 +105,42 @@ export function adaptEnum[]; // @beta type AllowedTypes_2 = readonly LazyItem[]; -// @alpha +// @internal export type AllowedTypeSet = Any | ReadonlySet; -// @alpha +// @internal export type AllowedTypesToFlexInsertableTree = [ T extends readonly LazyItem[] ? InsertableFlexNode, FlexTreeNodeSchema>> : ContextuallyTypedNodeData ][_InlineTrick]; -// @alpha +// @internal export enum AllowedUpdateType { None = 0, SchemaCompatible = 1 } -// @alpha +// @internal export type AllowOptional = [FlattenKeys & OptionalFields>][_InlineTrick]; -// @alpha +// @internal export type AllowOptionalNotFlattened = [RequiredFields & OptionalFields][_InlineTrick]; -// @alpha +// @internal export type Anchor = Brand; -// @alpha +// @internal export interface AnchorEvents { afterChange(anchor: AnchorNode): void; afterDestroy(anchor: AnchorNode): void; @@ -151,19 +151,19 @@ export interface AnchorEvents { valueChanging(anchor: AnchorNode, value: Value): void; } -// @alpha +// @internal export interface AnchorLocator { locate(anchor: Anchor): AnchorNode | undefined; } -// @alpha +// @internal export interface AnchorNode extends UpPath, ISubscribable { child(key: FieldKey, index: number): UpPath; getOrCreateChildRef(key: FieldKey, index: number): [Anchor, AnchorNode]; readonly slots: BrandedMapSubset>; } -// @alpha @sealed +// @internal @sealed export class AnchorSet implements ISubscribable, AnchorLocator { constructor(); acquireVisitor(): AnnouncedVisitor & DeltaVisitor; @@ -179,19 +179,19 @@ export class AnchorSet implements ISubscribable, AnchorLoca track(path: UpPath | null): Anchor; } -// @alpha +// @internal export interface AnchorSetRootEvents { childrenChanging(anchors: AnchorSet): void; treeChanging(anchors: AnchorSet): void; } -// @alpha +// @internal export type AnchorSlot = BrandedKey>, TContent>; -// @alpha +// @internal export function anchorSlot(): AnchorSlot; -// @alpha +// @internal export interface AnnouncedVisitor { // (undocumented) afterAttach(source: FieldKey, destination: Range_2): void; @@ -210,16 +210,16 @@ export interface AnnouncedVisitor { beforeReplace(newContent: FieldKey, oldContent: Range_2, oldContentDestination: FieldKey): void; } -// @alpha +// @internal export const Any: "Any"; -// @alpha +// @internal export type Any = typeof Any; // @beta type ApplyKind = Kind extends FieldKind_2.Required ? T : undefined | T; -// @alpha +// @internal export type ApplyMultiplicity = { [Multiplicity.Forbidden]: undefined; [Multiplicity.Optional]: undefined | TypedChild; @@ -227,7 +227,7 @@ export type ApplyMultiplicity = [Multiplicity.Single]: TypedChild; }[TMultiplicity]; -// @alpha +// @internal export interface ArrayLikeMut extends ArrayLike { // (undocumented) [n: number]: TSet; @@ -236,27 +236,27 @@ export interface ArrayLikeMut extends ArrayLike< // @beta type ArrayToUnion = T extends readonly (infer TValue)[] ? TValue : never; -// @alpha +// @internal export type AssignableFieldKinds = typeof FieldKinds.optional | typeof FieldKinds.required; -// @alpha +// @internal export type Assume = [TInput] extends [TAssumeToBe] ? TInput : TAssumeToBe; export { AttachState } -// @alpha +// @internal export type Brand = ValueType & BrandedType; -// @alpha +// @internal export function brand>(value: T extends BrandedType ? ValueType : never): T; -// @alpha +// @internal export type BrandedKey = TKey & Invariant; -// @alpha (undocumented) +// @internal (undocumented) export type BrandedKeyContent> = TKey extends BrandedKey ? TContent : never; -// @alpha +// @internal export interface BrandedMapSubset> { // (undocumented) delete(key: K): boolean; @@ -268,17 +268,17 @@ export interface BrandedMapSubset> { set(key: K2, value: BrandedKeyContent): this; } -// @alpha @sealed +// @internal @sealed export abstract class BrandedType { protected abstract brand(dummy: never): Name; // (undocumented) protected _typeCheck?: Covariant; } -// @alpha +// @internal export function buildTreeConfiguration(config: InitializeAndSchematizeConfiguration): InitializeAndSchematizeConfiguration; -// @alpha +// @internal export type ChangesetLocalId = Brand; // @beta @@ -287,13 +287,13 @@ export interface CheckoutEvents { revertible(revertible: Revertible): void; } -// @alpha +// @internal export type CheckTypesOverlap = [Extract extends never ? never : T][0]; -// @alpha +// @internal export type ChildCollection = FieldKey | RootField; -// @alpha +// @internal export interface ChildLocation { // (undocumented) readonly container: ChildCollection; @@ -301,14 +301,14 @@ export interface ChildLocation { readonly index: number; } -// @alpha +// @internal export type CollectOptions = TValueSchema extends undefined ? FlattenKeys<{ [typeNameSymbol]?: UnbrandedName; } & (TValueSchema extends ValueSchema ? { [valueSymbol]: TreeValue; } : EmptyObject)> & TTypedFields : TValueSchema extends ValueSchema ? TreeValue : undefined; -// @alpha +// @internal export function compareLocalNodeKeys(a: LocalNodeKey, b: LocalNodeKey): -1 | 0 | 1; export { ConnectionState } @@ -317,13 +317,13 @@ export { ContainerErrorType } export { ContainerSchema } -// @alpha +// @internal export type ContextuallyTypedFieldData = ContextuallyTypedNodeData | undefined; -// @alpha +// @internal export type ContextuallyTypedNodeData = ContextuallyTypedNodeDataObject | number | string | boolean | null | readonly ContextuallyTypedNodeData[] | MarkedArrayLike; -// @alpha +// @internal export interface ContextuallyTypedNodeDataObject { readonly [typeNameSymbol]?: string; readonly [valueSymbol]?: Value; @@ -331,22 +331,22 @@ export interface ContextuallyTypedNodeDataObject { [key: string]: ContextuallyTypedFieldData; } -// @alpha +// @internal export interface Contravariant { // (undocumented) _removeCovariance?: (_: T) => void; } -// @alpha +// @internal export interface Covariant { // (undocumented) _removeContravariance?: T; } -// @alpha +// @internal export function createEmitter>(noListeners?: NoListenersCallback): ISubscribable & IEmitter & HasListeners; -// @alpha +// @internal export interface CursorAdapter { // (undocumented) getFieldFromNode(node: TNode, key: FieldKey): readonly TNode[]; @@ -358,19 +358,19 @@ export interface CursorAdapter { value(node: TNode): Value; } -// @alpha +// @internal export function cursorForTypedTreeData(context: TreeDataContext, schema: T, data: InsertableFlexNode): ITreeCursorSynchronous; -// @alpha +// @internal export function cursorFromContextualData(context: TreeDataContext, typeSet: AllowedTypeSet, data: ContextuallyTypedNodeData): ITreeCursorSynchronous; -// @alpha (undocumented) +// @internal (undocumented) export const enum CursorLocationType { Fields = 1, Nodes = 0 } -// @alpha +// @internal export interface CursorWithNode extends ITreeCursorSynchronous { fork(): CursorWithNode; getNode(): TNode; @@ -378,10 +378,10 @@ export interface CursorWithNode extends ITreeCursorSynchronous { export { DataObjectClass } -// @alpha +// @internal export const defaultSchemaPolicy: FullSchemaPolicy; -// @alpha +// @internal export interface DeltaDetachedNodeBuild { // (undocumented) readonly id: DeltaDetachedNodeId; @@ -389,7 +389,7 @@ export interface DeltaDetachedNodeBuild { readonly trees: readonly TTree[]; } -// @alpha +// @internal export interface DeltaDetachedNodeChanges { // (undocumented) readonly fields: DeltaFieldMap; @@ -397,7 +397,7 @@ export interface DeltaDetachedNodeChanges { readonly id: DeltaDetachedNodeId; } -// @alpha +// @internal export interface DeltaDetachedNodeDestruction { // (undocumented) readonly count: number; @@ -405,7 +405,7 @@ export interface DeltaDetachedNodeDestruction { readonly id: DeltaDetachedNodeId; } -// @alpha +// @internal export interface DeltaDetachedNodeId { // (undocumented) readonly major?: string | number; @@ -413,7 +413,7 @@ export interface DeltaDetachedNodeId { readonly minor: number; } -// @alpha +// @internal export interface DeltaDetachedNodeRename { // (undocumented) readonly count: number; @@ -423,7 +423,7 @@ export interface DeltaDetachedNodeRename { readonly oldId: DeltaDetachedNodeId; } -// @alpha +// @internal export interface DeltaFieldChanges { // @deprecated readonly build?: readonly DeltaDetachedNodeBuild[]; @@ -434,10 +434,10 @@ export interface DeltaFieldChanges { readonly rename?: readonly DeltaDetachedNodeRename[]; } -// @alpha (undocumented) +// @internal (undocumented) export type DeltaFieldMap = ReadonlyMap>; -// @alpha +// @internal export interface DeltaMark { readonly attach?: DeltaDetachedNodeId; readonly count: number; @@ -445,17 +445,17 @@ export interface DeltaMark { readonly fields?: DeltaFieldMap; } -// @alpha +// @internal export type DeltaProtoNode = ITreeCursorSynchronous; -// @alpha +// @internal export interface DeltaRoot { readonly build?: readonly DeltaDetachedNodeBuild[]; readonly destroy?: readonly DeltaDetachedNodeDestruction[]; readonly fields?: DeltaFieldMap; } -// @alpha +// @internal export interface DeltaVisitor { attach(source: FieldKey, count: number, destination: PlaceIndex): void; create(content: ProtoNodes, destination: FieldKey): void; @@ -471,14 +471,14 @@ export interface DeltaVisitor { export { DeserializeCallback } -// @alpha +// @internal export interface DetachedField extends Opaque> { } -// @alpha +// @internal export type DetachedPlaceUpPath = Brand, "DetachedRangeUpPath">; -// @alpha +// @internal export type DetachedRangeUpPath = Brand, "DetachedRangeUpPath">; // @alpha @sealed @@ -508,7 +508,7 @@ export const disposeSymbol: unique symbol; export { DriverErrorType } -// @alpha +// @internal export interface EditableTreeEvents { afterChange(event: TreeEvent): void; beforeChange(event: TreeEvent): void; @@ -516,16 +516,16 @@ export interface EditableTreeEvents { subtreeChanging(upPath: UpPath): PathVisitor | void; } -// @alpha +// @internal export const EmptyKey: FieldKey; -// @alpha +// @internal export type EmptyObject = {}; -// @alpha +// @internal export function encodeTreeSchema(schema: TreeStoredSchema): JsonCompatible; -// @alpha +// @internal export function enumFromStrings(factory: SchemaFactory, members: Members[]): ((value: TValue) => { readonly value: TValue; }) & Record = { [P in (string | symbol) & keyof E as IsEvent extends true ? P : never]: E[P]; }; -// @alpha +// @internal export type ExtractFromOpaque> = TOpaque extends BrandedType ? isAny extends true ? unknown : Brand : never; -// @alpha +// @internal export function extractFromOpaque>(value: TOpaque): ExtractFromOpaque; // @beta type ExtractItemType = Item extends () => infer Result ? Result : Item; -// @alpha (undocumented) +// @internal (undocumented) export function fail(message: string): never; -// @alpha +// @internal export interface FieldAnchor { // (undocumented) fieldKey: FieldKey; parent: Anchor | undefined; } -// @alpha +// @internal export type FieldGenerator = () => MapTree[]; -// @alpha +// @internal export type FieldKey = Brand; -// @alpha @sealed +// @internal @sealed export abstract class FieldKind implements FieldKindSpecifier { protected constructor(identifier: TName & FieldKindIdentifier, multiplicity: TMultiplicity); // (undocumented) @@ -583,10 +583,10 @@ enum FieldKind_2 { Required = 1 } -// @alpha +// @internal export type FieldKindIdentifier = Brand; -// @alpha +// @internal export const FieldKinds: { readonly required: Required_2; readonly optional: Optional; @@ -595,13 +595,13 @@ export const FieldKinds: { readonly forbidden: Forbidden; }; -// @alpha +// @internal export interface FieldKindSpecifier { // (undocumented) identifier: T; } -// @alpha +// @internal export interface FieldLocation { // (undocumented) readonly key: FieldKey; @@ -609,13 +609,13 @@ export interface FieldLocation { readonly parent: ForestLocation; } -// @alpha +// @internal export interface FieldMapObject { // (undocumented) [key: string]: TChild[]; } -// @alpha +// @internal export class FieldNodeSchema = TreeFieldSchema> extends TreeNodeSchemaBase { // (undocumented) static create(builder: Named, name: TreeNodeSchemaIdentifier, specification: Specification): FieldNodeSchema; @@ -625,7 +625,7 @@ export class FieldNodeSchema { readonly field: FieldKey; readonly parent: TUpPath | undefined; } -// @alpha +// @internal export type FlattenKeys = [{ [Property in keyof T]: T[Property]; }][_InlineTrick]; -// @alpha +// @internal export type FlexibleFieldContent = InsertableFlexField | ITreeCursorSynchronous; -// @alpha +// @internal export type FlexibleNodeContent = AllowedTypesToFlexInsertableTree | ITreeCursorSynchronous; -// @alpha +// @internal export type FlexibleNodeSubSequence = Iterable> | ITreeCursorSynchronous; -// @alpha +// @internal export type FlexImplicitFieldSchema = TreeFieldSchema | ImplicitAllowedTypes; // @beta @@ -670,7 +670,7 @@ type FlexList = readonly LazyItem[]; // @beta type FlexListToUnion = ExtractItemType>; -// @alpha +// @internal export interface FlexTreeEntity { [boxedIterator](): IterableIterator; readonly [flexTreeMarker]: FlexTreeEntityKind; @@ -679,7 +679,7 @@ export interface FlexTreeEntity { treeStatus(): TreeStatus; } -// @alpha (undocumented) +// @internal (undocumented) export enum FlexTreeEntityKind { // (undocumented) Field = 1, @@ -687,7 +687,7 @@ export enum FlexTreeEntityKind { Node = 0 } -// @alpha +// @internal export interface FlexTreeField extends FlexTreeEntity { // (undocumented) [boxedIterator](): IterableIterator; @@ -699,7 +699,7 @@ export interface FlexTreeField extends FlexTreeEntity { readonly parent?: FlexTreeNode; } -// @alpha +// @internal export interface FlexTreeFieldNode extends FlexTreeNode { readonly boxedContent: FlexTreeTypedField; readonly content: FlexTreeUnboxField; @@ -707,14 +707,14 @@ export interface FlexTreeFieldNode exten readonly schema: TSchema; } -// @alpha +// @internal export interface FlexTreeLeafNode extends FlexTreeNode { // (undocumented) readonly schema: TSchema; readonly value: TreeValue; } -// @alpha +// @internal export interface FlexTreeMapNode extends FlexTreeNode { [boxedIterator](): IterableIterator>; // (undocumented) @@ -739,10 +739,10 @@ export interface FlexTreeMapNode extends F values(): IterableIterator>; } -// @alpha +// @internal export const flexTreeMarker: unique symbol; -// @alpha +// @internal export interface FlexTreeNode extends FlexTreeEntity { // (undocumented) [boxedIterator](): IterableIterator; @@ -761,7 +761,7 @@ export interface FlexTreeNode extends FlexTreeEntity { readonly value?: TreeValue; } -// @alpha +// @internal export interface FlexTreeNodeKeyField extends FlexTreeField { // (undocumented) readonly localNodeKey: LocalNodeKey; @@ -769,17 +769,17 @@ export interface FlexTreeNodeKeyField extends FlexTreeField { readonly stableNodeKey: StableNodeKey; } -// @alpha (undocumented) +// @internal (undocumented) export type FlexTreeNodeSchema = TreeNodeSchemaBase; -// @alpha +// @internal export interface FlexTreeObjectNode extends FlexTreeNode { readonly localNodeKey?: LocalNodeKey; // (undocumented) readonly schema: ObjectNodeSchema; } -// @alpha +// @internal export type FlexTreeObjectNodeFields = FlattenKeys<{ readonly [key in keyof TFields as `boxed${Capitalize}`]: FlexTreeTypedField; } & { @@ -790,10 +790,10 @@ export type FlexTreeObjectNodeFields = FlattenKeys<{ readonly [key in keyof TFields as TFields[key]["kind"] extends AssignableFieldKinds ? `set${Capitalize}` : never]: (content: FlexibleFieldContent) => void; }>; -// @alpha +// @internal export type FlexTreeObjectNodeTyped = ObjectNodeSchema extends TSchema ? FlexTreeObjectNode : FlexTreeObjectNode & FlexTreeObjectNodeFields; -// @alpha +// @internal export interface FlexTreeOptionalField extends FlexTreeField { // (undocumented) readonly boxedContent?: FlexTreeTypedNodeUnion; @@ -802,7 +802,7 @@ export interface FlexTreeOptionalField exten set content(newContent: FlexibleNodeContent | undefined); } -// @alpha +// @internal export interface FlexTreeRequiredField extends FlexTreeField { // (undocumented) readonly boxedContent: FlexTreeTypedNodeUnion; @@ -811,14 +811,14 @@ export interface FlexTreeRequiredField exten set content(content: FlexibleNodeContent); } -// @alpha +// @internal export interface FlexTreeSchema extends SchemaCollection { readonly adapters: Adapters; readonly policy: FullSchemaPolicy; readonly rootFieldSchema: T; } -// @alpha +// @internal export interface FlexTreeSequenceField extends FlexTreeField { // (undocumented) [boxedIterator](): IterableIterator>; @@ -850,36 +850,36 @@ export interface FlexTreeSequenceField exten removeRange(start?: number, end?: number): void; } -// @alpha +// @internal export type FlexTreeTypedField = FlexTreeTypedFieldInner; -// @alpha +// @internal export type FlexTreeTypedFieldInner = Kind extends typeof FieldKinds.sequence ? FlexTreeSequenceField : Kind extends typeof FieldKinds.required ? FlexTreeRequiredField : Kind extends typeof FieldKinds.optional ? FlexTreeOptionalField : Kind extends typeof FieldKinds.nodeKey ? FlexTreeNodeKeyField : FlexTreeField; -// @alpha +// @internal export type FlexTreeTypedNode = TSchema extends LeafNodeSchema ? FlexTreeLeafNode : TSchema extends MapNodeSchema ? FlexTreeMapNode : TSchema extends FieldNodeSchema ? FlexTreeFieldNode : TSchema extends ObjectNodeSchema ? FlexTreeObjectNodeTyped : FlexTreeNode; -// @alpha +// @internal export type FlexTreeTypedNodeUnion = T extends FlexList ? FlexTreeTypedNode, FlexTreeNodeSchema>> : FlexTreeNode; -// @alpha +// @internal export type FlexTreeUnboxField = FlexTreeUnboxFieldInner; -// @alpha +// @internal export type FlexTreeUnboxFieldInner = Kind extends typeof FieldKinds.sequence ? FlexTreeSequenceField : Kind extends typeof FieldKinds.required ? FlexTreeUnboxNodeUnion : Kind extends typeof FieldKinds.optional ? FlexTreeUnboxNodeUnion | (Emptiness extends "notEmpty" ? never : undefined) : Kind extends typeof FieldKinds.nodeKey ? FlexTreeNodeKeyField : unknown; -// @alpha +// @internal export type FlexTreeUnboxNode = TSchema extends LeafNodeSchema ? TreeValue : TSchema extends MapNodeSchema ? FlexTreeMapNode : TSchema extends FieldNodeSchema ? FlexTreeFieldNode : TSchema extends ObjectNodeSchema ? FlexTreeObjectNodeTyped : FlexTreeUnknownUnboxed; -// @alpha +// @internal export type FlexTreeUnboxNodeUnion = TTypes extends readonly [ InternalTypedSchemaTypes.LazyItem ] ? InnerType extends FlexTreeNodeSchema ? FlexTreeUnboxNode : InnerType extends Any ? FlexTreeNode : unknown : boolean extends IsArrayOfOne ? FlexTreeUnknownUnboxed : FlexTreeTypedNodeUnion; -// @alpha +// @internal export type FlexTreeUnknownUnboxed = TreeValue | FlexTreeNode; -// @alpha +// @internal export interface FlexTreeView extends IDisposable { readonly checkout: ITreeCheckout; readonly context: TreeContext; @@ -887,51 +887,51 @@ export interface FlexTreeView extends IDis fork(): ITreeViewFork; } -// @alpha (undocumented) +// @internal (undocumented) export interface Forbidden extends FieldKind { } -// @alpha +// @internal export const forbiddenFieldKindIdentifier = "Forbidden"; -// @alpha +// @internal export interface ForestEvents { afterChange(): void; beforeChange(): void; } -// @alpha +// @internal export type ForestLocation = ITreeSubscriptionCursor | Anchor; -// @alpha +// @internal export enum ForestType { Optimized = 1, Reference = 0 } -// @alpha +// @internal export interface FullSchemaPolicy { readonly fieldKinds: ReadonlyMap; } -// @alpha +// @internal export interface GenericFieldsNode { // (undocumented) fields?: FieldMapObject; } -// @alpha +// @internal export interface GenericTreeNode extends GenericFieldsNode, NodeData { } export { getTextAndMarkers } -// @alpha (undocumented) +// @internal (undocumented) export interface HasListeners> { hasListeners(eventName?: keyof Events): boolean; } -// @alpha +// @internal export interface ICodecOptions { readonly jsonValidator: JsonValidator; } @@ -946,14 +946,14 @@ export interface ICreateInfo { export { ICriticalContainerError } -// @alpha +// @internal export interface IdAllocator { allocate: (count?: number) => TId; // (undocumented) getNextId: () => TId; } -// @alpha +// @internal export interface IDefaultEditBuilder { // (undocumented) addNodeExistsConstraint(path: UpPath): void; @@ -1063,12 +1063,12 @@ export interface IDisposable { [disposeSymbol](): void; } -// @alpha +// @internal export interface IEditableForest extends IForestSubscription { acquireVisitor(): DeltaVisitor; } -// @alpha +// @internal export interface IEmitter> { emit>(eventName: K, ...args: Parameters): void; emitAndCollect>(eventName: K, ...args: Parameters): ReturnType[]; @@ -1078,7 +1078,7 @@ export { IFluidContainer } export { IFluidContainerEvents } -// @alpha +// @internal export interface IForestSubscription extends ISubscribable { allocateCursor(): ITreeSubscriptionCursor; readonly anchors: AnchorSet; @@ -1112,7 +1112,7 @@ export { IMapMessageLocalMetadata } export { IMember } -// @alpha +// @internal export type ImplicitAllowedTypes = AllowedTypes | FlexTreeNodeSchema | Any; // @beta @@ -1121,19 +1121,19 @@ type ImplicitAllowedTypes_2 = AllowedTypes_2 | TreeNodeSchema; // @beta export type ImplicitFieldSchema = FieldSchema | ImplicitAllowedTypes_2; -// @alpha +// @internal export interface InitializeAndSchematizeConfiguration extends TreeContent, SchematizeConfiguration { } -// @alpha +// @internal export type _InlineTrick = 0; -// @alpha +// @internal export type InsertableFlexField = [ ApplyMultiplicity> ][_InlineTrick]; -// @alpha +// @internal export type InsertableFlexNode = FlattenKeys ? TypedFields : TSchema extends FieldNodeSchema ? InsertableFlexField : TSchema extends MapNodeSchema ? { readonly [P in string]: InsertableFlexField; } : EmptyObject, TSchema extends LeafNodeSchema ? TValueSchema : undefined, TSchema["name"]>>; @@ -1203,24 +1203,24 @@ export { intervalLocatorFromEndpoint } export { IntervalType } -// @alpha +// @internal export interface Invariant extends Contravariant, Covariant { } export { IRootDataObject } -// @alpha +// @internal export type isAny = boolean extends (T extends never ? true : false) ? true : false; -// @alpha +// @internal export type IsArrayOfOne = T["length"] extends 1 ? true : 1 extends T["length"] ? boolean : false; -// @alpha +// @internal export interface ISchemaEditor { setStoredSchema(oldSchema: TreeStoredSchema, newSchema: TreeStoredSchema): void; } -// @alpha +// @internal export function isContextuallyTypedNodeDataObject(data: ContextuallyTypedNodeData | undefined): data is ContextuallyTypedNodeDataObject; export { ISequenceDeltaRange } @@ -1282,19 +1282,19 @@ export { ISharedSegmentSequenceEvents } export { ISharedString } -// @alpha +// @internal export interface ISharedTree extends ISharedObject, ITree { contentSnapshot(): SharedTreeContentSnapshot; requireSchema(schema: FlexTreeSchema, onSchemaIncompatible: () => void): FlexTreeView | undefined; schematizeInternal(config: InitializeAndSchematizeConfiguration): FlexTreeView; } -// @alpha +// @internal export interface ISharedTreeEditor extends IDefaultEditBuilder { schema: ISchemaEditor; } -// @alpha (undocumented) +// @internal (undocumented) export function isNeverField(policy: FullSchemaPolicy, originalData: TreeStoredSchema, field: TreeFieldStoredSchema): boolean; // @beta @@ -1308,7 +1308,7 @@ export class IterableTreeListContent implements Iterable { [Symbol.iterator](): Iterator; } -// @alpha +// @internal export interface ITransaction { abort(): TransactionResult.Abort; commit(): TransactionResult.Commit; @@ -1321,7 +1321,7 @@ export interface ITree extends IChannel { schematize(config: TreeConfiguration): TreeView>; } -// @alpha +// @internal export interface ITreeCheckout extends AnchorLocator { readonly editor: ISharedTreeEditor; readonly events: ISubscribable; @@ -1336,12 +1336,12 @@ export interface ITreeCheckout extends AnchorLocator { updateSchema(newSchema: TreeStoredSchema): void; } -// @alpha +// @internal export interface ITreeCheckoutFork extends ITreeCheckout { rebaseOnto(view: ITreeCheckout): void; } -// @alpha +// @internal export interface ITreeCursor { readonly [CursorMarker]: true; readonly chunkLength: number; @@ -1369,13 +1369,13 @@ export interface ITreeCursor { readonly value: Value; } -// @alpha +// @internal export interface ITreeCursorSynchronous extends ITreeCursor { // (undocumented) readonly pending: false; } -// @alpha +// @internal export interface ITreeSubscriptionCursor extends ITreeCursor { buildAnchor(): Anchor; buildFieldAnchor(): FieldAnchor; @@ -1386,14 +1386,14 @@ export interface ITreeSubscriptionCursor extends ITreeCursor { readonly state: ITreeSubscriptionCursorState; } -// @alpha (undocumented) +// @internal (undocumented) export enum ITreeSubscriptionCursorState { Cleared = 1, Current = 0, Freed = 2 } -// @alpha +// @internal export interface ITreeViewFork extends FlexTreeView { // (undocumented) readonly checkout: ITreeCheckoutFork; @@ -1407,27 +1407,27 @@ export interface IValueChanged { export { IValueOpEmitter } -// @alpha +// @internal export interface JsonableTree extends GenericTreeNode { } -// @alpha +// @internal export function jsonableTreeFromCursor(cursor: ITreeCursor): JsonableTree; -// @alpha +// @internal export type JsonCompatible = string | number | boolean | null | JsonCompatible[] | JsonCompatibleObject; -// @alpha +// @internal export type JsonCompatibleObject = { [P in string]?: JsonCompatible; }; -// @alpha +// @internal export type JsonCompatibleReadOnly = string | number | boolean | null | readonly JsonCompatibleReadOnly[] | { readonly [P in string]?: JsonCompatibleReadOnly; }; -// @alpha +// @internal export interface JsonValidator { compile(schema: Schema): SchemaValidationFunction; } @@ -1435,10 +1435,10 @@ export interface JsonValidator { // @beta type LazyItem = Item | (() => Item); -// @alpha +// @internal export type LazyTreeNodeSchema = FlexTreeNodeSchema | (() => FlexTreeNodeSchema); -// @alpha +// @internal export const leaf: { number: LeafNodeSchema_2<"com.fluidframework.leaf.number", ValueSchema.Number>; boolean: LeafNodeSchema_2<"com.fluidframework.leaf.boolean", ValueSchema.Boolean>; @@ -1450,7 +1450,7 @@ export const leaf: { library: SchemaLibrary_2; }; -// @alpha (undocumented) +// @internal (undocumented) export class LeafNodeSchema = ValueSchema> extends TreeNodeSchemaBase { // (undocumented) static create(builder: Named, name: TreeNodeSchemaIdentifier, specification: Specification): LeafNodeSchema; @@ -1470,7 +1470,7 @@ export { LoadableObjectCtor } export { LoadableObjectRecord } -// @alpha +// @internal export interface LocalNodeKey extends Opaque> { } @@ -1501,10 +1501,10 @@ export class MapFactory implements IChannelFactory { get type(): string; } -// @alpha +// @internal export type MapFieldSchema = TreeFieldSchema; -// @alpha (undocumented) +// @internal (undocumented) export class MapNodeSchema = MapFieldSchema> extends TreeNodeSchemaBase { // (undocumented) static create(builder: Named, name: TreeNodeSchemaIdentifier, specification: Specification): MapNodeSchema; @@ -1516,13 +1516,13 @@ export class MapNodeSchema; } -// @alpha +// @internal export interface MarkedArrayLike extends ArrayLikeMut { // (undocumented) readonly [arrayLikeMarkerSymbol]: true; @@ -1532,7 +1532,7 @@ export interface MarkedArrayLike extends ArrayLi export { MemberChangedListener } -// @alpha +// @internal export enum Multiplicity { Forbidden = 3, Optional = 1, @@ -1540,31 +1540,31 @@ export enum Multiplicity { Single = 0 } -// @alpha +// @internal export interface Named { // (undocumented) readonly name: TName; } -// @alpha +// @internal export type NameFromBranded> = T extends BrandedType ? Name : never; -// @alpha +// @internal export type NestedMap = Map>; -// @alpha +// @internal export type NewFieldContent = ITreeCursorSynchronous | readonly ITreeCursorSynchronous[] | ContextuallyTypedFieldData; // @beta type NodeBuilderData = T extends TreeNodeSchema ? TBuild : never; -// @alpha +// @internal export interface NodeData { readonly type: TreeNodeSchemaIdentifier; value?: TreeValue; } -// @alpha (undocumented) +// @internal (undocumented) export interface NodeExistsConstraint { // (undocumented) violated: boolean; @@ -1573,17 +1573,17 @@ export interface NodeExistsConstraint { // @beta export type NodeFromSchema = T extends TreeNodeSchema ? TNode : never; -// @alpha +// @internal export type NodeIndex = number; -// @alpha +// @internal export const nodeKeyFieldKey = "__n_id__"; -// @alpha (undocumented) +// @internal (undocumented) export interface NodeKeyFieldKind extends FieldKind<"NodeKey", Multiplicity.Single> { } -// @alpha +// @internal export interface NodeKeys { generate(): LocalNodeKey; localize(key: StableNodeKey): LocalNodeKey; @@ -1599,22 +1599,22 @@ enum NodeKind { Object = 2 } -// @alpha +// @internal export type NoListenersCallback> = (eventName: keyof Events) => void; -// @alpha +// @internal export const noopValidator: JsonValidator; -// @alpha +// @internal export type NormalizeAllowedTypes = TSchema extends FlexTreeNodeSchema ? readonly [TSchema] : TSchema extends Any ? readonly [Any] : TSchema; -// @alpha +// @internal export type NormalizeField = TSchema extends TreeFieldSchema ? TSchema : TreeFieldSchema>>; -// @alpha +// @internal export type NormalizeFieldSchema = T extends TreeFieldSchema ? T : TreeFieldSchema; -// @alpha (undocumented) +// @internal (undocumented) export type NormalizeObjectNodeFields = { readonly [Property in keyof T]: NormalizeFieldSchema; }; @@ -1624,7 +1624,7 @@ type ObjectFromSchemaRecord; }; -// @alpha (undocumented) +// @internal (undocumented) export class ObjectNodeSchema = Fields> extends TreeNodeSchemaBase { // (undocumented) static create(builder: Named, name: TreeNodeSchemaIdentifier, specification: Specification): ObjectNodeSchema; @@ -1638,36 +1638,36 @@ export class ObjectNodeSchema(set: ReadonlySet | undefined): T | undefined; -// @alpha +// @internal export type Opaque> = T extends Brand ? BrandedType : never; -// @alpha (undocumented) +// @internal (undocumented) export interface Optional extends FieldKind<"Optional", Multiplicity.Optional> { } -// @alpha (undocumented) +// @internal (undocumented) export interface OptionalFieldEditBuilder { set(newContent: ITreeCursor | undefined, wasEmpty: boolean): void; } -// @alpha +// @internal export type OptionalFields = [ { [P in keyof T as undefined extends T[P] ? T[P] extends undefined ? never : P : never]?: T[P]; } ][_InlineTrick]; -// @alpha +// @internal export interface PathRootPrefix { indexOffset?: number; parent?: UpPath | undefined; rootFieldOverride?: FieldKey; } -// @alpha +// @internal export interface PathVisitor { afterAttach(source: DetachedPlaceUpPath, destination: RangeUpPath): void; afterCreate(content: DetachedRangeUpPath): void; @@ -1683,49 +1683,49 @@ export interface PathVisitor { onInsert(path: UpPath, content: ProtoNodes): void; } -// @alpha +// @internal export type PlaceIndex = number; -// @alpha +// @internal export interface PlaceUpPath extends FieldUpPath { readonly index: PlaceIndex; } -// @alpha +// @internal export function prefixFieldPath(prefix: PathRootPrefix | undefined, path: FieldUpPath): FieldUpPath; -// @alpha +// @internal export function prefixPath(prefix: PathRootPrefix | undefined, path: UpPath | undefined): UpPath | undefined; -// @alpha +// @internal export type ProtoNodes = readonly DeltaProtoNode[]; -// @alpha +// @internal interface Range_2 { readonly end: PlaceIndex; readonly start: PlaceIndex; } export { Range_2 as Range } -// @alpha +// @internal export interface RangeQueryResult { length: number; value: T | undefined; } -// @alpha +// @internal export interface RangeUpPath extends FieldUpPath, Range_2 { } -// @alpha +// @internal export type _RecursiveTrick = never; -// @alpha (undocumented) +// @internal (undocumented) interface Required_2 extends FieldKind<"Value", Multiplicity.Single> { } export { Required_2 as Required } -// @alpha +// @internal export type RequiredFields = [ { [P in keyof T as undefined extends T[P] ? never : P]: T[P]; @@ -1761,22 +1761,22 @@ export enum RevertResult { Success = 0 } -// @alpha +// @internal export interface RootField { // (undocumented) readonly key: DetachedField; } -// @alpha (undocumented) +// @internal (undocumented) export const rootField: DetachedField; -// @alpha +// @internal export const rootFieldKey: FieldKey; -// @alpha +// @internal export function runSynchronous(view: ITreeCheckout, transaction: (view: ITreeCheckout) => TransactionResult | void): TransactionResult; -// @alpha +// @internal export class SchemaBuilderBase { constructor(defaultKind: TDefaultKind, options: SchemaBuilderOptions); // (undocumented) @@ -1800,7 +1800,7 @@ export class SchemaBuilderBase(name: Name): TreeNodeSchemaIdentifier<`${TScope}.${Name}`>; } -// @alpha +// @internal export interface SchemaBuilderOptions { libraries?: SchemaLibrary[]; lint?: Partial; @@ -1808,17 +1808,17 @@ export interface SchemaBuilderOptions { scope: TScope; } -// @alpha +// @internal export interface SchemaCollection { readonly nodeSchema: ReadonlyMap; } -// @alpha +// @internal export interface SchemaConfiguration { readonly schema: FlexTreeSchema; } -// @alpha +// @internal export interface SchemaEvents { afterSchemaChange(newSchema: TreeStoredSchema): void; beforeSchemaChange(newSchema: TreeStoredSchema): void; @@ -1845,24 +1845,24 @@ export class SchemaFactory; } -// @alpha +// @internal export function schemaIsFieldNode(schema: FlexTreeNodeSchema): schema is FieldNodeSchema; -// @alpha +// @internal export function schemaIsLeaf(schema: FlexTreeNodeSchema): schema is LeafNodeSchema; -// @alpha +// @internal export function schemaIsMap(schema: FlexTreeNodeSchema): schema is MapNodeSchema; -// @alpha +// @internal export function schemaIsObjectNode(schema: FlexTreeNodeSchema): schema is ObjectNodeSchema; -// @alpha +// @internal export interface SchemaLibrary extends SchemaCollection { readonly libraries: ReadonlySet; } -// @alpha +// @internal export interface SchemaLibraryData extends SchemaCollection { // (undocumented) readonly adapters: Adapters; @@ -1870,7 +1870,7 @@ export interface SchemaLibraryData extends SchemaCollection { readonly name: string; } -// @alpha +// @internal export interface SchemaLintConfiguration { // (undocumented) readonly rejectEmpty: boolean; @@ -1878,18 +1878,18 @@ export interface SchemaLintConfiguration { readonly rejectForbidden: boolean; } -// @alpha +// @internal export interface SchematizeConfiguration extends SchemaConfiguration { readonly allowedSchemaModifications: AllowedUpdateType; } -// @alpha +// @internal export interface SchemaValidationFunction { // (undocumented) check(data: unknown): data is Static; } -// @alpha (undocumented) +// @internal (undocumented) export interface Sequence extends FieldKind<"Sequence", Multiplicity.Sequence> { } @@ -1897,7 +1897,7 @@ export { SequenceDeltaEvent } export { SequenceEvent } -// @alpha (undocumented) +// @internal (undocumented) export interface SequenceFieldEditBuilder { delete(index: number, count: number): void; insert(index: number, newContent: ITreeCursor | readonly ITreeCursor[]): void; @@ -2034,13 +2034,13 @@ export class SharedTree implements ITree { summarize(fullTree?: boolean | undefined, trackState?: boolean | undefined, telemetryContext?: ITelemetryContext | undefined, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext | undefined): Promise; } -// @alpha +// @internal export interface SharedTreeContentSnapshot { readonly schema: TreeStoredSchema; readonly tree: JsonableTree[]; } -// @alpha +// @internal export class SharedTreeFactory implements IChannelFactory { constructor(options?: SharedTreeOptions); // (undocumented) @@ -2053,17 +2053,17 @@ export class SharedTreeFactory implements IChannelFactory { readonly type: string; } -// @alpha (undocumented) +// @internal (undocumented) export interface SharedTreeOptions extends Partial { forest?: ForestType; // (undocumented) summaryEncodeType?: TreeCompressionStrategy; } -// @alpha +// @internal export function singleTextCursor(root: JsonableTree): ITreeCursorSynchronous; -// @alpha +// @internal export function singletonSchema(factory: SchemaFactory, name: TName): { new (data?: EmptyObject): { readonly value: TName; @@ -2074,27 +2074,27 @@ export function singletonSchema; -// @alpha +// @internal export function stackTreeFieldCursor(adapter: CursorAdapter, root: TNode, detachedField?: DetachedField): CursorWithNode; -// @alpha +// @internal export function stackTreeNodeCursor(adapter: CursorAdapter, root: TNode): CursorWithNode; -// @alpha +// @internal export interface StoredSchemaCollection { readonly nodeSchema: ReadonlyMap; } export { SubSequence } -// @alpha (undocumented) +// @internal (undocumented) export class test_RecursiveObject extends test_RecursiveObject_base { } -// @alpha +// @internal export const test_RecursiveObject_base: TreeNodeSchemaClass_2<"Test Recursive Domain.testObject", NodeKind.Object, ObjectFromSchemaRecord_2< { readonly recursive: FieldSchema_2 typeof test_RecursiveObject]>; readonly number: TreeNodeSchema_2<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number>; @@ -2103,7 +2103,7 @@ readonly recursive: FieldSchema_2 typeof t readonly number: TreeNodeSchema_2<"com.fluidframework.leaf.number", NodeKind.Leaf, number, number>; }>, true>; -// @alpha +// @internal export enum TransactionResult { Abort = 0, Commit = 1 @@ -2112,7 +2112,7 @@ export enum TransactionResult { // @beta export const Tree: TreeApi; -// @alpha (undocumented) +// @internal (undocumented) export interface TreeAdapter { // (undocumented) readonly input: TreeNodeSchemaIdentifier; @@ -2160,7 +2160,7 @@ interface TreeArrayNodeBase extends ReadonlyArray< removeRange(start?: number, end?: number): void; } -// @alpha +// @internal export enum TreeCompressionStrategy { Compressed = 0, Uncompressed = 1 @@ -2175,12 +2175,12 @@ export class TreeConfiguration extends SchemaConfiguration { readonly initialTree: InsertableFlexField | readonly ITreeCursorSynchronous[] | ITreeCursorSynchronous; } -// @alpha +// @internal export interface TreeContext extends ISubscribable { // (undocumented) readonly nodeKeys: NodeKeys; @@ -2188,18 +2188,18 @@ export interface TreeContext extends ISubscribable { readonly schema: FlexTreeSchema; } -// @alpha +// @internal export interface TreeDataContext { fieldSource?(key: FieldKey, schema: TreeFieldStoredSchema): undefined | FieldGenerator; readonly schema: FlexTreeSchema; } -// @alpha +// @internal export interface TreeEvent { readonly target: FlexTreeNode; } -// @alpha +// @internal export class TreeFactory implements IChannelFactory { constructor(options: TreeOptions); // (undocumented) @@ -2215,7 +2215,7 @@ export class TreeFactory implements IChannelFactory { // @beta export type TreeFieldFromImplicitField = TSchema extends FieldSchema ? ApplyKind, Kind> : TSchema extends ImplicitAllowedTypes_2 ? TreeNodeFromImplicitAllowedTypes : unknown; -// @alpha @sealed +// @internal @sealed export class TreeFieldSchema = AllowedTypes> implements TreeFieldStoredSchema { // (undocumented) readonly allowedTypes: TTypes; @@ -2232,7 +2232,7 @@ export class TreeFieldSchema extends ReadonlyMap = TreeNodeSchemaClass | TreeNodeSchemaNonClass; -// @alpha +// @internal export abstract class TreeNodeSchemaBase { protected constructor(builder: Named, name: TreeNodeSchemaIdentifier, info: Specification, stored: TreeNodeStoredSchema); // (undocumented) @@ -2316,7 +2316,7 @@ interface TreeNodeSchemaCore = Brand; // @beta @@ -2325,19 +2325,19 @@ interface TreeNodeSchemaNonClass; } -// @alpha +// @internal export interface TreeOptions extends SharedTreeOptions { readonly subtype?: string; } -// @alpha +// @internal export function treeSchemaFromStoredSchema(schema: TreeStoredSchema): FlexTreeSchema; // @beta @@ -2347,22 +2347,22 @@ export enum TreeStatus { Removed = 1 } -// @alpha +// @internal export interface TreeStoredSchema extends StoredSchemaCollection { readonly rootFieldSchema: TreeFieldStoredSchema; } -// @alpha +// @internal export interface TreeStoredSchemaSubscription extends ISubscribable, TreeStoredSchema { } -// @alpha (undocumented) +// @internal (undocumented) export type TreeType = TreeNodeSchemaIdentifier; -// @alpha +// @internal export type TreeTypeSet = ReadonlySet | undefined; -// @alpha +// @internal export type TreeValue = [ { [ValueSchema.Number]: number; @@ -2379,10 +2379,10 @@ export interface TreeView extends IDisposable { readonly root: TRoot; } -// @alpha +// @internal export const typeboxValidator: JsonValidator; -// @alpha +// @internal export type TypedFields = [ @@ -2393,45 +2393,45 @@ TFields extends { } : EmptyObject ][_InlineTrick]; -// @alpha +// @internal export function typedObjectValues(object: Record): TValues[]; -// @alpha +// @internal export const typeNameSymbol: unique symbol; -// @alpha +// @internal export type UnbrandedName = [ TName extends TreeNodeSchemaIdentifier ? S : string ][_InlineTrick]; -// @alpha +// @internal export type Unenforced<_DesiredExtendsConstraint> = unknown; // @beta export type Unhydrated = T; -// @alpha +// @internal export interface UpPath { readonly parent: TParent | undefined; readonly parentField: FieldKey; readonly parentIndex: NodeIndex; } -// @alpha +// @internal export type UpPathDefault = UpPath; -// @alpha +// @internal export type Value = undefined | TreeValue; -// @alpha (undocumented) +// @internal (undocumented) export interface ValueFieldEditBuilder { set(newContent: ITreeCursor): void; } -// @alpha +// @internal export type ValueFromBranded> = T extends BrandedType ? ValueType : never; -// @alpha +// @internal export enum ValueSchema { // (undocumented) Boolean = 2, @@ -2445,7 +2445,7 @@ export enum ValueSchema { String = 1 } -// @alpha +// @internal export const valueSymbol: unique symbol; ```