You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I read that some people find the type erasure proposal not trustworthy as tools such as TypeScript and Flow have different type checking behavior and may also vary due to version upgrades.
If the proposal was taking the runtime types approach, possibly there could be a special treatment of complex types such as union and complement types, similiar to polymorphism:
Complex types are checked at compile time for correctness
Complex types are converted to any at runtime.
For example, consider the following program:
type U = "n1" | "n2";
const v: U = "nN";
The above program generates a compile time verify error. If it were valid, it'd translate to:
Activity