Skip to content

unacy / SupportedType

Type Alias: SupportedType

ts
type SupportedType = 
  | PrimitiveType
  | EnumType
  | ClassType
  | RecordSchema
  | TupleSchema;

Defined in: packages/core/src/types.ts:248

Union of all types that can be used as a unit's base type. Includes primitives and non-primitive categories (enum, class, record, tuple).

Remarks

SupportedType is the constraint on the T parameter of WithUnits<T, M> and on the type field of TypedMetadata<T>. The registry uses detectMetadataKind to dispatch on which member of the union is present.

Released under the MIT License.