UNPKG

@tsed/schema

Version:
17 lines (16 loc) 532 B
import { Type } from "@tsed/core"; import { JsonSchema } from "../domain/JsonSchema.js"; import type { CtorToType } from "../domain/types.js"; /** * Create a new model from the given type. * * ```typescript * from(String) * ``` * * * See @@JsonSchema@@ to discover available methods. * * @schemaFunctional */ export declare function from<TC extends Type<any> = Type<any>>(): JsonSchema<CtorToType<ObjectConstructor>>; export declare function from<TC extends Type<any> = Type<any>>(type?: TC): JsonSchema<CtorToType<TC>>;