effect-io-ai

Package: effect
Module: Function

Function.constTrue

Returns true when called.

When to use

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

Example (Returning true from a thunk)

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

assert.deepStrictEqual(Function.constTrue(), true)

Signature

declare const constTrue: LazyArg<boolean>

Source

Since v2.0.0