UNPKG

568 BTypeScriptView Raw
1import { JSONSchema, SchemaType } from './types/JSONSchema';
2/**
3 * Duck types a JSONSchema schema or property to determine which kind of AST node to parse it into.
4 *
5 * Due to what some might say is an oversight in the JSON-Schema spec, a given schema may
6 * implicitly be an *intersection* of multiple JSON-Schema directives (ie. multiple TypeScript
7 * types). The spec leaves it up to implementations to decide what to do with this
8 * loosely-defined behavior.
9 */
10export declare function typesOfSchema(schema: JSONSchema): readonly [SchemaType, ...SchemaType[]];