by sfilipov · 6y ago · 0 comments
You are right that TypeScript aliases don't work like Haskell ones (which are considered different, and type checked). In TypeScript you can use "branded types" to work around the more loose structural typing:
type Firstname = string & { readonly brand?: unique symbol }
https://stackoverflow.com/a/51578232No comments yet.