const cast: <A, B> (a: A) => B = function <B> (): B { return arguments[0] } const n: string = cast(1)