4 ms·
You can use an intersectional type with a unique constraint to make something that behaves like a nominal type (see: https://www.typescriptlang.org/play#example
by notarobot123 3y ago
You can use an intersectional type with a unique constraint to make something that behaves like a nominal type (see: https://www.typescriptlang.org/play#example/nominal-typing https://www.typescriptlang.org/play#example/nominal-typing)
- kroltan 3y agoIf you use a symbol as the brand key, you can even stack multiple different brands!