Skip to main content
Module

x/rimbu/typical/mod.ts>Num.Decr

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
type alias Num.Decr
import { type Num } from "https://deno.land/x/rimbu@0.12.3/typical/mod.ts";
const { Decr } = Num;

Decreases a positive number by 1, or if the number is not positive, returns never.

Examples

Example 1

Dec<5> => 4
Dec<434> => 433
Dec<0> => never

Type Parameters

N extends number
definition: Subtract<N, 1>