UNPKG

@meshwatch/backend-core

Version:

Meshwatch backend core services.

6 lines (5 loc) 427 B
import { Dictionary } from '@meshwatch/types/dist/common'; import * as Yup from 'yup'; import { ValidationResponse } from './types'; export declare const typeErrorHandler: (name: string, params: Partial<Yup.TestMessageParams>) => string; export declare function validate<T extends Dictionary<any>>(schema: Yup.ObjectSchema<Yup.Shape<object, T>>, payload: T, options?: Yup.ValidateOptions): Promise<ValidationResponse<T>>;