Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumTypeScriptbranded nominal typingSingle-choice MCQ

Why is a unique symbol often preferred over a string literal for the brand key, as in this pattern?

declare const brand: unique symbol; type Brand<T, B> = T & { readonly [brand]: B };