Skip to main content

ObjectNodeSchemaWorkaround TypeAlias

ObjectNodeSchema with a workaround to avoid a specific known TypeScript issue which causes it to not be assignable to itself in some cases.

This API is provided as an alpha preview and may change without notice.

To use, import via fluid-framework/alpha.

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

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature

/** @sealed */
export type ObjectNodeSchemaWorkaround<TName extends string = string, T extends RestrictiveStringRecord<ImplicitFieldSchema> = RestrictiveStringRecord<ImplicitFieldSchema>, ImplicitlyConstructable extends boolean = boolean, TCustomMetadata = unknown> = ObjectNodeSchema<TName, T, ImplicitlyConstructable, TCustomMetadata> & {
readonly createFromInsertable: unknown;
};

Type Parameters

ParameterConstraintDefaultDescription
TNamestringstring
TRestrictiveStringRecord<ImplicitFieldSchema>RestrictiveStringRecord<ImplicitFieldSchema>
ImplicitlyConstructablebooleanboolean
TCustomMetadataunknown

Remarks

If dealing with a schema whose inferred type includes this workaround (because it was produced by a schema factory API which uses it), if you need to explicitly state that type (for example when using isolatedDeclarations), it is best to keep this workaround. No other case should need to refer to this workaround type directly. See ObjectNodeSchemaWorkaround.createFromInsertable for details.