1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import ts from 'typescript';
|
9 | import { ErrorCode } from './error_code';
|
10 | export declare class FatalDiagnosticError extends Error {
|
11 | readonly code: ErrorCode;
|
12 | readonly node: ts.Node;
|
13 | readonly diagnosticMessage: string | ts.DiagnosticMessageChain;
|
14 | readonly relatedInformation?: ts.DiagnosticRelatedInformation[] | undefined;
|
15 | constructor(code: ErrorCode, node: ts.Node, diagnosticMessage: string | ts.DiagnosticMessageChain, relatedInformation?: ts.DiagnosticRelatedInformation[] | undefined);
|
16 | message: never;
|
17 | toDiagnostic(): ts.DiagnosticWithLocation;
|
18 | }
|
19 | export declare function makeDiagnostic(code: ErrorCode, node: ts.Node, messageText: string | ts.DiagnosticMessageChain, relatedInformation?: ts.DiagnosticRelatedInformation[], category?: ts.DiagnosticCategory): ts.DiagnosticWithLocation;
|
20 | export declare function makeDiagnosticChain(messageText: string, next?: ts.DiagnosticMessageChain[]): ts.DiagnosticMessageChain;
|
21 | export declare function makeRelatedInformation(node: ts.Node, messageText: string): ts.DiagnosticRelatedInformation;
|
22 | export declare function addDiagnosticChain(messageText: string | ts.DiagnosticMessageChain, add: ts.DiagnosticMessageChain[]): ts.DiagnosticMessageChain;
|
23 | export declare function isFatalDiagnosticError(err: any): err is FatalDiagnosticError;
|
24 | /**
|
25 | * Whether the compiler diagnostics represents an error related to local compilation mode.
|
26 | *
|
27 | * This helper has application in 1P where we check whether a diagnostic is related to local
|
28 | * compilation in order to add some g3 specific info to it.
|
29 | */
|
30 | export declare function isLocalCompilationDiagnostics(diagnostic: ts.Diagnostic): boolean;
|