rivo
Version:
🤖 The ultimate library you need for composable type-level programming in TypeScript, powered by HKT.
20 lines (17 loc) • 390 B
TypeScript
import type { Int } from ".";
import type { Sub } from "./Sub";
import type { Arg0, Fn } from "../../HKT";
/**
* Subtract 1 from an {@link Int}.
*
* Sig: `(n: Int) => Int`
*/
export type Dec<I extends Int> = Sub<I, 1>;
/**
* [Fn] Subtract 1 from an {@link Int}.
*
* Sig: `(n: Int) => Int`
*/
export default interface DecFn extends Fn<[Int], Int> {
def: () => Dec<Arg0<this>>;
}