UNPKG

tiny-types

Version:

A tiny library that brings Tiny Types to JavaScript and TypeScript

17 lines (16 loc) 428 B
import { Predicate } from './Predicate'; /** * @desc Ensures that the `value` is a {@link String}. * * @example * import { ensure, isString, TinyType } from 'tiny-types'; * * class FirstName extends TinyType { * constructor(public readonly value: string) { * ensure('FirstName', value, isString()); * } * } * * @returns {Predicate<string>} */ export declare function isString(): Predicate<string>;