Skip to main content

SimpleObjectNodeSchema Interface

A SimpleNodeSchema for an object node.

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 interface SimpleObjectNodeSchema<Type extends SchemaType = SchemaType, out TCustomMetadata = unknown> extends SimpleNodeSchemaBaseAlpha<Type, NodeKind.Object, TCustomMetadata>

Extends: SimpleNodeSchemaBaseAlpha<Type, NodeKind.Object, TCustomMetadata>

Type Parameters​

ParameterConstraintDefaultDescription
TypeSchemaTypeSchemaType
TCustomMetadataunknown

Properties​

PropertyAlertsModifiersTypeDescription
allowUnknownOptionalFieldsAlphareadonlyType extends SchemaType.View ? boolean : undefinedWhether the object node allows unknown optional fields.
fieldsAlphareadonlyReadonlyMap<string, SimpleObjectFieldSchema<Type>>Schemas for each of the object's fields, keyed off of schema's keys.

Property Details​

allowUnknownOptionalFields​

Whether the object node allows unknown optional fields.

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 allowUnknownOptionalFields: Type extends SchemaType.View ? boolean : undefined;

Type: Type extends SchemaType.View ? boolean : undefined

Remarks​

Only populated for view schemas, undefined otherwise. Relevant for compatibility checking scenarios.

See Also​

allowUnknownOptionalFields for the API where this field is set as part of authoring a schema.

fields​

Schemas for each of the object's fields, keyed off of schema's keys.

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 fields: ReadonlyMap<string, SimpleObjectFieldSchema<Type>>;

Type: ReadonlyMap<string, SimpleObjectFieldSchema<Type>>

Remarks​

The keys are the property keys if known, otherwise they are the stored keys. Use storedKey to get the stored key.