Skip to main content

ReadSchema TypeAlias

Adapter to remove UnsafeUnknownSchema from a schema type so it can be used with types for generating APIs for reading data.

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 ReadSchema<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> = [
TSchema
] extends [ImplicitFieldSchema] ? TSchema : ImplicitFieldSchema;

Type Parameters

Parameter Constraint Description
TSchema ImplicitFieldSchema | UnsafeUnknownSchema

Remarks

Since reading with non-exact schema is still safe, this is mainly useful when the schema is also used as input and thus allows UnsafeUnknownSchema.