Skip to main content
Module

x/value_schema/dist-deno/schemas/object.ts

simple, easy-to-use, and declarative input validator; supports Node.js, TypeScript, and Deno
Go to Latest
File
import { NullableOptions } from "../libs/publicTypes.ts";import { SchemaObject } from "../libs/types.ts";import { ObjectSchema, OptionsForObject } from "../schemaClasses/ObjectSchema.ts";export function object<S extends SchemaObject>(options: OptionsForObject<S> & NullableOptions): ObjectSchema<S, null>;export function object<S extends SchemaObject>(options: OptionsForObject<S>): ObjectSchema<S>;export function object(): ObjectSchema<SchemaObject>;/** * create schema * @param options Options * @returns schema */export function object<S extends SchemaObject>(options: OptionsForObject<S> = {}): ObjectSchema<S> { return new ObjectSchema(options);}