object
@tsed/schema
Usage
typescript
import { object } from "@tsed/schema";
Overview
ts
function object(properties?: {
[key: string]: JsonSchema;
}): JsonSchema;
Description
Declare a new object model.
See JsonSchema to discover available methods.
Example
typescript
const userSchema = object({
name: string(),
age: number()
});
[key: string]
ts
[key: string]: JsonSchema;