UNPKG

@allgemein/schema-api

Version:
12 lines (11 loc) 738 B
import { IJsonSchemaSerializeOptions } from '../lib/json-schema/IJsonSchemaSerializeOptions'; import { IClassRef } from './IClassRef'; import { IEntityRef } from './IEntityRef'; import { IJsonSchemaUnserializeOptions } from '../lib/json-schema/IJsonSchemaUnserializeOptions'; export declare function supportsJsonSchemaExport(x: any): x is IJsonSchema; export declare function supportsJsonSchemaImport(x: any): x is IJsonSchema; export declare function supportsJsonSchema(x: any): x is IJsonSchema; export interface IJsonSchema { toJsonSchema?(options?: IJsonSchemaSerializeOptions): Promise<any>; fromJsonSchema?(data: any, options?: IJsonSchemaUnserializeOptions): Promise<IClassRef | IEntityRef | (IClassRef | IEntityRef)[]>; }