Skip to main content
Module

x/fun/schemable.ts>TupleSchemable

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

Takes a tuple of Schemables and returns a Schemable for a tuple that matches, index for index, the input schemables.

ie. [StringSchemable, NumberSchemable] becomes Schemable<[string, number]>

definition: TypeClass<U> & { readonly tuple: <A extends any[], B, C, D, E>(...items: readonly [K in keyof A]: $<U, [A[K], B, C], [D], [E]>) => $<U, [[K in keyof A]: A[K], B, C], [D], [E]>; }