import { type TypeOfSchemaType } from "https://deno.land/x/enzastdlib@v0.0.4/schema/mod.ts";
Returns the JavaScript type of the specified JSON Schema type.
Examples
Example 1
Example 1
import type { TypeOfSchemaType } from 'https://deno.land/x/enzastdlib/schema/mod.ts';
type MySchemaType = 'integer';
type MyType = TypeOfSchemaType<MySchemaType>; // `number`
Type Parameters
SchemaType extends JSONSchemaTypes
definition: SchemaType extends "boolean" ? boolean : (SchemaType extends "null" ? null : (SchemaType extends ("integer" | "number") ? number : (SchemaType extends "string" ? string : (SchemaType extends "array" ? unknown[] : (SchemaType extends "object" ? Record<string, unknown> : never)))))