import * as ts from 'typescript'; import { Diagnostic } from 'typescript/lib/tsserverlibrary'; declare module 'typescript' { interface CreateProgramOptions { rootNames: ReadonlyArray; options: ts.CompilerOptions; projectReferences?: ReadonlyArray; host?: ts.CompilerHost; oldProgram?: ts.Program; configFileParsingDiagnostics?: ReadonlyArray; } interface ProjectReference { path: string; originalPath?: string; prepend?: boolean; circular?: boolean; } } export declare const transformerErrors: WeakMap; export declare function addDiagnosticFactory(program: ts.Program): (diag: ts.Diagnostic) => void; export declare function patchCreateProgram(tsm: typeof ts, forceReadConfig?: boolean, projectDir?: string): typeof ts;