Skip to content

TypeAlias.LiteralBrand

github-actions[bot] edited this page Jul 8, 2026 · 28 revisions

umt / LiteralBrand

Type Alias: LiteralBrand<T>

LiteralBrand<T> = T & object

Defined in: Validate/type.ts:67

Branded literal type used by validators (such as oneOf) that need to keep a string literal verbatim through ValidateType. The brand prevents the literal from colliding with reserved type tags like "string", "number", or "boolean" when the same string also happens to name a primitive type.

Type Declaration

[LITERAL_BRAND]

readonly [LITERAL_BRAND]: T

Type Parameters

T

T extends string

The literal value preserved by the brand

API

Classes

Interfaces

Type Aliases

Variables

Functions

Clone this wiki locally