1 | export declare class ParseLocation {
|
2 | file: ParseSourceFile;
|
3 | offset: number;
|
4 | line: number;
|
5 | col: number;
|
6 | constructor(file: ParseSourceFile, offset: number, line: number, col: number);
|
7 | toString(): string;
|
8 | moveBy(delta: number): ParseLocation;
|
9 | getContext(maxChars: number, maxLines: number): {
|
10 | before: string;
|
11 | after: string;
|
12 | } | null;
|
13 | }
|
14 | export declare class ParseSourceFile {
|
15 | content: string;
|
16 | url: string;
|
17 | constructor(content: string, url: string);
|
18 | }
|
19 | export declare class ParseSourceSpan {
|
20 | start: ParseLocation;
|
21 | end: ParseLocation;
|
22 | fullStart: ParseLocation;
|
23 | details: string | null;
|
24 | |
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 | constructor(start: ParseLocation, end: ParseLocation, fullStart?: ParseLocation, details?: string | null);
|
48 | toString(): string;
|
49 | }
|
50 | export declare enum ParseErrorLevel {
|
51 | WARNING = 0,
|
52 | ERROR = 1
|
53 | }
|
54 | export declare class ParseError {
|
55 | span: ParseSourceSpan;
|
56 | msg: string;
|
57 | level: ParseErrorLevel;
|
58 | constructor(span: ParseSourceSpan, msg: string, level?: ParseErrorLevel);
|
59 | contextualMessage(): string;
|
60 | toString(): string;
|
61 | }
|
62 | /**
|
63 | * Generates Source Span object for a given R3 Type for JIT mode.
|
64 | *
|
65 | * @param kind Component or Directive.
|
66 | * @param typeName name of the Component or Directive.
|
67 | * @param sourceUrl reference to Component or Directive source.
|
68 | * @returns instance of ParseSourceSpan that represent a given Component or Directive.
|
69 | */
|
70 | export declare function r3JitTypeSourceSpan(kind: string, typeName: string, sourceUrl: string): ParseSourceSpan;
|
71 | export declare function identifierName(compileIdentifier: CompileIdentifierMetadata | null | undefined): string | null;
|
72 | export interface CompileIdentifierMetadata {
|
73 | reference: any;
|
74 | }
|
75 | export declare function sanitizeIdentifier(name: string): string;
|