grule
Version:
A simple and powerful mechanism for validating rules in JSON.
20 lines (19 loc) • 521 B
TypeScript
import { IDataTypes } from 'chork';
import { IDataTypesSchema, IOperatorsSchema, IOperatorsList, IArgs } from '../src/interfaces';
/**
* @method typeCheck
*
* @desc Check data type.
*
* @param options
* @param values
*/
export declare const typeCheck: <V>(options: IDataTypes[], args: IArgs) => IDataTypesSchema;
/**
* @function getDataTypes
*
* @desc Returns a schema of data accepted by an operator.
*
* @param operator
*/
export declare const getDataTypes: (operator: IOperatorsList) => IOperatorsSchema;