type-plus
type-plus copied to clipboard
Type compatibility/can assign
Forgive me if I have understood wrong (the functionality) but the following code shouldn't work without compiler problems?
assertType.isTrue(true as CanAssign<any, number>);
If the order is inverted, it works fine. Also, the following code apparently compiles:
let a: any = 4;
let b: number = a;
let d: number = 3;
let e: any = d;
StackBlitz print:
Thank you :)