FieldHasDefaultAlpha TypeAlias
Type utility for determining if an implicit field schema is known to have a default value. Supports alpha field schemas with explicit default providers.
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 FieldHasDefaultAlpha<T extends ImplicitFieldSchema> = [
T
] extends [FieldSchemaAlpha<infer Kind, infer _Types, infer _Meta, infer TProps>] ? Kind extends FieldKind.Optional | FieldKind.Identifier ? true : TProps extends {
defaultProvider: DefaultProvider;
} ? true : false : FieldHasDefault<T>;
Type Parameters
| Parameter | Constraint | Description |
|---|---|---|
| T | ImplicitFieldSchema |
Remarks
Yields false when unknown.