Package: effect
Module: Struct
Applies a Lambda type-level function to a value type V, producing
the output type.
When to use
Use when you need to compute what type a Lambda would produce for a given input.
Details
This works by intersecting the Lambda with { "~lambda.in": V } and reading
"~lambda.out".
Example (Computing the output type of a lambda)
import type { Struct } from "effect"
interface ToString extends Struct.Lambda {
readonly "~lambda.out": string
}
// Result is `string`
type Result = Struct.Apply<ToString, number>
See
Lambda – the base interfaceSignature
type Apply<L, V> = (L & { readonly "~lambda.in": V })["~lambda.out"]
Since v4.0.0