Skip to main content
Module

x/fun/refinement.ts>number

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

An instance of Refinement<unknown, number>.

Examples

Example 1

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

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

Parameters

a: unknown

Returns

a is number