UNPKG

obj-schema-validator

Version:

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

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