Skip to main content
Module

x/fun/schemable.ts>StructSchemable

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
interface StructSchemable
implements Hold<U>
import { type StructSchemable } from "https://deno.land/x/fun@v2.0.0-alpha.12/schemable.ts";

Takes a struct of Schemables and returns a Schemable for a struct that matches, key for key, the input schemables.

ie. { str: StringSchemable, num: NumberSchemable } becomes Schemable<{ str: string, num: number }>

Properties

readonly
struct: <A, B, C, D, E>(items: readonly [K in keyof A]: $<U, [A[K], B, C], [D], [E]>) => $<U, [readonly [K in keyof A]: A[K], B, C], [D], [E]>