Skip to main content

ObjectFromSchemaRecord TypeAlias

Generates the properties for an ObjectNode from its field schema object.

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

export type ObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = RestrictiveStringRecord<ImplicitFieldSchema> extends T ? {} : {
-readonly [Property in keyof T]: Property extends string ? TreeFieldFromImplicitField<T[Property]> : unknown;
};

Type Parameters

Parameter Constraint Description
T RestrictiveStringRecord<ImplicitFieldSchema>

Remarks

Due to https://github.com/microsoft/TypeScript/issues/43826, we can't enable implicit construction of TreeNodes for setters. Therefore code assigning to these fields must explicitly construct nodes using the schema's constructor or create method, or using some other method like TreeAlpha.create.