Skip to main content
Module

x/fun/refinement.ts>boolean

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

An instance of Refinement<unknown, boolean>.

Examples

Example 1

import * as R from "./refinement.ts";

const result1 = R.boolean(null); // false
const result2 = R.boolean(true); // true, a variable is now typed as true

Parameters

a: unknown

Returns

a is boolean