You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
377 B

import {Ow} from '../..';
/**
* @hidden
*/
export const testSymbol = Symbol('test');
/**
* @hidden
*/
export const isPredicate = (value: any): value is BasePredicate => Boolean(value && value[testSymbol]);
/**
* @hidden
*/
export interface BasePredicate<T = any> {
// tslint:disable-next-line completed-docs
[testSymbol](value: T, main: Ow, label?: string): void;
}