Ergonomically coerces any runtime value to type T, eliminating as unknown as T / as any as T double-assertions.
T
as unknown as T
as any as T
The value to cast
The value typed as T
const instance = cast<Ticker.Instance>(proxy); Copy
const instance = cast<Ticker.Instance>(proxy);
Ergonomically coerces any runtime value to type
T, eliminatingas unknown as T/as any as Tdouble-assertions.