-
Notifications
You must be signed in to change notification settings - Fork 24.8k
/
compiler_facade_interface.ts
146 lines (127 loc) · 3.86 KB
/
compiler_facade_interface.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/**
* @license
* Copyright Google Inc. 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
*/
/**
* A set of interfaces which are shared between `@angular/core` and `@angular/compiler` to allow
* for late binding of `@angular/compiler` for JIT purposes.
*
* This file has two copies. Please ensure that they are in sync:
* - packages/compiler/src/compiler_facade_interface.ts (master)
* - packages/core/src/render3/jit/compiler_facade_interface.ts (copy)
*
* Please ensure that the two files are in sync using this command:
* ```
* cp packages/compiler/src/compiler_facade_interface.ts \
* packages/core/src/render3/jit/compiler_facade_interface.ts
* ```
*/
export interface ExportedCompilerFacade { ɵcompilerFacade: CompilerFacade; }
export interface CompilerFacade {
compilePipe(angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3PipeMetadataFacade):
any;
compileInjectable(
angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectableMetadataFacade): any;
compileInjector(
angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3InjectorMetadataFacade): any;
compileNgModule(
angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3NgModuleMetadataFacade): any;
compileDirective(
angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3DirectiveMetadataFacade): any;
compileComponent(
angularCoreEnv: CoreEnvironment, sourceMapUrl: string, meta: R3ComponentMetadataFacade): any;
R3ResolvedDependencyType: typeof R3ResolvedDependencyType;
}
export interface CoreEnvironment { [name: string]: Function; }
export type StringMap = {
[key: string]: string;
};
export type StringMapWithRename = {
[key: string]: string | [string, string];
};
export type Provider = any;
export enum R3ResolvedDependencyType {
Token = 0,
Attribute = 1,
Injector = 2,
}
export interface R3DependencyMetadataFacade {
token: any;
resolved: R3ResolvedDependencyType;
host: boolean;
optional: boolean;
self: boolean;
skipSelf: boolean;
}
export interface R3PipeMetadataFacade {
name: string;
type: any;
pipeName: string;
deps: R3DependencyMetadataFacade[]|null;
pure: boolean;
}
export interface R3InjectableMetadataFacade {
name: string;
type: any;
ctorDeps: R3DependencyMetadataFacade[]|null;
providedIn: any;
useClass?: any;
useFactory?: any;
useExisting?: any;
useValue?: any;
userDeps?: R3DependencyMetadataFacade[];
}
export interface R3NgModuleMetadataFacade {
type: any;
bootstrap: Function[];
declarations: Function[];
imports: Function[];
exports: Function[];
emitInline: boolean;
}
export interface R3InjectorMetadataFacade {
name: string;
type: any;
deps: R3DependencyMetadataFacade[]|null;
providers: any;
imports: any;
}
export interface R3DirectiveMetadataFacade {
name: string;
type: any;
typeArgumentCount: number;
typeSourceSpan: null;
deps: R3DependencyMetadataFacade[]|null;
selector: string|null;
queries: R3QueryMetadataFacade[];
host: {[key: string]: string};
propMetadata: {[key: string]: any[]};
lifecycle: {usesOnChanges: boolean;};
inputs: string[];
outputs: string[];
usesInheritance: boolean;
exportAs: string|null;
providers: Provider[]|null;
}
export interface R3ComponentMetadataFacade extends R3DirectiveMetadataFacade {
template: string;
preserveWhitespaces: boolean;
animations: any[]|undefined;
viewQueries: R3QueryMetadataFacade[];
pipes: Map<string, any>;
directives: Map<string, any>;
styles: string[];
encapsulation: ViewEncapsulation;
viewProviders: Provider[]|null;
}
export type ViewEncapsulation = number;
export interface R3QueryMetadataFacade {
propertyName: string;
first: boolean;
predicate: any|string[];
descendants: boolean;
read: any|null;
}