UNPKG

592 BTypeScriptView Raw
1import { IAnyType } from "../../internal";
2export declare function refinement<IT extends IAnyType>(name: string, type: IT, predicate: (snapshot: IT["CreationType"]) => boolean, message?: string | ((v: IT["CreationType"]) => string)): IT;
3export declare function refinement<IT extends IAnyType>(type: IT, predicate: (snapshot: IT["CreationType"]) => boolean, message?: string | ((v: IT["CreationType"]) => string)): IT;
4/**
5 * Returns if a given value is a refinement type.
6 *
7 * @param type
8 * @returns
9 */
10export declare function isRefinementType<IT extends IAnyType>(type: IT): type is IT;