UNPKG

1.18 kBTypeScriptView Raw
1import { Callback } from './utils';
2/** Determines whether the argument is a non-empty string. */
3export declare function isNonEmptyString(data: unknown): boolean;
4/** Determines whether the argument is a *valid* Date. */
5export declare function isDate(data: unknown): boolean;
6/** Determines whether the argument is the empty string. */
7export declare function isEmptyString(data: unknown): boolean;
8/** Determines whether the argument is a string. */
9export declare function isString(data: unknown): boolean;
10/** Determines whether the string representation of the argument is "[object Object]". */
11export declare function isObject(data: unknown): boolean;
12/** Determines whether the argument is an integer. */
13export declare function isInteger(data: unknown): boolean;
14/**
15 * When the first argument is false, an error is created with the given message. If a callback is
16 * provided, the error is passed to the callback, otherwise the error is thrown.
17 */
18export declare function validate(bool: boolean, cbOrMessage?: Callback<never> | string, message?: string): void;
19/**
20 * Represents a validation error.
21 * @public
22 */
23export declare class ParameterError extends Error {
24}