effect-io-ai

Package: effect
Module: Function

Function.unsafeCoerce

Casts the result to the specified type.

Example

import * as assert from "node:assert"
import { unsafeCoerce, identity } from "effect/Function"

assert.deepStrictEqual(unsafeCoerce, identity)

Signature

declare const unsafeCoerce: <A, B>(a: A) => B

Source

Since v2.0.0