UNPKG

@feathersjs/schema

Version:

A common data schema definition format

6 lines (5 loc) 476 B
import { HookContext, NextFunction } from '@feathersjs/feathers'; import { Schema, Validator } from '../schema'; import { DataValidatorMap } from '../json-schema'; export declare const validateQuery: <H extends HookContext>(schema: Schema<any> | Validator) => (context: H, next?: NextFunction) => Promise<any>; export declare const validateData: <H extends HookContext>(schema: Schema<any> | DataValidatorMap | Validator) => (context: H, next?: NextFunction) => Promise<any>;