tiny-types
Version:
A tiny library that brings Tiny Types to JavaScript and TypeScript
17 lines (16 loc) • 429 B
TypeScript
import { Predicate } from './Predicate';
/**
* @desc Ensures that the `value` is a {@link Number}.
*
* @example
* import { ensure, isNumber, TinyType } from 'tiny-types';
*
* class Percentage extends TinyType {
* constructor(public readonly value: number) {
* ensure('Percentage', value, isNumber());
* }
* }
*
* @returns {Predicate<number>}
*/
export declare function isNumber(): Predicate<number>;