News for hackers. Stuff that matters.
Re:TypeScript: Control flow analysis for destructured discri... by rtpg on Thursday November 04, 2021 @05:28AM (#29105002)
for what it's worth you can totally fake nominal typing in a hacky way through a sort of shiboleth key. You say "this type has `____type: 'foo'`, and on constructions of the object you just cast (or hell, just put the key in!), and you're off to the races.

This is far from perfect, but when you're working with very tricky code and want to be sure, you at least have the option

There are no comments on this comment yet.