1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | import * as ts from 'typescript';
|
10 | import * as ng from './types';
|
11 | import { TypeScriptServiceHost } from './typescript_host';
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | declare abstract class BaseTemplate implements ng.TemplateSource {
|
19 | private readonly host;
|
20 | private readonly classDeclNode;
|
21 | private readonly classSymbol;
|
22 | private readonly program;
|
23 | private membersTable;
|
24 | private queryCache;
|
25 | constructor(host: TypeScriptServiceHost, classDeclNode: ts.ClassDeclaration, classSymbol: ng.StaticSymbol);
|
26 | abstract get span(): ng.Span;
|
27 | abstract get fileName(): string;
|
28 | abstract get source(): string;
|
29 | /**
|
30 | * Return the Angular StaticSymbol for the class that contains this template.
|
31 | */
|
32 | get type(): ng.StaticSymbol;
|
33 | /**
|
34 | * Return a Map-like data structure that allows users to retrieve some or all
|
35 | * top-level declarations in the associated component class.
|
36 | */
|
37 | get members(): ng.SymbolTable;
|
38 | /**
|
39 | * Return an engine that provides more information about symbols in the
|
40 | * template.
|
41 | */
|
42 | get query(): ng.SymbolQuery;
|
43 | }
|
44 | /**
|
45 | * An InlineTemplate represents template defined in a TS file through the
|
46 | * `template` attribute in the decorator.
|
47 | */
|
48 | export declare class InlineTemplate extends BaseTemplate {
|
49 | readonly fileName: string;
|
50 | readonly source: string;
|
51 | readonly span: ng.Span;
|
52 | constructor(templateNode: ts.StringLiteralLike, classDeclNode: ts.ClassDeclaration, classSymbol: ng.StaticSymbol, host: TypeScriptServiceHost);
|
53 | }
|
54 | /**
|
55 | * An ExternalTemplate represents template defined in an external (most likely
|
56 | * HTML, but not necessarily) file through the `templateUrl` attribute in the
|
57 | * decorator.
|
58 | * Note that there is no ts.Node associated with the template because it's not
|
59 | * a TS file.
|
60 | */
|
61 | export declare class ExternalTemplate extends BaseTemplate {
|
62 | readonly source: string;
|
63 | readonly fileName: string;
|
64 | readonly span: ng.Span;
|
65 | constructor(source: string, fileName: string, classDeclNode: ts.ClassDeclaration, classSymbol: ng.StaticSymbol, host: TypeScriptServiceHost);
|
66 | }
|
67 | export {};
|