Brand
Brand<
T,B> =T&object
Defined in: src/types/utilities.ts:71
Creates a branded type for better type safety
Type Declaration
Section titled “Type Declaration”__brand
Section titled “__brand”__brand:
B
Type Parameters
Section titled “Type Parameters”T
B
Example
Section titled “Example”type UserId = Brand<string, 'UserId'>type ProductId = Brand<string, 'ProductId'>// UserId and ProductId are not assignable to each other