UNPKG

tiny-types

Version:

A tiny library that brings Tiny Types to JavaScript and TypeScript

17 lines (16 loc) 459 B
import { Predicate } from './Predicate'; /** * @desc Ensures that the `value` is defined as anything other than {@link null} or {@link undefined}. * * @example * import { ensure, isDefined, TinyType } from 'tiny-types'; * * class Name extends TinyType { * constructor(public readonly value: string) { * ensure('Name', value, isDefined()); * } * } * * @returns {Predicate<T>} */ export declare function isDefined<T>(): Predicate<T>;