effect-io-ai

Package: effect
Module: Function

Function.constNull

Returns null when called.

When to use

Use when you need a thunk that returns null on every invocation.

Example (Returning null from a thunk)

import { Function } from "effect"
import * as assert from "node:assert"

assert.deepStrictEqual(Function.constNull(), null)

Signature

declare const constNull: LazyArg<null>

Source

Since v2.0.0