import * as Json from "jsonc-parser"; import { Segment } from "vscode-json-languageservice"; import { YAMLDocument } from ".."; import { CustomTag, JSONSchema } from "../../model"; import { ValidationResult } from "./validation-result"; export interface IApplicableSchema { node: ASTNode; inverted?: boolean; schema: JSONSchema; } export declare enum EnumMatch { Key = 0, Enum = 1 } export interface ISchemaCollector { schemas: IApplicableSchema[]; add(schema: IApplicableSchema): void; merge(other: ISchemaCollector): void; include(node: ASTNode): boolean; newSub(): ISchemaCollector; } export declare class ASTNode { start: number; end: number; type: string; parent: ASTNode; location: Json.Segment; customTag: CustomTag; document: YAMLDocument; protected _value: TValue; constructor(document: YAMLDocument, parent: ASTNode, type: string, location: Json.Segment, start: number, end?: number, customTag?: CustomTag); get value(): TValue; set value(newValue: TValue); get nodeType(): string; getPath(): Json.JSONPath; getLocation(): Segment | null; getChildNodes(): ASTNode[]; getLastChild(): ASTNode; contains(offset: number, includeRightBound?: boolean): boolean; toString(): string; visit(visitor: (node: ASTNode) => boolean): boolean; getNodeFromOffset(offset: number): ASTNode; getNodeCollectorCount(): number; getNodeFromOffsetEndInclusive(offset: number): ASTNode; validate(schema: JSONSchema, validationResult: ValidationResult, matchingSchemas: ISchemaCollector): void; get(path: Segment[]): ASTNode | null; }