/
scope.ts
57 lines (48 loc) 路 1.14 KB
/
scope.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import ts from 'typescript';
import {ClassDeclaration} from '../../reflection';
import {SymbolWithValueDeclaration} from '../../util/src/typescript';
/**
* Metadata on a directive which is available in the scope of a template.
*/
export interface DirectiveInScope {
/**
* The `ts.Symbol` for the directive class.
*/
tsSymbol: SymbolWithValueDeclaration;
/**
* The module which declares the directive.
*/
ngModule: ClassDeclaration|null;
/**
* The selector for the directive or component.
*/
selector: string;
/**
* `true` if this directive is a component.
*/
isComponent: boolean;
/**
* `true` if this directive is a structural directive.
*/
isStructural: boolean;
}
/**
* Metadata for a pipe which is available in the scope of a template.
*/
export interface PipeInScope {
/**
* The `ts.Symbol` for the pipe class.
*/
tsSymbol: ts.Symbol;
/**
* Name of the pipe.
*/
name: string;
}