Hacker News new | ask | show | jobs
by emptysea 2161 days ago
If I understand correctly you want "new types" in typescript, which can be done either via a library or by hand rolling it:

- https://github.com/gcanti/newtype-ts

- https://github.com/Microsoft/TypeScript/issues/4895#issuecom...

but it isn't as nice as say Python's `typing.NewType` or Haskell's `newtype`

1 comments