UNPKG

891 BTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { JsonObject } from '../utils';
9/**
10 * A specialized interface for JsonSchema (to come). JsonSchemas are also JsonObject.
11 *
12 * @public
13 */
14export declare type JsonSchema = JsonObject | boolean;
15export declare function isJsonSchema(value: unknown): value is JsonSchema;
16/**
17 * Return a schema that is the merge of all subschemas, ie. it should validate all the schemas
18 * that were passed in. It is possible to make an invalid schema this way, e.g. by using
19 * `mergeSchemas({ type: 'number' }, { type: 'string' })`, which will never validate.
20 * @param schemas All schemas to be merged.
21 */
22export declare function mergeSchemas(...schemas: (JsonSchema | undefined)[]): JsonSchema;