Skip to main content

FieldSchemaAlpha Class

FieldSchema including alpha APIs (currently SimpleFieldSchema).

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

To use, import via @fluidframework/tree/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 declare class FieldSchemaAlpha<Kind extends FieldKind = FieldKind, Types extends ImplicitAllowedTypes = ImplicitAllowedTypes, TCustomMetadata = unknown, TProps extends FieldPropsAlpha<TCustomMetadata> | undefined = FieldPropsAlpha<TCustomMetadata> | undefined> extends FieldSchema<Kind, Types, TCustomMetadata> implements SimpleFieldSchema<SchemaType.View>

Extends: FieldSchema<Kind, Types, TCustomMetadata>

Implements: SimpleFieldSchema<SchemaType.View>

Type Parameters​

ParameterConstraintDefaultDescription
KindFieldKindFieldKind
TypesImplicitAllowedTypesImplicitAllowedTypes
TCustomMetadataunknown
TPropsFieldPropsAlpha<TCustomMetadata> | undefinedFieldPropsAlpha<TCustomMetadata> | undefined

Remarks​

This class will go away once the alpha APIs are stable and implemented by FieldSchema.

Constructors​

ConstructorAlertsDescription
(constructor)(kind, types, props)AlphaConstructs a new instance of the FieldSchemaAlpha class

Properties​

PropertyAlertsModifiersTypeDescription
allowedTypesFullAlphareadonlyAllowedTypesFullNormalized version of allowedTypes.
allowedTypesIdentifiersAlphareadonlyReadonlySet<string>
isStagedOptionalAlphareadonlyfalse | SchemaUpgrade
persistedMetadataAlphareadonlyJsonCompatibleReadOnlyObject | undefined
simpleAllowedTypesAlphareadonlyReadonlyMap<string, SimpleAllowedTypeAttributes<SchemaType.View>>

Constructor Details​

(constructor)​

Constructs a new instance of the FieldSchemaAlpha class

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

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

Signature​

protected constructor(kind: Kind, types: Types, props?: FieldPropsAlpha<TCustomMetadata>);

Parameters​

ParameterModifiersTypeDescription
kindKind
typesTypes
propsoptionalFieldPropsAlpha<TCustomMetadata>

Property Details​

allowedTypesFull​

Normalized version of allowedTypes.

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

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

Signature​

readonly allowedTypesFull: AllowedTypesFull;

Type: AllowedTypesFull

allowedTypesIdentifiers​

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

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

Signature​

get allowedTypesIdentifiers(): ReadonlySet<string>;

Type: ReadonlySet<string>

isStagedOptional​

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

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

Signature​

get isStagedOptional(): false | SchemaUpgrade;

Type: false | SchemaUpgrade

persistedMetadata​

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

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

Signature​

get persistedMetadata(): JsonCompatibleReadOnlyObject | undefined;

Type: JsonCompatibleReadOnlyObject | undefined

simpleAllowedTypes​

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

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

Signature​

get simpleAllowedTypes(): ReadonlyMap<string, SimpleAllowedTypeAttributes<SchemaType.View>>;

Type: ReadonlyMap<string, SimpleAllowedTypeAttributes<SchemaType.View>>