UNPKG

886 BTypeScriptView Raw
1import * as ts from 'typescript';
2import { Diagnostic } from 'typescript/lib/tsserverlibrary';
3declare module 'typescript' {
4 interface CreateProgramOptions {
5 rootNames: ReadonlyArray<string>;
6 options: ts.CompilerOptions;
7 projectReferences?: ReadonlyArray<ts.ProjectReference>;
8 host?: ts.CompilerHost;
9 oldProgram?: ts.Program;
10 configFileParsingDiagnostics?: ReadonlyArray<ts.Diagnostic>;
11 }
12 interface ProjectReference {
13 path: string;
14 originalPath?: string;
15 prepend?: boolean;
16 circular?: boolean;
17 }
18}
19export declare const transformerErrors: WeakMap<ts.Program, Diagnostic[]>;
20export declare function addDiagnosticFactory(program: ts.Program): (diag: ts.Diagnostic) => void;
21export declare function patchCreateProgram(tsm: typeof ts, forceReadConfig?: boolean, projectDir?: string): typeof ts;