effect-io-ai

Package: effect
Module: Function

Function.LazyArg

A zero-argument function that produces a value when invoked.

When to use

Use to type a lazy value provider that should not run until called.

Example (Creating a lazy argument)

import { Function } from "effect"

const constNull: Function.LazyArg<null> = Function.constant(null)

Signature

type LazyArg<A> = () => A

Source

Since v2.0.0