Skip to content

Instantly share code, notes, and snippets.

View jereddanielson's full-sized avatar

Jered jereddanielson

View GitHub Profile
@jereddanielson
jereddanielson / ExtractProperties.ts
Last active April 13, 2021 03:22
This utility type will extract the schema properties definition from a valid JSONSchema7 object into a TypeScript type.
import { JSONSchema7 } from 'json-schema';
type StringToType = {
string: string;
boolean: boolean;
number: number;
integer: number;
null: null;
object: object;
array: object;