Skip to main content

InsertableObjectFromSchemaRecord TypeAlias

Helper used to produce types for:

  1. Insertable content which can be used to construct an object node. In this case, only own properties are considered. This reduces the risk of incorrectly interpreting data at the cost of occasionally requiring users to convert data into a compatible format.

  2. Insertable content which is an unhydrated object node.

  3. Union of 1 and 2.

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 InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = FlattenKeys<{
readonly [Property in keyof T]?: InsertableTreeFieldFromImplicitField<T[Property & string]>;
} & {
readonly [Property in keyof T as FieldHasDefault<T[Property & string]> extends false ? Property : never]: InsertableTreeFieldFromImplicitField<T[Property & string]>;
}>;

Type Parameters

Parameter Constraint Description
T RestrictiveStringRecord<ImplicitFieldSchema>

See Also

Input