import * as ast from "../grammar/ast"; import { Diagnostic } from "../diagnostic"; import * as Parser from "web-tree-sitter"; export interface LinterHost { includePaths: string[]; fileExists(filePath: string): boolean; readFile(filePath: string): string; resolveImport(importPath: string, importingFilePath: string, program: Program): string | undefined; } export declare class Program { parser: Parser; host: LinterHost; private constructor(); static Init(host?: Partial): Promise; private parsedFiles; getSourceFile(path: string): SourceFile | undefined; parseFile(path: string, content?: string): SourceFile | undefined; getFilePath(file: ast.File): string | undefined; /** @internal */ getCachedFile(path: string): SourceFile | undefined; } export interface InputSource { fileName?: string; fileContent: string; } export declare class SourceFile { source: InputSource; parseDiagnostics: Diagnostic[]; ast?: ast.File; constructor(source: InputSource, program: Program); }