Skip to content

its

@tsed/cli-mcp

Usage

typescript
import { its } from "@tsed/cli-mcp/src/utils/json-schema-to-zod/parsers/parseSchema";

See /packages/cli-mcp/src/utils/json-schema-to-zod/parsers/parseSchema.ts.

Overview

ts
const its: {
    an: {
        object: (x: JsonSchemaObject) => x is JsonSchemaObject & {
            type: "object";
        };
        array: (x: JsonSchemaObject) => x is JsonSchemaObject & {
            type: "array";
        };
        anyOf: (x: JsonSchemaObject) => x is JsonSchemaObject & {
            anyOf: JsonSchema[];
        };
        allOf: (x: JsonSchemaObject) => x is JsonSchemaObject & {
            allOf: JsonSchema[];
        };
        enum: (x: JsonSchemaObject) => x is JsonSchemaObject & {
            enum: Serializable | Serializable[];
        };
    };
    a: {
        nullable: (x: JsonSchemaObject) => x is JsonSchemaObject & {
            nullable: true;
        };
        multipleType: (x: JsonSchemaObject) => x is JsonSchemaObject & {
            type: string[];
        };
        not: (x: JsonSchemaObject) => x is JsonSchemaObject & {
            not: JsonSchema;
        };
        const: (x: JsonSchemaObject) => x is JsonSchemaObject & {
            const: Serializable;
        };
        primitive: <T extends "string" | "number" | "integer" | "boolean" | "null">(x: JsonSchemaObject, p: T) => x is JsonSchemaObject & {
            type: T;
        };
        conditional: (x: JsonSchemaObject) => x is JsonSchemaObject & {
            if: JsonSchema;
            then: JsonSchema;
            else: JsonSchema;
        };
        oneOf: (x: JsonSchemaObject) => x is JsonSchemaObject & {
            oneOf: JsonSchema[];
        };
    };
};

an

ts
an: {
     object: (x: JsonSchemaObject) => x is JsonSchemaObject & {
         type: "object";
     };
     array: (x: JsonSchemaObject) => x is JsonSchemaObject & {
         type: "array";
     };
     anyOf: (x: JsonSchemaObject) => x is JsonSchemaObject & {
         anyOf: JsonSchema[];
     };
     allOf: (x: JsonSchemaObject) => x is JsonSchemaObject & {
         allOf: JsonSchema[];
     };
     enum: (x: JsonSchemaObject) => x is JsonSchemaObject & {
         enum: Serializable | Serializable[];
     };
 };

a

ts
a: {
     nullable: (x: JsonSchemaObject) => x is JsonSchemaObject & {
         nullable: true;
     };
     multipleType: (x: JsonSchemaObject) => x is JsonSchemaObject & {
         type: string[];
     };
     not: (x: JsonSchemaObject) => x is JsonSchemaObject & {
         not: JsonSchema;
     };
     const: (x: JsonSchemaObject) => x is JsonSchemaObject & {
         const: Serializable;
     };
     primitive: <T extends "string" | "number" | "integer" | "boolean" | "null">(x: JsonSchemaObject, p: T) => x is JsonSchemaObject & {
         type: T;
     };
     conditional: (x: JsonSchemaObject) => x is JsonSchemaObject & {
         if: JsonSchema;
         then: JsonSchema;
         else: JsonSchema;
     };
     oneOf: (x: JsonSchemaObject) => x is JsonSchemaObject & {
         oneOf: JsonSchema[];
     };
 };

Released under the MIT License.