effect-io-ai

Package: effect
Module: Deferred

Deferred.makeUnsafe

Creates an empty Deferred synchronously outside the Effect runtime.

When to use

Use to allocate a Deferred synchronously when direct allocation outside Effect is required.

Example (Creating a Deferred unsafely)

import { Deferred } from "effect"

const deferred = Deferred.makeUnsafe<number>()
console.log(deferred)

Signature

declare const makeUnsafe: <A, E = never>() => Deferred<A, E>

Source

Since v4.0.0