Skip to main content

FluidSerializableAsTree Namespace

Utilities for storing Fluid Serializable data in TreeNodes.

Same as JsonAsTree except allows IFluidHandles.

This API is provided as a beta preview and may change without notice.

To use, import via fluid-framework/beta.

For more information about our API support guarantees, see here.

Signature

export declare namespace FluidSerializableAsTree

Remarks

Schema which replicate the Fluid Serializable data model with TreeNodes.

Fluid Serializable data can be imported from the Fluid Serializable format into this format using importConcise(schema, data) with the Tree schema.

Classes

ClassAlertsModifiersDescription
ArrayBetasealedArbitrary Fluid Serializable array as a TreeNode.
FluidSerializableObjectBetasealedArbitrary Fluid Serializable object as a TreeNode.

Types

TypeAliasAlertsDescription
_RecursiveArrayWorkaroundJsonArraySystemD.ts bug workaround, see FixRecursiveArraySchema.
DataBetaData which can be serialized by Fluid.
TreeBeta

Variables

VariableAlertsModifiersTypeDescription
_APIExtractorWorkaroundArrayBaseSystemreadonlyimport("./simple-tree/index.js").TreeNodeSchemaClass<"com.fluidframework.serializable.array", import("./simple-tree/index.js").NodeKind.Array, import("./simple-tree/index.js").System_Unsafe.TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]> & import("./simple-tree/index.js").WithType<"com.fluidframework.serializable.array", import("./simple-tree/index.js").NodeKind.Array, unknown>, { [Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").System_Unsafe.InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null, any, undefined>; }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>], undefined>Do not use. Exists only as a workaround for https://github.com/microsoft/TypeScript/issues/59550 and https://github.com/microsoft/rushstack/issues/4429.
_APIExtractorWorkaroundObjectBaseSystemreadonlyimport("./simple-tree/index.js").TreeNodeSchemaClass<"com.fluidframework.serializable.object", import("./simple-tree/index.js").NodeKind.Record, import("./simple-tree/index.js").TreeRecordNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]> & import("./simple-tree/index.js").WithType<"com.fluidframework.serializable.object", import("./simple-tree/index.js").NodeKind.Record, unknown>, { readonly [x: string]: string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").System_Unsafe.InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null; }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>], undefined, unknown>Do not use. Exists only as a workaround for https://github.com/microsoft/TypeScript/issues/59550 and https://github.com/microsoft/rushstack/issues/4429.
TreeBetareadonlyreadonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]AllowedTypes for any content allowed in the FluidSerializableAsTree domain.

Variable Details

_APIExtractorWorkaroundArrayBase

Do not use. Exists only as a workaround for https://github.com/microsoft/TypeScript/issues/59550 and https://github.com/microsoft/rushstack/issues/4429. \

This API is reserved for internal system use and should not be imported directly. It may change at any time without notice.

For more information about our API support guarantees, see here.

Signature

_APIExtractorWorkaroundArrayBase: import("./simple-tree/index.js").TreeNodeSchemaClass<"com.fluidframework.serializable.array", import("./simple-tree/index.js").NodeKind.Array, import("./simple-tree/index.js").System_Unsafe.TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]> & import("./simple-tree/index.js").WithType<"com.fluidframework.serializable.array", import("./simple-tree/index.js").NodeKind.Array, unknown>, {
[Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").System_Unsafe.InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null, any, undefined>;
}, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>], undefined>

Type: import("./simple-tree/index.js").TreeNodeSchemaClass<"com.fluidframework.serializable.array", import("./simple-tree/index.js").NodeKind.Array, import("./simple-tree/index.js").System_Unsafe.TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]> & import("./simple-tree/index.js").WithType<"com.fluidframework.serializable.array", import("./simple-tree/index.js").NodeKind.Array, unknown>, { [Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").System_Unsafe.InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null, any, undefined>; }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>], undefined>

_APIExtractorWorkaroundObjectBase

Do not use. Exists only as a workaround for https://github.com/microsoft/TypeScript/issues/59550 and https://github.com/microsoft/rushstack/issues/4429. \

This API is reserved for internal system use and should not be imported directly. It may change at any time without notice.

For more information about our API support guarantees, see here.

Signature

_APIExtractorWorkaroundObjectBase: import("./simple-tree/index.js").TreeNodeSchemaClass<"com.fluidframework.serializable.object", import("./simple-tree/index.js").NodeKind.Record, import("./simple-tree/index.js").TreeRecordNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]> & import("./simple-tree/index.js").WithType<"com.fluidframework.serializable.object", import("./simple-tree/index.js").NodeKind.Record, unknown>, {
readonly [x: string]: string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").System_Unsafe.InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null;
}, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>], undefined, unknown>

Type: import("./simple-tree/index.js").TreeNodeSchemaClass<"com.fluidframework.serializable.object", import("./simple-tree/index.js").NodeKind.Record, import("./simple-tree/index.js").TreeRecordNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]> & import("./simple-tree/index.js").WithType<"com.fluidframework.serializable.object", import("./simple-tree/index.js").NodeKind.Record, unknown>, { readonly [x: string]: string | number | IFluidHandle<unknown> | import("./simple-tree/index.js").System_Unsafe.InsertableTypedNodeUnsafe<import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null; }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>], undefined, unknown>

Tree

AllowedTypes for any content allowed in the FluidSerializableAsTree domain.

This API is provided as a beta preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

Tree: readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]

Type: readonly [() => typeof FluidSerializableObject, () => typeof Array, import("./simple-tree/leafNodeSchema.js").LeafSchema<"string", string>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"number", number>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"boolean", boolean>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"null", null>, import("./simple-tree/leafNodeSchema.js").LeafSchema<"handle", IFluidHandle<unknown>>]

Example

const tree = TreeBeta.importConcise(FluidSerializableAsTree.Tree, { example: { nested: true }, value: 5 });