Package: effect
Module: Struct
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
Apply – apply a Lambda to a concrete typelambda – create a runtime lambda valuemap – use a lambda to transform all struct valuesSignature
export interface Lambda {
readonly "~lambda.in": unknown
readonly "~lambda.out": unknown
}
Since v4.0.0