Skip to main content
Module

x/fun/schemable.ts>PartialSchemable

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 PartialSchemable
import { type PartialSchemable } from "https://deno.land/x/fun@v2.0.0-alpha.10/schemable.ts";

Takes a struct of Schemables and returns a Schemable for a struct that matches, key for key, the input schemables but the values can also be partial.

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

Type Parameters

U extends Kind
definition: TypeClass<U> & { readonly partial: <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]>; }