Hyperlinkv0.8.0-beta.28

Record

Record.ReadonlyRecordTypeLambdainterfaceeffect/Record.ts:145
ReadonlyRecordTypeLambda<K>

Type lambda for readonly records, used in higher-kinded type operations. This enables records to work with generic type constructors and functors.

Example (Applying a readonly record type lambda)

import type { HKT, Record } from "effect"

type Settings = HKT.Kind<
  Record.ReadonlyRecordTypeLambda<"port" | "retries">,
  never,
  never,
  never,
  number
>

const defaults: Settings = {
  port: 3000,
  retries: 3
}
type lambdas
Source effect/Record.ts:1453 lines
export interface ReadonlyRecordTypeLambda<K extends string = string> extends TypeLambda {
  readonly type: ReadonlyRecord<K, this["Target"]>
}