import { IParserDiagnostic } from './diagnostics'; import { ISchemaNode } from './nodes'; import { IReference } from './references'; import { CoreSchemaMetaSchema } from './schema'; import type { JSONSchema7Definition } from './types'; export interface IParserContext { defaultUnknownPropertiesSchema: JSONSchema7Definition; readonly diagnostics: IParserDiagnostic[]; readonly baseUri: string; readonly uri: string; addDiagnostic(info: Pick): void; createReference(ref: string): IReference; enterPath(path: [string, ...string[]], schema: CoreSchemaMetaSchema, fn: (ctx: IParserContext, schema: CoreSchemaMetaSchema) => ISchemaNode): ISchemaNode; enterSchemaNode(schema: CoreSchemaMetaSchema, fn: () => ISchemaNode): ISchemaNode; } export interface ParserContextOptions { /** * Specify the default schema to be used for unknown properties. * * For example, you could pass the schema `true` which will allow any valid * JSON value to be used as an unknown property. */ defaultUnknownPropertiesSchema: JSONSchema7Definition; } export declare class ParserContext implements IParserContext { baseUri: string; uri: string; readonly defaultUnknownPropertiesSchema: JSONSchema7Definition; readonly diagnostics: IParserDiagnostic[]; readonly schemasByUri: Map; readonly nodesByUri: Map>; readonly references: Set; constructor(options: ParserContextOptions); addDiagnostic(info: Pick): void; createReference(ref: string): IReference; enterUri(enteredUri: string, schema: CoreSchemaMetaSchema, fn: (ctx: IParserContext, schema: CoreSchemaMetaSchema) => ISchemaNode): ISchemaNode; enterPath(path: [string, ...string[]], schema: CoreSchemaMetaSchema, fn: (ctx: IParserContext, schema: CoreSchemaMetaSchema) => ISchemaNode): ISchemaNode; enterSchemaNode(schema: CoreSchemaMetaSchema, fn: () => ISchemaNode): ISchemaNode; getSchemaByReference(ref: IReference): CoreSchemaMetaSchema | undefined; getSchemaByUri(uri: string): CoreSchemaMetaSchema | undefined; } //# sourceMappingURL=parserContext.d.ts.map