Closed OliverJAsh closed 7 years ago
It might be possible to hack the type system with a type alias:
type never = never | any
If that's invalid in TS 2, we can wrap it in a try/catch - we'll only pay the price of the try/catch once during module initialization.
I don't think we need to do a true backport and recreate the never
type in TS 1 - this can be a strict improvement with a new minor version. I'll play around with it and see if it's possible nonetheless.
Will get to this very soon :)
In TS 2, the following doesn't error
I think that's because
None
is declared asOption<any>
. We need to change it toOption<never>
:How do you plan to manage this change in a backwards compatible way? I'm using Monapt in TS 2, so would love to see this change.