Hi Barry,
Thanks for the note. Apologies for the slow reply — your email got trapped in
Microsoft’s spam filters, and I just noticed it.
The idea of using a wrapper type was my first thought too. In fact, I
implemented that solution in prototype form. It was disliked by almost everyone
who tri
to convey, then I disagree. I think there will
be an ongoing need for this functionality. There's good evidence for this in
TypeScript, where user-defined type guards have been adopted widely by
developers.
--
Eric Traut
Contributor to Pyright & Pylance
Microsoft Corp.
__