brand overview

A branded newtype is a newtype that’s assignable to its underlying type; using the type system to restrict usage of a weaker type where an enforced structure is required.

Branded types are used for nearly all schemata-ts’s string types.

Added in v1.4.0


Table of contents


Model

Branded (type alias)

A newtype that’s assignable to its underlying type.

Signature

export type Branded<A, B> = Opaque<A, B>

Added in v1.4.0