Skip to main content

SchemaFactoryBeta Class

SchemaFactory with additional beta APIs.

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 class SchemaFactoryBeta<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactory<TScope, TName>

Extends: SchemaFactory<TScope, TName>

Type Parameters

Parameter Constraint Default Description
TScope string | undefined string | undefined
TName number | string string

Methods

Method Alerts Return Type Description
scopedFactory(name) Beta SchemaFactoryBeta<ScopedSchemaName<TScope, T>, TNameInner> Create a SchemaFactory with a scope which is a combination of this factory's scope and the provided name.

Method Details

scopedFactory

Create a SchemaFactory with a scope which is a combination of this factory's scope and the provided name.

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

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

Signature
scopedFactory<const T extends TName, TNameInner extends number | string = string>(name: T): SchemaFactoryBeta<ScopedSchemaName<TScope, T>, TNameInner>;
Type Parameters
Parameter Constraint Default Description
T TName
TNameInner number | string string
Remarks

The main use-case for this is when creating a collection of related schema (for example using a function that creates multiple schema). Creating such related schema using a sub-scope helps ensure they won't collide with other schema in the parent scope.

Parameters

Parameter Type Description
name T

Returns

Return type: SchemaFactoryBeta<ScopedSchemaName<TScope, T>, TNameInner>