Hyperlinkv0.8.0-beta.28

Function

Function.castconsteffect/Function.ts:299
<A, B>(a: A): B

Returns the input value with a different static type.

When to use

Use when you need an explicit type-level cast and accept that the value is returned unchanged at runtime.

Gotchas

This is a type-level cast only; it performs no runtime validation or conversion.

utility typessatisfies
export const cast: <A, B>(a: A) => B = identity as any
Referenced by 7 symbols