Skip to content
Entangle UI v0.13.0

Brand

Brand<T, B> = T & object

Defined in: src/types/utilities.ts:71

Creates a branded type for better type safety

__brand: B

T

B

type UserId = Brand<string, 'UserId'>
type ProductId = Brand<string, 'ProductId'>
// UserId and ProductId are not assignable to each other