1 | /**
|
2 | * @license
|
3 | * Copyright Google LLC All Rights Reserved.
|
4 | *
|
5 | * Use of this source code is governed by an MIT-style license that can be
|
6 | * found in the LICENSE file at https://angular.io/license
|
7 | */
|
8 | export declare const emitDistinctChangesOnlyDefaultValue = true;
|
9 | export declare enum ViewEncapsulation {
|
10 | Emulated = 0,
|
11 | None = 2,
|
12 | ShadowDom = 3
|
13 | }
|
14 | export declare enum ChangeDetectionStrategy {
|
15 | OnPush = 0,
|
16 | Default = 1
|
17 | }
|
18 | export interface Input {
|
19 | bindingPropertyName?: string;
|
20 | }
|
21 | export interface Output {
|
22 | bindingPropertyName?: string;
|
23 | }
|
24 | export interface HostBinding {
|
25 | hostPropertyName?: string;
|
26 | }
|
27 | export interface HostListener {
|
28 | eventName?: string;
|
29 | args?: string[];
|
30 | }
|
31 | export interface SchemaMetadata {
|
32 | name: string;
|
33 | }
|
34 | export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
|
35 | export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
|
36 | export interface Type extends Function {
|
37 | new (...args: any[]): any;
|
38 | }
|
39 | export declare const Type: FunctionConstructor;
|
40 | export declare enum SecurityContext {
|
41 | NONE = 0,
|
42 | HTML = 1,
|
43 | STYLE = 2,
|
44 | SCRIPT = 3,
|
45 | URL = 4,
|
46 | RESOURCE_URL = 5
|
47 | }
|
48 | /**
|
49 | * Injection flags for DI.
|
50 | */
|
51 | export declare const enum InjectFlags {
|
52 | Default = 0,
|
53 | /**
|
54 | * Specifies that an injector should retrieve a dependency from any injector until reaching the
|
55 | * host element of the current component. (Only used with Element Injector)
|
56 | */
|
57 | Host = 1,
|
58 | /** Don't descend into ancestors of the node requesting injection. */
|
59 | Self = 2,
|
60 | /** Skip the node that is requesting injection. */
|
61 | SkipSelf = 4,
|
62 | /** Inject `defaultValue` instead if token not found. */
|
63 | Optional = 8
|
64 | }
|
65 | export declare enum MissingTranslationStrategy {
|
66 | Error = 0,
|
67 | Warning = 1,
|
68 | Ignore = 2
|
69 | }
|
70 | /**
|
71 | * Flags used to generate R3-style CSS Selectors. They are pasted from
|
72 | * core/src/render3/projection.ts because they cannot be referenced directly.
|
73 | */
|
74 | export declare const enum SelectorFlags {
|
75 | /** Indicates this is the beginning of a new negative selector */
|
76 | NOT = 1,
|
77 | /** Mode for matching attributes */
|
78 | ATTRIBUTE = 2,
|
79 | /** Mode for matching tag names */
|
80 | ELEMENT = 4,
|
81 | /** Mode for matching class names */
|
82 | CLASS = 8
|
83 | }
|
84 | export declare type R3CssSelector = (string | SelectorFlags)[];
|
85 | export declare type R3CssSelectorList = R3CssSelector[];
|
86 | export declare function parseSelectorToR3Selector(selector: string | null): R3CssSelectorList;
|
87 | /**
|
88 | * Flags passed into template functions to determine which blocks (i.e. creation, update)
|
89 | * should be executed.
|
90 | *
|
91 | * Typically, a template runs both the creation block and the update block on initialization and
|
92 | * subsequent runs only execute the update block. However, dynamically created views require that
|
93 | * the creation block be executed separately from the update block (for backwards compat).
|
94 | */
|
95 | export declare const enum RenderFlags {
|
96 | Create = 1,
|
97 | Update = 2
|
98 | }
|
99 | /**
|
100 | * A set of marker values to be used in the attributes arrays. These markers indicate that some
|
101 | * items are not regular attributes and the processing should be adapted accordingly.
|
102 | */
|
103 | export declare const enum AttributeMarker {
|
104 | /**
|
105 | * Marker indicates that the following 3 values in the attributes array are:
|
106 | * namespaceUri, attributeName, attributeValue
|
107 | * in that order.
|
108 | */
|
109 | NamespaceURI = 0,
|
110 | /**
|
111 | * Signals class declaration.
|
112 | *
|
113 | * Each value following `Classes` designates a class name to include on the element.
|
114 | * ## Example:
|
115 | *
|
116 | * Given:
|
117 | * ```
|
118 | * <div class="foo bar baz">...<d/vi>
|
119 | * ```
|
120 | *
|
121 | * the generated code is:
|
122 | * ```
|
123 | * var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];
|
124 | * ```
|
125 | */
|
126 | Classes = 1,
|
127 | /**
|
128 | * Signals style declaration.
|
129 | *
|
130 | * Each pair of values following `Styles` designates a style name and value to include on the
|
131 | * element.
|
132 | * ## Example:
|
133 | *
|
134 | * Given:
|
135 | * ```
|
136 | * <div style="width:100px; height:200px; color:red">...</div>
|
137 | * ```
|
138 | *
|
139 | * the generated code is:
|
140 | * ```
|
141 | * var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];
|
142 | * ```
|
143 | */
|
144 | Styles = 2,
|
145 | /**
|
146 | * Signals that the following attribute names were extracted from input or output bindings.
|
147 | *
|
148 | * For example, given the following HTML:
|
149 | *
|
150 | * ```
|
151 | * <div moo="car" [foo]="exp" (bar)="doSth()">
|
152 | * ```
|
153 | *
|
154 | * the generated code is:
|
155 | *
|
156 | * ```
|
157 | * var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];
|
158 | * ```
|
159 | */
|
160 | Bindings = 3,
|
161 | /**
|
162 | * Signals that the following attribute names were hoisted from an inline-template declaration.
|
163 | *
|
164 | * For example, given the following HTML:
|
165 | *
|
166 | * ```
|
167 | * <div *ngFor="let value of values; trackBy:trackBy" dirA [dirB]="value">
|
168 | * ```
|
169 | *
|
170 | * the generated code for the `template()` instruction would include:
|
171 | *
|
172 | * ```
|
173 | * ['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf',
|
174 | * 'ngForTrackBy', 'let-value']
|
175 | * ```
|
176 | *
|
177 | * while the generated code for the `element()` instruction inside the template function would
|
178 | * include:
|
179 | *
|
180 | * ```
|
181 | * ['dirA', '', AttributeMarker.Bindings, 'dirB']
|
182 | * ```
|
183 | */
|
184 | Template = 4,
|
185 | /**
|
186 | * Signals that the following attribute is `ngProjectAs` and its value is a parsed `CssSelector`.
|
187 | *
|
188 | * For example, given the following HTML:
|
189 | *
|
190 | * ```
|
191 | * <h1 attr="value" ngProjectAs="[title]">
|
192 | * ```
|
193 | *
|
194 | * the generated code for the `element()` instruction would include:
|
195 | *
|
196 | * ```
|
197 | * ['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]
|
198 | * ```
|
199 | */
|
200 | ProjectAs = 5,
|
201 | /**
|
202 | * Signals that the following attribute will be translated by runtime i18n
|
203 | *
|
204 | * For example, given the following HTML:
|
205 | *
|
206 | * ```
|
207 | * <div moo="car" foo="value" i18n-foo [bar]="binding" i18n-bar>
|
208 | * ```
|
209 | *
|
210 | * the generated code is:
|
211 | *
|
212 | * ```
|
213 | * var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];
|
214 | */
|
215 | I18n = 6
|
216 | }
|