1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | import { Document } from './document';
|
15 | import { Feature } from './feature';
|
16 | import { AstNodeWithLanguage, SourceRange } from './model';
|
17 | import { Resolvable } from './resolvable';
|
18 | import { FileRelativeUrl, ResolvedUrl } from './url';
|
19 | import { Warning } from './warning';
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | export declare class ScannedImport implements Resolvable {
|
27 | readonly type: 'html-import' | 'html-script' | 'html-style' | 'js-import' | string;
|
28 | |
29 |
|
30 |
|
31 | url: FileRelativeUrl | undefined;
|
32 | sourceRange: SourceRange | undefined;
|
33 | error: {
|
34 | message?: string;
|
35 | } | undefined;
|
36 | |
37 |
|
38 |
|
39 |
|
40 | urlSourceRange: SourceRange | undefined;
|
41 | astNode: AstNodeWithLanguage | undefined;
|
42 | warnings: Warning[];
|
43 | |
44 |
|
45 |
|
46 |
|
47 | lazy: boolean;
|
48 | constructor(type: string, url: FileRelativeUrl | undefined, sourceRange: SourceRange | undefined, urlSourceRange: SourceRange | undefined, ast: AstNodeWithLanguage | undefined, lazy: boolean);
|
49 | resolve(document: Document): Import | undefined;
|
50 | protected constructImport(resolvedUrl: ResolvedUrl, relativeUrl: FileRelativeUrl, importedDocument: Document | undefined, _containingDocument: Document): Import;
|
51 | protected addCouldNotLoadWarning(document: Document, warning?: Warning): void;
|
52 | /**
|
53 | * Resolve the URL for this import and return it if the analyzer
|
54 | */
|
55 | protected getLoadableUrlOrWarn(document: Document): ResolvedUrl | undefined;
|
56 | }
|
57 | declare module './queryable' {
|
58 | interface FeatureKindMap {
|
59 | 'import': Import;
|
60 | 'lazy-import': Import;
|
61 | 'html-import': Import;
|
62 | 'html-script': Import;
|
63 | 'html-style': Import;
|
64 | 'css-import': Import;
|
65 | }
|
66 | }
|
67 | export declare class Import implements Feature {
|
68 | readonly type: 'html-import' | 'html-script' | 'html-style' | string;
|
69 | readonly url: ResolvedUrl;
|
70 | readonly originalUrl: FileRelativeUrl;
|
71 | readonly document: Document | undefined;
|
72 | readonly identifiers: Set<any>;
|
73 | readonly kinds: Set<string>;
|
74 | readonly sourceRange: SourceRange | undefined;
|
75 | readonly urlSourceRange: SourceRange | undefined;
|
76 | readonly astNode: AstNodeWithLanguage | undefined;
|
77 | readonly warnings: Warning[];
|
78 | readonly lazy: boolean;
|
79 | constructor(url: ResolvedUrl, originalUrl: FileRelativeUrl, type: string, document: Document | undefined, sourceRange: SourceRange | undefined, urlSourceRange: SourceRange | undefined, ast: AstNodeWithLanguage | undefined, warnings: Warning[], lazy: boolean);
|
80 | toString(): string;
|
81 | }
|