Ask TS to re-check that A1 extends A2. And if it fails, A2 will be enforced anyway. Can also be used to add constraints on parameters.
A1
A2
to check against
to cast A1 to
A1 or A2
import {A} from 'ts-toolbelt' type test0 = A.Cast<'42', string> // '42' type test1 = A.Cast<'42', number> // number
Made with ❤️ by pirix-gh. Documentation generated by TypeDoc.
Ask TS to re-check that
A1
extendsA2
. And if it fails,A2
will be enforced anyway. Can also be used to add constraints on parameters.