UNPKG

@tsed/schema

Version:
22 lines (21 loc) 540 B
import { JsonSchema } from "../domain/JsonSchema.js"; /** * Declare a new object model. * * See @@JsonSchema@@ to discover available methods. * * ### Example * * ```typescript * const userSchema = object({ * name: string(), * age: number() * }); * ``` * * @param properties - An object containing property definitions where each value is a JsonSchema * @returns {JsonSchema} A new object model with the specified properties */ export declare function object(properties?: { [key: string]: JsonSchema; }): JsonSchema;