UNPKG

1.85 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
4 * This code may only be used under the BSD style license found at
5 * http://polymer.github.io/LICENSE.txt
6 * The complete set of authors may be found at
7 * http://polymer.github.io/AUTHORS.txt
8 * The complete set of contributors may be found at
9 * http://polymer.github.io/CONTRIBUTORS.txt
10 * Code distributed by Google as part of the polymer project is also
11 * subject to an additional IP rights grant found at
12 * http://polymer.github.io/PATENTS.txt
13 */
14import { AstNodeWithLanguage, Document, FileRelativeUrl, Import, ResolvedUrl, ScannedImport, SourceRange, Warning } from '../model/model';
15/**
16 * <script> tags are represented in two different ways: as inline documents,
17 * or as imports, depending on whether the tag has a `src` attribute. This class
18 * represents a script tag with a `src` attribute as an import, so that the
19 * analyzer loads and parses the referenced document.
20 */
21export declare class ScriptTagImport extends Import {
22 readonly type = "html-script";
23 readonly isModule: boolean;
24 constructor(url: ResolvedUrl, originalUrl: FileRelativeUrl, type: string, document: Document | undefined, sourceRange: SourceRange | undefined, urlSourceRange: SourceRange | undefined, ast: AstNodeWithLanguage | undefined, warnings: Warning[], lazy: boolean, isModule: boolean);
25}
26export declare class ScannedScriptTagImport extends ScannedImport {
27 readonly isModule: boolean;
28 constructor(url: FileRelativeUrl, sourceRange: SourceRange, urlSourceRange: SourceRange, ast: AstNodeWithLanguage, isModule: boolean);
29 resolve(document: Document): Import | undefined;
30 protected constructImport(resolvedUrl: ResolvedUrl, relativeUrl: FileRelativeUrl, importedDocument: Document | undefined, _containingDocument: Document): ScriptTagImport;
31}