UNPKG

obj-schema-validator

Version:

Lightweight and simple validator for objects and DTOs, designed for TypeScript and Node.js projects.

7 lines (5 loc) 222 B
import { Schema, SchemaValues } from "./schema.types"; export type DynamicObject = { [key: string]: any }; export type ValidationDtoResult<T extends Schema> = | [undefined, SchemaValues<T>] | [string, undefined];