News for hackers. Stuff that matters.
Re:Opaque Types in Flow and TypeScript by saurik on Saturday December 16, 2017 @10:07AM (#15939833)
I have not tried it yet, but this technique is documented as the second pattern on this website:

https://basarat.gitbooks.io/typescript/docs/tips/nominalTypi...

(edit:) Ah ha! "Because numbers are type compatible with enums the previous technique cannot be used for them."

There are no comments on this comment yet.