Skip to main content
Module

x/fun/mod.ts>schemable.StructSchemable

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

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 }>

Type Parameters

U extends Kind

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]>