Package: effect
Module: Brand
A generic interface that defines a branded type.
When to use
Use to define a branded type such as number & Brand<"Positive"> when
TypeScript should keep structurally identical values separate without
changing their runtime value.
See
Branded for applying a brand key to a base typeConstructor for validating or constructing branded valuesSignature
export interface Brand<in out Keys extends string> {
readonly [TypeId]: {
readonly [K in Keys]: Keys
}
}
Since v2.0.0