@peculiar/json-schema
Version:
This package uses ES2015 decorators to simplify JSON schema creation and use
6 lines (5 loc) • 330 B
TypeScript
import { JsonPropTypes } from "./prop_types";
import { IJsonConvertible } from "./types";
export declare function checkType(value: any, type: JsonPropTypes): boolean;
export declare function throwIfTypeIsWrong(value: any, type: JsonPropTypes): void;
export declare function isConvertible(target: any): target is IJsonConvertible;