effect-io-ai

Package: effect
Module: Brand

Brand.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

Signature

export interface Brand<in out Keys extends string> {
  readonly [TypeId]: {
    readonly [K in Keys]: Keys
  }
}

Source

Since v2.0.0