Skip to main content
Module

x/fun/kind.ts>Substitute

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

Substitute is a substitution type, taking a Kind implementation T and substituting it with types passed in S.

definition: T extends { readonly kind: unknown; } ? (T & S)["kind"] : { readonly T: T; readonly [covariant]: () => S["covariant"]; readonly [contravariant]: (_: S["contravariant"]) => void; readonly [invariant]: (_: S["invariant"]) => S["invariant"]; }