Hyperlinkv0.8.0-beta.28

Struct

Struct.Lambdainterfaceeffect/Struct.ts:583
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
}
Source effect/Struct.ts:5834 lines
export interface Lambda {
  readonly "~lambda.in": unknown
  readonly "~lambda.out": unknown
}
Referenced by 17 symbols