logoalt Hacker News

auggieroseyesterday at 7:14 AM1 replyview on HN

Yes, I am wondering if opaque types would be difficult to implement somehow in TypeScript? It should really be part of TypeScript if at all reasonably possible.


Replies

conartist6yesterday at 9:14 PM

I'm not that familiar with the TS internals. They'd have to add a keyword to the language which could break stuff. The smart move would be to reserve the `opaque` word a few versions in advance of introducing the feature that gives it a meaning