/
api.ts
65 lines (56 loc) 路 1.6 KB
/
api.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
58
59
60
61
62
63
64
65
/**
* @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 {Reference} from '../../imports';
import {DirectiveMeta, PipeMeta} from '../../metadata';
import {ClassDeclaration} from '../../reflection';
/**
* Data for one of a given NgModule's scopes (either compilation scope or export scopes).
*/
export interface ScopeData {
/**
* Directives in the exported scope of the module.
*/
directives: DirectiveMeta[];
/**
* Pipes in the exported scope of the module.
*/
pipes: PipeMeta[];
/**
* NgModules which contributed to the scope of the module.
*/
ngModules: ClassDeclaration[];
/**
* Whether some module or component in this scope contains errors and is thus semantically
* unreliable.
*/
isPoisoned: boolean;
}
/**
* An export scope of an NgModule, containing the directives/pipes it contributes to other NgModules
* which import it.
*/
export interface ExportScope {
/**
* The scope exported by an NgModule, and available for import.
*/
exported: ScopeData;
}
/**
* A resolved scope for a given component that cannot be set locally in the component definition,
* and must be set via remote scoping call in the component's NgModule file.
*/
export interface RemoteScope {
/**
* Those directives used by the component that requires this scope to be set remotely.
*/
directives: Reference[];
/**
* Those pipes used by the component that requires this scope to be set remotely.
*/
pipes: Reference[];
}