Skip to main content
Module

x/fun/json_schema.ts>literal

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

Creates a JsonBuilder over a tuple of literals

Examples

Example 1

import * as J from "./json_schema.ts";
import { pipe } from "./fn.ts";

// schema === { enum: [1, 2, "hello"] }
const schema = J.print(J.literal(1, 2, "hello"));

Parameters

...literals: A