1 | import { Location, DiagnosticLevel } from '../shared/types';
|
2 | export interface CompilerDiagnosticOrigin {
|
3 | filename?: string;
|
4 | location?: Location;
|
5 | }
|
6 | export interface CompilerDiagnostic {
|
7 | message: string;
|
8 | code: number;
|
9 | filename?: string;
|
10 | location?: Location;
|
11 | level: DiagnosticLevel;
|
12 | }
|
13 | export declare class CompilerError extends Error implements CompilerDiagnostic {
|
14 | code: number;
|
15 | filename?: string;
|
16 | location?: Location;
|
17 | level: DiagnosticLevel;
|
18 | constructor(code: number, message: string, filename?: string, location?: Location);
|
19 | static from(diagnostic: CompilerDiagnostic, origin?: CompilerDiagnosticOrigin): CompilerError;
|
20 | toDiagnostic(): CompilerDiagnostic;
|
21 | }
|
22 | export declare function getCodeFromError(error: any): number | undefined;
|
23 | export declare function getFilename(origin: CompilerDiagnosticOrigin | undefined, obj?: any): string | undefined;
|
24 | export declare function getLocation(origin: CompilerDiagnosticOrigin | undefined, obj?: any): Location | undefined;
|