@omer-x/json-schema-types
v1.3.0
Published
TypeScript types for the JSON Schema Specification
Maintainers
Readme
JSON Schema (Draft 2020-12) Types
TypeScript types for the JSON Schema Specification.
Installation
You can install this package via npm:
npm install -D @omer-x/json-schema-typesor via yarn:
yarn add -D @omer-x/json-schema-typesUsage
Import the types you need in your TypeScript project:
import { SchemaObject } from '@omer-x/json-schema-types';
// Example usage
const jsonSchema: SchemaObject = {
type: "string"
};You can also import specific types directly:
import type { ObjectSchema } from "./@omer-x/json-schema-types/object";
import type { ArraySchema } from "./@omer-x/json-schema-types/array";
import type { BooleanSchema } from "./@omer-x/json-schema-types/boolean";
import type { StringSchema } from "./@omer-x/json-schema-types/string";
import type { NumberSchema } from "./@omer-x/json-schema-types/number";
import type { IntegerSchema } from "./@omer-x/json-schema-types/integer";
import type { NullSchema } from "./@omer-x/json-schema-types/null";
import type { UnknownSchema } from "./@omer-x/json-schema-types/unknown";License
This project is licensed under the MIT License. See the LICENSE file for details.
