effect-io-ai

Package: effect
Module: Struct

Struct.Lambda

Interface for type-level functions used by map, mapPick, and mapOmit.

When to use

Use when defining a typed function for map, mapPick, or mapOmit.

Details

Extend this interface with concrete ~lambda.in and ~lambda.out types to describe how a function transforms values at the type level. At runtime, create lambda values with lambda.

Example (Defining a lambda type)

import type { Struct } from "effect"

interface ToString extends Struct.Lambda {
  readonly "~lambda.out": string
}

See

Signature

export interface Lambda {
  readonly "~lambda.in": unknown
  readonly "~lambda.out": unknown
}

Source

Since v4.0.0