UNPKG

529 kBTypeScriptView Raw
1/**
2 * @license Angular v13.3.8
3 * (c) 2010-2022 Google LLC. https://angular.io/
4 * License: MIT
5 */
6
7import { Observable } from 'rxjs';
8import { Subject } from 'rxjs';
9import { Subscribable } from 'rxjs';
10import { Subscription } from 'rxjs';
11
12/**
13 * @description
14 *
15 * Represents an abstract class `T`, if applied to a concrete class it would stop being
16 * instantiable.
17 *
18 * @publicApi
19 */
20export declare interface AbstractType<T> extends Function {
21 prototype: T;
22}
23
24/**
25 * @description
26 * A lifecycle hook that is called after the default change detector has
27 * completed checking all content of a directive.
28 *
29 * @see `AfterViewChecked`
30 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
31 *
32 * @usageNotes
33 * The following snippet shows how a component can implement this interface to
34 * define its own after-check functionality.
35 *
36 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentChecked'}
37 *
38 * @publicApi
39 */
40export declare interface AfterContentChecked {
41 /**
42 * A callback method that is invoked immediately after the
43 * default change detector has completed checking all of the directive's
44 * content.
45 */
46 ngAfterContentChecked(): void;
47}
48
49/**
50 * @description
51 * A lifecycle hook that is called after Angular has fully initialized
52 * all content of a directive.
53 * Define an `ngAfterContentInit()` method to handle any additional initialization tasks.
54 *
55 * @see `OnInit`
56 * @see `AfterViewInit`
57 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
58 *
59 * @usageNotes
60 * The following snippet shows how a component can implement this interface to
61 * define its own content initialization method.
62 *
63 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentInit'}
64 *
65 * @publicApi
66 */
67export declare interface AfterContentInit {
68 /**
69 * A callback method that is invoked immediately after
70 * Angular has completed initialization of all of the directive's
71 * content.
72 * It is invoked only once when the directive is instantiated.
73 */
74 ngAfterContentInit(): void;
75}
76
77/**
78 * @description
79 * A lifecycle hook that is called after the default change detector has
80 * completed checking a component's view for changes.
81 *
82 * @see `AfterContentChecked`
83 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
84 *
85 * @usageNotes
86 * The following snippet shows how a component can implement this interface to
87 * define its own after-check functionality.
88 *
89 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewChecked'}
90 *
91 * @publicApi
92 */
93export declare interface AfterViewChecked {
94 /**
95 * A callback method that is invoked immediately after the
96 * default change detector has completed one change-check cycle
97 * for a component's view.
98 */
99 ngAfterViewChecked(): void;
100}
101
102/**
103 * @description
104 * A lifecycle hook that is called after Angular has fully initialized
105 * a component's view.
106 * Define an `ngAfterViewInit()` method to handle any additional initialization tasks.
107 *
108 * @see `OnInit`
109 * @see `AfterContentInit`
110 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
111 *
112 * @usageNotes
113 * The following snippet shows how a component can implement this interface to
114 * define its own view initialization method.
115 *
116 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewInit'}
117 *
118 * @publicApi
119 */
120export declare interface AfterViewInit {
121 /**
122 * A callback method that is invoked immediately after
123 * Angular has completed initialization of a component's view.
124 * It is invoked only once when the view is instantiated.
125 *
126 */
127 ngAfterViewInit(): void;
128}
129
130/**
131 * A DI token that you can use to create a virtual [provider](guide/glossary#provider)
132 * that will populate the `entryComponents` field of components and NgModules
133 * based on its `useValue` property value.
134 * All components that are referenced in the `useValue` value (either directly
135 * or in a nested array or map) are added to the `entryComponents` property.
136 *
137 * @usageNotes
138 *
139 * The following example shows how the router can populate the `entryComponents`
140 * field of an NgModule based on a router configuration that refers
141 * to components.
142 *
143 * ```typescript
144 * // helper function inside the router
145 * function provideRoutes(routes) {
146 * return [
147 * {provide: ROUTES, useValue: routes},
148 * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}
149 * ];
150 * }
151 *
152 * // user code
153 * let routes = [
154 * {path: '/root', component: RootComp},
155 * {path: '/teams', component: TeamsComp}
156 * ];
157 *
158 * @NgModule({
159 * providers: [provideRoutes(routes)]
160 * })
161 * class ModuleWithRoutes {}
162 * ```
163 *
164 * @publicApi
165 * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.
166 */
167export declare const ANALYZE_FOR_ENTRY_COMPONENTS: InjectionToken<any>;
168
169/**
170 * A [DI token](guide/glossary#di-token "DI token definition") that provides a set of callbacks to
171 * be called for every component that is bootstrapped.
172 *
173 * Each callback must take a `ComponentRef` instance and return nothing.
174 *
175 * `(componentRef: ComponentRef) => void`
176 *
177 * @publicApi
178 */
179export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<((compRef: ComponentRef<any>) => void)[]>;
180
181/**
182 * A [DI token](guide/glossary#di-token "DI token definition") representing a unique string ID, used
183 * primarily for prefixing application attributes and CSS styles when
184 * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.
185 *
186 * BY default, the value is randomly generated and assigned to the application by Angular.
187 * To provide a custom ID value, use a DI provider <!-- TODO: provider --> to configure
188 * the root {@link Injector} that uses this token.
189 *
190 * @publicApi
191 */
192export declare const APP_ID: InjectionToken<string>;
193
194/**
195 * A [DI token](guide/glossary#di-token "DI token definition") that you can use to provide
196 * one or more initialization functions.
197 *
198 * The provided functions are injected at application startup and executed during
199 * app initialization. If any of these functions returns a Promise or an Observable, initialization
200 * does not complete until the Promise is resolved or the Observable is completed.
201 *
202 * You can, for example, create a factory function that loads language data
203 * or an external configuration, and provide that function to the `APP_INITIALIZER` token.
204 * The function is executed during the application bootstrap process,
205 * and the needed data is available on startup.
206 *
207 * @see `ApplicationInitStatus`
208 *
209 * @usageNotes
210 *
211 * The following example illustrates how to configure a multi-provider using `APP_INITIALIZER` token
212 * and a function returning a promise.
213 *
214 * ```
215 * function initializeApp(): Promise<any> {
216 * return new Promise((resolve, reject) => {
217 * // Do some asynchronous stuff
218 * resolve();
219 * });
220 * }
221 *
222 * @NgModule({
223 * imports: [BrowserModule],
224 * declarations: [AppComponent],
225 * bootstrap: [AppComponent],
226 * providers: [{
227 * provide: APP_INITIALIZER,
228 * useFactory: () => initializeApp,
229 * multi: true
230 * }]
231 * })
232 * export class AppModule {}
233 * ```
234 *
235 * It's also possible to configure a multi-provider using `APP_INITIALIZER` token and a function
236 * returning an observable, see an example below. Note: the `HttpClient` in this example is used for
237 * demo purposes to illustrate how the factory function can work with other providers available
238 * through DI.
239 *
240 * ```
241 * function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {
242 * return () => httpClient.get("https://someUrl.com/api/user")
243 * .pipe(
244 * tap(user => { ... })
245 * );
246 * }
247 *
248 * @NgModule({
249 * imports: [BrowserModule, HttpClientModule],
250 * declarations: [AppComponent],
251 * bootstrap: [AppComponent],
252 * providers: [{
253 * provide: APP_INITIALIZER,
254 * useFactory: initializeAppFactory,
255 * deps: [HttpClient],
256 * multi: true
257 * }]
258 * })
259 * export class AppModule {}
260 * ```
261 *
262 * @publicApi
263 */
264export declare const APP_INITIALIZER: InjectionToken<readonly (() => Observable<unknown> | Promise<unknown> | void)[]>;
265
266declare function _appIdRandomProviderFactory(): string;
267
268/**
269 * A class that reflects the state of running {@link APP_INITIALIZER} functions.
270 *
271 * @publicApi
272 */
273export declare class ApplicationInitStatus {
274 private readonly appInits;
275 private resolve;
276 private reject;
277 private initialized;
278 readonly donePromise: Promise<any>;
279 readonly done = false;
280 constructor(appInits: ReadonlyArray<() => Observable<unknown> | Promise<unknown> | void>);
281 static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationInitStatus, [{ optional: true; }]>;
282 static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationInitStatus>;
283}
284
285/**
286 * Re-exported by `BrowserModule`, which is included automatically in the root
287 * `AppModule` when you create a new app with the CLI `new` command. Eagerly injects
288 * `ApplicationRef` to instantiate it.
289 *
290 * @publicApi
291 */
292export declare class ApplicationModule {
293 constructor(appRef: ApplicationRef);
294 static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationModule, never>;
295 static ɵmod: i0.ɵɵNgModuleDeclaration<ApplicationModule, never, never, never>;
296 static ɵinj: i0.ɵɵInjectorDeclaration<ApplicationModule>;
297}
298
299/**
300 * A reference to an Angular application running on a page.
301 *
302 * @usageNotes
303 *
304 * {@a is-stable-examples}
305 * ### isStable examples and caveats
306 *
307 * Note two important points about `isStable`, demonstrated in the examples below:
308 * - the application will never be stable if you start any kind
309 * of recurrent asynchronous task when the application starts
310 * (for example for a polling process, started with a `setInterval`, a `setTimeout`
311 * or using RxJS operators like `interval`);
312 * - the `isStable` Observable runs outside of the Angular zone.
313 *
314 * Let's imagine that you start a recurrent task
315 * (here incrementing a counter, using RxJS `interval`),
316 * and at the same time subscribe to `isStable`.
317 *
318 * ```
319 * constructor(appRef: ApplicationRef) {
320 * appRef.isStable.pipe(
321 * filter(stable => stable)
322 * ).subscribe(() => console.log('App is stable now');
323 * interval(1000).subscribe(counter => console.log(counter));
324 * }
325 * ```
326 * In this example, `isStable` will never emit `true`,
327 * and the trace "App is stable now" will never get logged.
328 *
329 * If you want to execute something when the app is stable,
330 * you have to wait for the application to be stable
331 * before starting your polling process.
332 *
333 * ```
334 * constructor(appRef: ApplicationRef) {
335 * appRef.isStable.pipe(
336 * first(stable => stable),
337 * tap(stable => console.log('App is stable now')),
338 * switchMap(() => interval(1000))
339 * ).subscribe(counter => console.log(counter));
340 * }
341 * ```
342 * In this example, the trace "App is stable now" will be logged
343 * and then the counter starts incrementing every second.
344 *
345 * Note also that this Observable runs outside of the Angular zone,
346 * which means that the code in the subscription
347 * to this Observable will not trigger the change detection.
348 *
349 * Let's imagine that instead of logging the counter value,
350 * you update a field of your component
351 * and display it in its template.
352 *
353 * ```
354 * constructor(appRef: ApplicationRef) {
355 * appRef.isStable.pipe(
356 * first(stable => stable),
357 * switchMap(() => interval(1000))
358 * ).subscribe(counter => this.value = counter);
359 * }
360 * ```
361 * As the `isStable` Observable runs outside the zone,
362 * the `value` field will be updated properly,
363 * but the template will not be refreshed!
364 *
365 * You'll have to manually trigger the change detection to update the template.
366 *
367 * ```
368 * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {
369 * appRef.isStable.pipe(
370 * first(stable => stable),
371 * switchMap(() => interval(1000))
372 * ).subscribe(counter => {
373 * this.value = counter;
374 * cd.detectChanges();
375 * });
376 * }
377 * ```
378 *
379 * Or make the subscription callback run inside the zone.
380 *
381 * ```
382 * constructor(appRef: ApplicationRef, zone: NgZone) {
383 * appRef.isStable.pipe(
384 * first(stable => stable),
385 * switchMap(() => interval(1000))
386 * ).subscribe(counter => zone.run(() => this.value = counter));
387 * }
388 * ```
389 *
390 * @publicApi
391 */
392export declare class ApplicationRef {
393 private _zone;
394 private _injector;
395 private _exceptionHandler;
396 private _initStatus;
397 private _views;
398 private _runningTick;
399 private _stable;
400 private _onMicrotaskEmptySubscription;
401 /**
402 * Get a list of component types registered to this application.
403 * This list is populated even before the component is created.
404 */
405 readonly componentTypes: Type<any>[];
406 /**
407 * Get a list of components registered to this application.
408 */
409 readonly components: ComponentRef<any>[];
410 /**
411 * Returns an Observable that indicates when the application is stable or unstable.
412 *
413 * @see [Usage notes](#is-stable-examples) for examples and caveats when using this API.
414 */
415 readonly isStable: Observable<boolean>;
416 /**
417 * Bootstrap a component onto the element identified by its selector or, optionally, to a
418 * specified element.
419 *
420 * @usageNotes
421 * ### Bootstrap process
422 *
423 * When bootstrapping a component, Angular mounts it onto a target DOM element
424 * and kicks off automatic change detection. The target DOM element can be
425 * provided using the `rootSelectorOrNode` argument.
426 *
427 * If the target DOM element is not provided, Angular tries to find one on a page
428 * using the `selector` of the component that is being bootstrapped
429 * (first matched element is used).
430 *
431 * ### Example
432 *
433 * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
434 * but it requires us to know the component while writing the application code.
435 *
436 * Imagine a situation where we have to wait for an API call to decide about the component to
437 * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
438 * dynamically bootstrap a component.
439 *
440 * {@example core/ts/platform/platform.ts region='componentSelector'}
441 *
442 * Optionally, a component can be mounted onto a DOM element that does not match the
443 * selector of the bootstrapped component.
444 *
445 * In the following example, we are providing a CSS selector to match the target element.
446 *
447 * {@example core/ts/platform/platform.ts region='cssSelector'}
448 *
449 * While in this example, we are providing reference to a DOM node.
450 *
451 * {@example core/ts/platform/platform.ts region='domNode'}
452 */
453 bootstrap<C>(component: Type<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
454 /**
455 * Bootstrap a component onto the element identified by its selector or, optionally, to a
456 * specified element.
457 *
458 * @usageNotes
459 * ### Bootstrap process
460 *
461 * When bootstrapping a component, Angular mounts it onto a target DOM element
462 * and kicks off automatic change detection. The target DOM element can be
463 * provided using the `rootSelectorOrNode` argument.
464 *
465 * If the target DOM element is not provided, Angular tries to find one on a page
466 * using the `selector` of the component that is being bootstrapped
467 * (first matched element is used).
468 *
469 * ### Example
470 *
471 * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
472 * but it requires us to know the component while writing the application code.
473 *
474 * Imagine a situation where we have to wait for an API call to decide about the component to
475 * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
476 * dynamically bootstrap a component.
477 *
478 * {@example core/ts/platform/platform.ts region='componentSelector'}
479 *
480 * Optionally, a component can be mounted onto a DOM element that does not match the
481 * selector of the bootstrapped component.
482 *
483 * In the following example, we are providing a CSS selector to match the target element.
484 *
485 * {@example core/ts/platform/platform.ts region='cssSelector'}
486 *
487 * While in this example, we are providing reference to a DOM node.
488 *
489 * {@example core/ts/platform/platform.ts region='domNode'}
490 *
491 * @deprecated Passing Component factories as the `Application.bootstrap` function argument is
492 * deprecated. Pass Component Types instead.
493 */
494 bootstrap<C>(componentFactory: ComponentFactory<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
495 /**
496 * Invoke this method to explicitly process change detection and its side-effects.
497 *
498 * In development mode, `tick()` also performs a second change detection cycle to ensure that no
499 * further changes are detected. If additional changes are picked up during this second cycle,
500 * bindings in the app have side-effects that cannot be resolved in a single change detection
501 * pass.
502 * In this case, Angular throws an error, since an Angular application can only have one change
503 * detection pass during which all change detection must complete.
504 */
505 tick(): void;
506 /**
507 * Attaches a view so that it will be dirty checked.
508 * The view will be automatically detached when it is destroyed.
509 * This will throw if the view is already attached to a ViewContainer.
510 */
511 attachView(viewRef: ViewRef): void;
512 /**
513 * Detaches a view from dirty checking again.
514 */
515 detachView(viewRef: ViewRef): void;
516 private _loadComponent;
517 /**
518 * Returns the number of attached views.
519 */
520 get viewCount(): number;
521 static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationRef, never>;
522 static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationRef>;
523}
524
525/**
526 * @publicApi
527 */
528export declare function asNativeElements(debugEls: DebugElement[]): any;
529
530/**
531 * Checks that there is currently a platform that contains the given token as a provider.
532 *
533 * @publicApi
534 */
535export declare function assertPlatform(requiredToken: any): PlatformRef;
536
537/**
538 * Type of the Attribute metadata.
539 *
540 * @publicApi
541 */
542export declare interface Attribute {
543 /**
544 * The name of the attribute whose value can be injected.
545 */
546 attributeName: string;
547}
548
549/**
550 * Attribute decorator and metadata.
551 *
552 * @Annotation
553 * @publicApi
554 */
555export declare const Attribute: AttributeDecorator;
556
557
558/**
559 * Type of the Attribute decorator / constructor function.
560 *
561 * @publicApi
562 */
563export declare interface AttributeDecorator {
564 /**
565 * Parameter decorator for a directive constructor that designates
566 * a host-element attribute whose value is injected as a constant string literal.
567 *
568 * @usageNotes
569 *
570 * Suppose we have an `<input>` element and want to know its `type`.
571 *
572 * ```html
573 * <input type="text">
574 * ```
575 *
576 * The following example uses the decorator to inject the string literal `text` in a directive.
577 *
578 * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}
579 *
580 * The following example uses the decorator in a component constructor.
581 *
582 * {@example core/ts/metadata/metadata.ts region='attributeFactory'}
583 *
584 */
585 (name: string): any;
586 new (name: string): Attribute;
587}
588
589/**
590 * Provides additional options to the bootstraping process.
591 *
592 *
593 */
594declare interface BootstrapOptions {
595 /**
596 * Optionally specify which `NgZone` should be used.
597 *
598 * - Provide your own `NgZone` instance.
599 * - `zone.js` - Use default `NgZone` which requires `Zone.js`.
600 * - `noop` - Use `NoopNgZone` which does nothing.
601 */
602 ngZone?: NgZone | 'zone.js' | 'noop';
603 /**
604 * Optionally specify coalescing event change detections or not.
605 * Consider the following case.
606 *
607 * <div (click)="doSomething()">
608 * <button (click)="doSomethingElse()"></button>
609 * </div>
610 *
611 * When button is clicked, because of the event bubbling, both
612 * event handlers will be called and 2 change detections will be
613 * triggered. We can colesce such kind of events to only trigger
614 * change detection only once.
615 *
616 * By default, this option will be false. So the events will not be
617 * coalesced and the change detection will be triggered multiple times.
618 * And if this option be set to true, the change detection will be
619 * triggered async by scheduling a animation frame. So in the case above,
620 * the change detection will only be triggered once.
621 */
622 ngZoneEventCoalescing?: boolean;
623 /**
624 * Optionally specify if `NgZone#run()` method invocations should be coalesced
625 * into a single change detection.
626 *
627 * Consider the following case.
628 *
629 * for (let i = 0; i < 10; i ++) {
630 * ngZone.run(() => {
631 * // do something
632 * });
633 * }
634 *
635 * This case triggers the change detection multiple times.
636 * With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.
637 * In addition, the change detection executes in requestAnimation.
638 *
639 */
640 ngZoneRunCoalescing?: boolean;
641}
642
643
644/**
645 * The strategy that the default change detector uses to detect changes.
646 * When set, takes effect the next time change detection is triggered.
647 *
648 * @see {@link ChangeDetectorRef#usage-notes Change detection usage}
649 *
650 * @publicApi
651 */
652export declare enum ChangeDetectionStrategy {
653 /**
654 * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated
655 * until reactivated by setting the strategy to `Default` (`CheckAlways`).
656 * Change detection can still be explicitly invoked.
657 * This strategy applies to all child directives and cannot be overridden.
658 */
659 OnPush = 0,
660 /**
661 * Use the default `CheckAlways` strategy, in which change detection is automatic until
662 * explicitly deactivated.
663 */
664 Default = 1
665}
666
667declare type ChangeDetectionStrategy_2 = number;
668
669/**
670 * Base class that provides change detection functionality.
671 * A change-detection tree collects all views that are to be checked for changes.
672 * Use the methods to add and remove views from the tree, initiate change-detection,
673 * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.
674 *
675 * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks)
676 * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection)
677 *
678 * @usageNotes
679 *
680 * The following examples demonstrate how to modify default change-detection behavior
681 * to perform explicit detection when needed.
682 *
683 * ### Use `markForCheck()` with `CheckOnce` strategy
684 *
685 * The following example sets the `OnPush` change-detection strategy for a component
686 * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check
687 * after an interval. See [live demo](https://plnkr.co/edit/GC512b?p=preview).
688 *
689 * <code-example path="core/ts/change_detect/change-detection.ts"
690 * region="mark-for-check"></code-example>
691 *
692 * ### Detach change detector to limit how often check occurs
693 *
694 * The following example defines a component with a large list of read-only data
695 * that is expected to change constantly, many times per second.
696 * To improve performance, we want to check and update the list
697 * less often than the changes actually occur. To do that, we detach
698 * the component's change detector and perform an explicit local check every five seconds.
699 *
700 * <code-example path="core/ts/change_detect/change-detection.ts" region="detach"></code-example>
701 *
702 *
703 * ### Reattaching a detached component
704 *
705 * The following example creates a component displaying live data.
706 * The component detaches its change detector from the main change detector tree
707 * when the `live` property is set to false, and reattaches it when the property
708 * becomes true.
709 *
710 * <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example>
711 *
712 * @publicApi
713 */
714export declare abstract class ChangeDetectorRef {
715 /**
716 * When a view uses the {@link ChangeDetectionStrategy#OnPush OnPush} (checkOnce)
717 * change detection strategy, explicitly marks the view as changed so that
718 * it can be checked again.
719 *
720 * Components are normally marked as dirty (in need of rerendering) when inputs
721 * have changed or events have fired in the view. Call this method to ensure that
722 * a component is checked even if these triggers have not occured.
723 *
724 * <!-- TODO: Add a link to a chapter on OnPush components -->
725 *
726 */
727 abstract markForCheck(): void;
728 /**
729 * Detaches this view from the change-detection tree.
730 * A detached view is not checked until it is reattached.
731 * Use in combination with `detectChanges()` to implement local change detection checks.
732 *
733 * Detached views are not checked during change detection runs until they are
734 * re-attached, even if they are marked as dirty.
735 *
736 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
737 * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
738 *
739 */
740 abstract detach(): void;
741 /**
742 * Checks this view and its children. Use in combination with {@link ChangeDetectorRef#detach
743 * detach}
744 * to implement local change detection checks.
745 *
746 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
747 * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
748 *
749 */
750 abstract detectChanges(): void;
751 /**
752 * Checks the change detector and its children, and throws if any changes are detected.
753 *
754 * Use in development mode to verify that running change detection doesn't introduce
755 * other changes. Calling it in production mode is a noop.
756 */
757 abstract checkNoChanges(): void;
758 /**
759 * Re-attaches the previously detached view to the change detection tree.
760 * Views are attached to the tree by default.
761 *
762 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
763 *
764 */
765 abstract reattach(): void;
766}
767
768declare const CHILD_HEAD = 13;
769
770declare const CHILD_TAIL = 14;
771
772/**
773 * Configures the `Injector` to return an instance of `useClass` for a token.
774 * @see ["Dependency Injection Guide"](guide/dependency-injection).
775 *
776 * @usageNotes
777 *
778 * {@example core/di/ts/provider_spec.ts region='ClassProvider'}
779 *
780 * Note that following two providers are not equal:
781 *
782 * {@example core/di/ts/provider_spec.ts region='ClassProviderDifference'}
783 *
784 * ### Multi-value example
785 *
786 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
787 *
788 * @publicApi
789 */
790export declare interface ClassProvider extends ClassSansProvider {
791 /**
792 * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
793 */
794 provide: any;
795 /**
796 * When true, injector returns an array of instances. This is useful to allow multiple
797 * providers spread across many files to provide configuration information to a common token.
798 */
799 multi?: boolean;
800}
801
802/**
803 * Configures the `Injector` to return a value by invoking a `useClass` function.
804 * Base for `ClassProvider` decorator.
805 *
806 * @see ["Dependency Injection Guide"](guide/dependency-injection).
807 *
808 * @publicApi
809 */
810export declare interface ClassSansProvider {
811 /**
812 * Class to instantiate for the `token`.
813 */
814 useClass: Type<any>;
815}
816
817declare const CLEANUP = 7;
818
819/**
820 * Low-level service for running the angular compiler during runtime
821 * to create {@link ComponentFactory}s, which
822 * can later be used to create and render a Component instance.
823 *
824 * Each `@NgModule` provides an own `Compiler` to its injector,
825 * that will use the directives/pipes of the ng module for compilation
826 * of components.
827 *
828 * @publicApi
829 *
830 * @deprecated
831 * Ivy JIT mode doesn't require accessing this symbol.
832 * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for
833 * additional context.
834 */
835export declare class Compiler {
836 /**
837 * Compiles the given NgModule and all of its components. All templates of the components listed
838 * in `entryComponents` have to be inlined.
839 */
840 compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T>;
841 /**
842 * Compiles the given NgModule and all of its components
843 */
844 compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>>;
845 /**
846 * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
847 */
848 compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T>;
849 /**
850 * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
851 */
852 compileModuleAndAllComponentsAsync<T>(moduleType: Type<T>): Promise<ModuleWithComponentFactories<T>>;
853 /**
854 * Clears all caches.
855 */
856 clearCache(): void;
857 /**
858 * Clears the cache for the given component/ngModule.
859 */
860 clearCacheFor(type: Type<any>): void;
861 /**
862 * Returns the id for a given NgModule, if one is defined and known to the compiler.
863 */
864 getModuleId(moduleType: Type<any>): string | undefined;
865 static ɵfac: i0.ɵɵFactoryDeclaration<Compiler, never>;
866 static ɵprov: i0.ɵɵInjectableDeclaration<Compiler>;
867}
868
869/**
870 * Token to provide CompilerOptions in the platform injector.
871 *
872 * @publicApi
873 */
874export declare const COMPILER_OPTIONS: InjectionToken<CompilerOptions[]>;
875
876/**
877 * A factory for creating a Compiler
878 *
879 * @publicApi
880 *
881 * @deprecated
882 * Ivy JIT mode doesn't require accessing this symbol.
883 * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for
884 * additional context.
885 */
886export declare abstract class CompilerFactory {
887 abstract createCompiler(options?: CompilerOptions[]): Compiler;
888}
889
890/**
891 * Options for creating a compiler.
892 *
893 * Note: the `useJit` and `missingTranslation` config options are not used in Ivy, passing them has
894 * no effect. Those config options are deprecated since v13.
895 *
896 * @publicApi
897 */
898export declare type CompilerOptions = {
899 /**
900 * @deprecated not used at all in Ivy, providing this config option has no effect.
901 */
902 useJit?: boolean;
903 defaultEncapsulation?: ViewEncapsulation;
904 providers?: StaticProvider[];
905 /**
906 * @deprecated not used at all in Ivy, providing this config option has no effect.
907 */
908 missingTranslation?: MissingTranslationStrategy;
909 preserveWhitespaces?: boolean;
910};
911
912/**
913 * Supplies configuration metadata for an Angular component.
914 *
915 * @publicApi
916 */
917export declare interface Component extends Directive {
918 /**
919 * The change-detection strategy to use for this component.
920 *
921 * When a component is instantiated, Angular creates a change detector,
922 * which is responsible for propagating the component's bindings.
923 * The strategy is one of:
924 * - `ChangeDetectionStrategy#OnPush` sets the strategy to `CheckOnce` (on demand).
925 * - `ChangeDetectionStrategy#Default` sets the strategy to `CheckAlways`.
926 */
927 changeDetection?: ChangeDetectionStrategy;
928 /**
929 * Defines the set of injectable objects that are visible to its view DOM children.
930 * See [example](#injecting-a-class-with-a-view-provider).
931 *
932 */
933 viewProviders?: Provider[];
934 /**
935 * The module ID of the module that contains the component.
936 * The component must be able to resolve relative URLs for templates and styles.
937 * SystemJS exposes the `__moduleName` variable within each module.
938 * In CommonJS, this can be set to `module.id`.
939 *
940 */
941 moduleId?: string;
942 /**
943 * The relative path or absolute URL of a template file for an Angular component.
944 * If provided, do not supply an inline template using `template`.
945 *
946 */
947 templateUrl?: string;
948 /**
949 * An inline template for an Angular component. If provided,
950 * do not supply a template file using `templateUrl`.
951 *
952 */
953 template?: string;
954 /**
955 * One or more relative paths or absolute URLs for files containing CSS stylesheets to use
956 * in this component.
957 */
958 styleUrls?: string[];
959 /**
960 * One or more inline CSS stylesheets to use
961 * in this component.
962 */
963 styles?: string[];
964 /**
965 * One or more animation `trigger()` calls, containing
966 * [`state()`](api/animations/state) and `transition()` definitions.
967 * See the [Animations guide](/guide/animations) and animations API documentation.
968 *
969 */
970 animations?: any[];
971 /**
972 * An encapsulation policy for the component's styling.
973 * Possible values:
974 * - `ViewEncapsulation.Emulated`: Apply modified component styles in order to emulate
975 * a native Shadow DOM CSS encapsulation behavior.
976 * - `ViewEncapsulation.None`: Apply component styles globally without any sort of encapsulation.
977 * - `ViewEncapsulation.ShadowDom`: Use the browser's native Shadow DOM API to encapsulate styles.
978 *
979 * If not supplied, the value is taken from the `CompilerOptions`
980 * which defaults to `ViewEncapsulation.Emulated`.
981 *
982 * If the policy is `ViewEncapsulation.Emulated` and the component has no
983 * {@link Component#styles styles} nor {@link Component#styleUrls styleUrls},
984 * the policy is automatically switched to `ViewEncapsulation.None`.
985 */
986 encapsulation?: ViewEncapsulation;
987 /**
988 * Overrides the default interpolation start and end delimiters (`{{` and `}}`).
989 */
990 interpolation?: [string, string];
991 /**
992 * A set of components that should be compiled along with
993 * this component. For each component listed here,
994 * Angular creates a {@link ComponentFactory} and stores it in the
995 * {@link ComponentFactoryResolver}.
996 * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.
997 */
998 entryComponents?: Array<Type<any> | any[]>;
999 /**
1000 * True to preserve or false to remove potentially superfluous whitespace characters
1001 * from the compiled template. Whitespace characters are those matching the `\s`
1002 * character class in JavaScript regular expressions. Default is false, unless
1003 * overridden in compiler options.
1004 */
1005 preserveWhitespaces?: boolean;
1006}
1007
1008/**
1009 * Component decorator and metadata.
1010 *
1011 * @Annotation
1012 * @publicApi
1013 */
1014export declare const Component: ComponentDecorator;
1015
1016/**
1017 * Component decorator interface
1018 *
1019 * @publicApi
1020 */
1021export declare interface ComponentDecorator {
1022 /**
1023 * Decorator that marks a class as an Angular component and provides configuration
1024 * metadata that determines how the component should be processed,
1025 * instantiated, and used at runtime.
1026 *
1027 * Components are the most basic UI building block of an Angular app.
1028 * An Angular app contains a tree of Angular components.
1029 *
1030 * Angular components are a subset of directives, always associated with a template.
1031 * Unlike other directives, only one component can be instantiated for a given element in a
1032 * template.
1033 *
1034 * A component must belong to an NgModule in order for it to be available
1035 * to another component or application. To make it a member of an NgModule,
1036 * list it in the `declarations` field of the `NgModule` metadata.
1037 *
1038 * Note that, in addition to these options for configuring a directive,
1039 * you can control a component's runtime behavior by implementing
1040 * life-cycle hooks. For more information, see the
1041 * [Lifecycle Hooks](guide/lifecycle-hooks) guide.
1042 *
1043 * @usageNotes
1044 *
1045 * ### Setting component inputs
1046 *
1047 * The following example creates a component with two data-bound properties,
1048 * specified by the `inputs` value.
1049 *
1050 * <code-example path="core/ts/metadata/directives.ts" region="component-input"></code-example>
1051 *
1052 *
1053 * ### Setting component outputs
1054 *
1055 * The following example shows two event emitters that emit on an interval. One
1056 * emits an output every second, while the other emits every five seconds.
1057 *
1058 * {@example core/ts/metadata/directives.ts region='component-output-interval'}
1059 *
1060 * ### Injecting a class with a view provider
1061 *
1062 * The following simple example injects a class into a component
1063 * using the view provider specified in component metadata:
1064 *
1065 * ```ts
1066 * class Greeter {
1067 * greet(name:string) {
1068 * return 'Hello ' + name + '!';
1069 * }
1070 * }
1071 *
1072 * @Directive({
1073 * selector: 'needs-greeter'
1074 * })
1075 * class NeedsGreeter {
1076 * greeter:Greeter;
1077 *
1078 * constructor(greeter:Greeter) {
1079 * this.greeter = greeter;
1080 * }
1081 * }
1082 *
1083 * @Component({
1084 * selector: 'greet',
1085 * viewProviders: [
1086 * Greeter
1087 * ],
1088 * template: `<needs-greeter></needs-greeter>`
1089 * })
1090 * class HelloWorld {
1091 * }
1092 *
1093 * ```
1094 *
1095 * ### Preserving whitespace
1096 *
1097 * Removing whitespace can greatly reduce AOT-generated code size and speed up view creation.
1098 * As of Angular 6, the default for `preserveWhitespaces` is false (whitespace is removed).
1099 * To change the default setting for all components in your application, set
1100 * the `preserveWhitespaces` option of the AOT compiler.
1101 *
1102 * By default, the AOT compiler removes whitespace characters as follows:
1103 * * Trims all whitespaces at the beginning and the end of a template.
1104 * * Removes whitespace-only text nodes. For example,
1105 *
1106 * ```html
1107 * <button>Action 1</button> <button>Action 2</button>
1108 * ```
1109 *
1110 * becomes:
1111 *
1112 * ```html
1113 * <button>Action 1</button><button>Action 2</button>
1114 * ```
1115 *
1116 * * Replaces a series of whitespace characters in text nodes with a single space.
1117 * For example, `<span>\n some text\n</span>` becomes `<span> some text </span>`.
1118 * * Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,
1119 * where whitespace characters are significant.
1120 *
1121 * Note that these transformations can influence DOM nodes layout, although impact
1122 * should be minimal.
1123 *
1124 * You can override the default behavior to preserve whitespace characters
1125 * in certain fragments of a template. For example, you can exclude an entire
1126 * DOM sub-tree by using the `ngPreserveWhitespaces` attribute:
1127 *
1128 * ```html
1129 * <div ngPreserveWhitespaces>
1130 * whitespaces are preserved here
1131 * <span> and here </span>
1132 * </div>
1133 * ```
1134 *
1135 * You can force a single space to be preserved in a text node by using `&ngsp;`,
1136 * which is replaced with a space character by Angular's template
1137 * compiler:
1138 *
1139 * ```html
1140 * <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>
1141 * <!-- compiled to be equivalent to:
1142 * <a>Spaces</a> <a>between</a> <a>links.</a> -->
1143 * ```
1144 *
1145 * Note that sequences of `&ngsp;` are still collapsed to just one space character when
1146 * the `preserveWhitespaces` option is set to `false`.
1147 *
1148 * ```html
1149 * <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>
1150 * <!-- compiled to be equivalent to:
1151 * <a>before</a> <a>after</a> -->
1152 * ```
1153 *
1154 * To preserve sequences of whitespace characters, use the
1155 * `ngPreserveWhitespaces` attribute.
1156 *
1157 * @Annotation
1158 */
1159 (obj: Component): TypeDecorator;
1160 /**
1161 * See the `Component` decorator.
1162 */
1163 new (obj: Component): Component;
1164}
1165
1166declare interface ComponentDefFeature {
1167 <T>(componentDef: ɵComponentDef<T>): void;
1168 /**
1169 * Marks a feature as something that {@link InheritDefinitionFeature} will execute
1170 * during inheritance.
1171 *
1172 * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers
1173 * identifying the change as a side effect, and the feature will be included in
1174 * every bundle.
1175 */
1176 ngInherit?: true;
1177}
1178
1179/**
1180 * Base class for a factory that can create a component dynamically.
1181 * Instantiate a factory for a given type of component with `resolveComponentFactory()`.
1182 * Use the resulting `ComponentFactory.create()` method to create a component of that type.
1183 *
1184 * @see [Dynamic Components](guide/dynamic-component-loader)
1185 *
1186 * @publicApi
1187 *
1188 * @deprecated Angular no longer requires Component factories. Please use other APIs where
1189 * Component class can be used directly.
1190 */
1191declare abstract class ComponentFactory<C> {
1192 /**
1193 * The component's HTML selector.
1194 */
1195 abstract get selector(): string;
1196 /**
1197 * The type of component the factory will create.
1198 */
1199 abstract get componentType(): Type<any>;
1200 /**
1201 * Selector for all <ng-content> elements in the component.
1202 */
1203 abstract get ngContentSelectors(): string[];
1204 /**
1205 * The inputs of the component.
1206 */
1207 abstract get inputs(): {
1208 propName: string;
1209 templateName: string;
1210 }[];
1211 /**
1212 * The outputs of the component.
1213 */
1214 abstract get outputs(): {
1215 propName: string;
1216 templateName: string;
1217 }[];
1218 /**
1219 * Creates a new component.
1220 */
1221 abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef<any>): ComponentRef<C>;
1222}
1223export { ComponentFactory }
1224export { ComponentFactory as ɵComponentFactory }
1225
1226/**
1227 * A simple registry that maps `Components` to generated `ComponentFactory` classes
1228 * that can be used to create instances of components.
1229 * Use to obtain the factory for a given component type,
1230 * then use the factory's `create()` method to create a component of that type.
1231 *
1232 * Note: since v13, dynamic component creation via
1233 * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)
1234 * does **not** require resolving component factory: component class can be used directly.
1235 *
1236 * @publicApi
1237 *
1238 * @deprecated Angular no longer requires Component factories. Please use other APIs where
1239 * Component class can be used directly.
1240 */
1241export declare abstract class ComponentFactoryResolver {
1242 static NULL: ComponentFactoryResolver;
1243 /**
1244 * Retrieves the factory object that creates a component of the given type.
1245 * @param component The component type.
1246 */
1247 abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
1248}
1249
1250declare class ComponentFactoryResolver_2 extends ComponentFactoryResolver {
1251 private ngModule?;
1252 /**
1253 * @param ngModule The NgModuleRef to which all resolved factories are bound.
1254 */
1255 constructor(ngModule?: NgModuleRef<any> | undefined);
1256 resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
1257}
1258
1259declare type ComponentInstance = {};
1260
1261/**
1262 * Represents a component created by a `ComponentFactory`.
1263 * Provides access to the component instance and related objects,
1264 * and provides the means of destroying the instance.
1265 *
1266 * @publicApi
1267 */
1268export declare abstract class ComponentRef<C> {
1269 /**
1270 * The host or anchor [element](guide/glossary#element) for this component instance.
1271 */
1272 abstract get location(): ElementRef;
1273 /**
1274 * The [dependency injector](guide/glossary#injector) for this component instance.
1275 */
1276 abstract get injector(): Injector;
1277 /**
1278 * This component instance.
1279 */
1280 abstract get instance(): C;
1281 /**
1282 * The [host view](guide/glossary#view-tree) defined by the template
1283 * for this component instance.
1284 */
1285 abstract get hostView(): ViewRef;
1286 /**
1287 * The change detector for this component instance.
1288 */
1289 abstract get changeDetectorRef(): ChangeDetectorRef;
1290 /**
1291 * The type of this component (as created by a `ComponentFactory` class).
1292 */
1293 abstract get componentType(): Type<any>;
1294 /**
1295 * Destroys the component instance and all of the data structures associated with it.
1296 */
1297 abstract destroy(): void;
1298 /**
1299 * A lifecycle hook that provides additional developer-defined cleanup
1300 * functionality for the component.
1301 * @param callback A handler function that cleans up developer-defined data
1302 * associated with this component. Called when the `destroy()` method is invoked.
1303 */
1304 abstract onDestroy(callback: Function): void;
1305}
1306
1307/**
1308 * Definition of what a template rendering function should look like for a component.
1309 */
1310declare type ComponentTemplate<T> = {
1311 <U extends T>(rf: ɵRenderFlags, ctx: T | U): void;
1312};
1313
1314/**
1315 * Configures the `Injector` to return an instance of a token.
1316 *
1317 * @see ["Dependency Injection Guide"](guide/dependency-injection).
1318 *
1319 * @usageNotes
1320 *
1321 * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
1322 *
1323 * ### Multi-value example
1324 *
1325 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
1326 *
1327 * @publicApi
1328 */
1329export declare interface ConstructorProvider extends ConstructorSansProvider {
1330 /**
1331 * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
1332 */
1333 provide: Type<any>;
1334 /**
1335 * When true, injector returns an array of instances. This is useful to allow multiple
1336 * providers spread across many files to provide configuration information to a common token.
1337 */
1338 multi?: boolean;
1339}
1340
1341/**
1342 * Configures the `Injector` to return an instance of a token.
1343 *
1344 * @see ["Dependency Injection Guide"](guide/dependency-injection).
1345 *
1346 * @usageNotes
1347 *
1348 * ```ts
1349 * @Injectable(SomeModule, {deps: []})
1350 * class MyService {}
1351 * ```
1352 *
1353 * @publicApi
1354 */
1355export declare interface ConstructorSansProvider {
1356 /**
1357 * A list of `token`s to be resolved by the injector.
1358 */
1359 deps?: any[];
1360}
1361
1362/**
1363 * Type of the ContentChild metadata.
1364 *
1365 * @publicApi
1366 */
1367export declare type ContentChild = Query;
1368
1369/**
1370 * ContentChild decorator and metadata.
1371 *
1372 *
1373 * @Annotation
1374 *
1375 * @publicApi
1376 */
1377export declare const ContentChild: ContentChildDecorator;
1378
1379/**
1380 * Type of the ContentChild decorator / constructor function.
1381 *
1382 * @publicApi
1383 */
1384export declare interface ContentChildDecorator {
1385 /**
1386 * @description
1387 * Property decorator that configures a content query.
1388 *
1389 * Use to get the first element or the directive matching the selector from the content DOM.
1390 * If the content DOM changes, and a new child matches the selector,
1391 * the property will be updated.
1392 *
1393 * Content queries are set before the `ngAfterContentInit` callback is called.
1394 *
1395 * Does not retrieve elements or directives that are in other components' templates,
1396 * since a component's template is always a black box to its ancestors.
1397 *
1398 * **Metadata Properties**:
1399 *
1400 * * **selector** - The directive type or the name used for querying.
1401 * * **read** - Used to read a different token from the queried element.
1402 * * **static** - True to resolve query results before change detection runs,
1403 * false to resolve after change detection. Defaults to false.
1404 *
1405 * The following selectors are supported.
1406 * * Any class with the `@Component` or `@Directive` decorator
1407 * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
1408 * with `@ContentChild('cmp')`)
1409 * * Any provider defined in the child component tree of the current component (e.g.
1410 * `@ContentChild(SomeService) someService: SomeService`)
1411 * * Any provider defined through a string token (e.g. `@ContentChild('someToken') someTokenVal:
1412 * any`)
1413 * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ContentChild(TemplateRef)
1414 * template;`)
1415 *
1416 * The following values are supported by `read`:
1417 * * Any class with the `@Component` or `@Directive` decorator
1418 * * Any provider defined on the injector of the component that is matched by the `selector` of
1419 * this query
1420 * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
1421 * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
1422 *
1423 * @usageNotes
1424 *
1425 * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'}
1426 *
1427 * ### Example
1428 *
1429 * {@example core/di/ts/contentChild/content_child_example.ts region='Component'}
1430 *
1431 * @Annotation
1432 */
1433 (selector: ProviderToken<unknown> | Function | string, opts?: {
1434 read?: any;
1435 static?: boolean;
1436 }): any;
1437 new (selector: ProviderToken<unknown> | Function | string, opts?: {
1438 read?: any;
1439 static?: boolean;
1440 }): ContentChild;
1441}
1442
1443/**
1444 * Type of the ContentChildren metadata.
1445 *
1446 *
1447 * @Annotation
1448 * @publicApi
1449 */
1450export declare type ContentChildren = Query;
1451
1452/**
1453 * ContentChildren decorator and metadata.
1454 *
1455 *
1456 * @Annotation
1457 * @publicApi
1458 */
1459export declare const ContentChildren: ContentChildrenDecorator;
1460
1461/**
1462 * Type of the ContentChildren decorator / constructor function.
1463 *
1464 * @see `ContentChildren`.
1465 * @publicApi
1466 */
1467export declare interface ContentChildrenDecorator {
1468 /**
1469 * @description
1470 * Property decorator that configures a content query.
1471 *
1472 * Use to get the `QueryList` of elements or directives from the content DOM.
1473 * Any time a child element is added, removed, or moved, the query list will be
1474 * updated, and the changes observable of the query list will emit a new value.
1475 *
1476 * Content queries are set before the `ngAfterContentInit` callback is called.
1477 *
1478 * Does not retrieve elements or directives that are in other components' templates,
1479 * since a component's template is always a black box to its ancestors.
1480 *
1481 * **Metadata Properties**:
1482 *
1483 * * **selector** - The directive type or the name used for querying.
1484 * * **descendants** - If `true` include all descendants of the element. If `false` then only
1485 * query direct children of the element.
1486 * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only
1487 * if the QueryList result has changed. When `false` the `changes` observable might emit even
1488 * if the QueryList has not changed.
1489 * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and
1490 * removed in future versions of Angular.
1491 * * **read** - Used to read a different token from the queried elements.
1492 *
1493 * The following selectors are supported.
1494 * * Any class with the `@Component` or `@Directive` decorator
1495 * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
1496 * with `@ContentChildren('cmp')`)
1497 * * Any provider defined in the child component tree of the current component (e.g.
1498 * `@ContentChildren(SomeService) someService: SomeService`)
1499 * * Any provider defined through a string token (e.g. `@ContentChildren('someToken')
1500 * someTokenVal: any`)
1501 * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with
1502 * `@ContentChildren(TemplateRef) template;`)
1503 *
1504 * In addition, multiple string selectors can be separated with a comma (e.g.
1505 * `@ContentChildren('cmp1,cmp2')`)
1506 *
1507 * The following values are supported by `read`:
1508 * * Any class with the `@Component` or `@Directive` decorator
1509 * * Any provider defined on the injector of the component that is matched by the `selector` of
1510 * this query
1511 * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
1512 * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
1513 *
1514 * @usageNotes
1515 *
1516 * Here is a simple demonstration of how the `ContentChildren` decorator can be used.
1517 *
1518 * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'}
1519 *
1520 * ### Tab-pane example
1521 *
1522 * Here is a slightly more realistic example that shows how `ContentChildren` decorators
1523 * can be used to implement a tab pane component.
1524 *
1525 * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'}
1526 *
1527 * @Annotation
1528 */
1529 (selector: ProviderToken<unknown> | Function | string, opts?: {
1530 descendants?: boolean;
1531 emitDistinctChangesOnly?: boolean;
1532 read?: any;
1533 }): any;
1534 new (selector: ProviderToken<unknown> | Function | string, opts?: {
1535 descendants?: boolean;
1536 emitDistinctChangesOnly?: boolean;
1537 read?: any;
1538 }): Query;
1539}
1540
1541/**
1542 * Definition of what a content queries function should look like.
1543 */
1544declare type ContentQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U, directiveIndex: number) => void;
1545
1546declare const CONTEXT = 8;
1547
1548/** Options that control how the component should be bootstrapped. */
1549declare interface CreateComponentOptions {
1550 /** Which renderer factory to use. */
1551 rendererFactory?: RendererFactory3;
1552 /** A custom sanitizer instance */
1553 sanitizer?: Sanitizer;
1554 /** A custom animation player handler */
1555 playerHandler?: ɵPlayerHandler;
1556 /**
1557 * Host element on which the component will be bootstrapped. If not specified,
1558 * the component definition's `tag` is used to query the existing DOM for the
1559 * element to bootstrap.
1560 */
1561 host?: RElement | string;
1562 /** Module injector for the component. If unspecified, the injector will be NULL_INJECTOR. */
1563 injector?: Injector;
1564 /**
1565 * List of features to be applied to the created component. Features are simply
1566 * functions that decorate a component with a certain behavior.
1567 *
1568 * Typically, the features in this list are features that cannot be added to the
1569 * other features list in the component definition because they rely on other factors.
1570 *
1571 * Example: `LifecycleHooksFeature` is a function that adds lifecycle hook capabilities
1572 * to root components in a tree-shakable way. It cannot be added to the component
1573 * features list because there's no way of knowing when the component will be used as
1574 * a root component.
1575 */
1576 hostFeatures?: HostFeature[];
1577 /**
1578 * A function which is used to schedule change detection work in the future.
1579 *
1580 * When marking components as dirty, it is necessary to schedule the work of
1581 * change detection in the future. This is done to coalesce multiple
1582 * {@link markDirty} calls into a single changed detection processing.
1583 *
1584 * The default value of the scheduler is the `requestAnimationFrame` function.
1585 *
1586 * It is also useful to override this function for testing purposes.
1587 */
1588 scheduler?: (work: () => void) => void;
1589}
1590
1591/**
1592 * Returns a new NgModuleRef instance based on the NgModule class and parent injector provided.
1593 * @param ngModule NgModule class.
1594 * @param parentInjector Optional injector instance to use as a parent for the module injector. If
1595 * not provided, `NullInjector` will be used instead.
1596 * @publicApi
1597 */
1598export declare function createNgModuleRef<T>(ngModule: Type<T>, parentInjector?: Injector): NgModuleRef<T>;
1599
1600/**
1601 * Creates a platform.
1602 * Platforms must be created on launch using this function.
1603 *
1604 * @publicApi
1605 */
1606export declare function createPlatform(injector: Injector): PlatformRef;
1607
1608/**
1609 * Creates a factory for a platform. Can be used to provide or override `Providers` specific to
1610 * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.
1611 * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories
1612 * to build up configurations that might be required by different libraries or parts of the
1613 * application.
1614 * @param name Identifies the new platform factory.
1615 * @param providers A set of dependency providers for platforms created with the new factory.
1616 *
1617 * @publicApi
1618 */
1619export declare function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef;
1620
1621
1622/**
1623 * Expresses a single CSS Selector.
1624 *
1625 * Beginning of array
1626 * - First index: element name
1627 * - Subsequent odd indices: attr keys
1628 * - Subsequent even indices: attr values
1629 *
1630 * After SelectorFlags.CLASS flag
1631 * - Class name values
1632 *
1633 * SelectorFlags.NOT flag
1634 * - Changes the mode to NOT
1635 * - Can be combined with other flags to set the element / attr / class mode
1636 *
1637 * e.g. SelectorFlags.NOT | SelectorFlags.ELEMENT
1638 *
1639 * Example:
1640 * Original: `div.foo.bar[attr1=val1][attr2]`
1641 * Parsed: ['div', 'attr1', 'val1', 'attr2', '', SelectorFlags.CLASS, 'foo', 'bar']
1642 *
1643 * Original: 'div[attr1]:not(.foo[attr2])
1644 * Parsed: [
1645 * 'div', 'attr1', '',
1646 * SelectorFlags.NOT | SelectorFlags.ATTRIBUTE 'attr2', '', SelectorFlags.CLASS, 'foo'
1647 * ]
1648 *
1649 * See more examples in node_selector_matcher_spec.ts
1650 */
1651declare type CssSelector = (string | SelectorFlags)[];
1652
1653/**
1654 * An object literal of this type is used to represent the metadata of a constructor dependency.
1655 * The type itself is never referred to from generated code.
1656 *
1657 * @publicApi
1658 */
1659declare type CtorDependency = {
1660 /**
1661 * If an `@Attribute` decorator is used, this represents the injected attribute's name. If the
1662 * attribute name is a dynamic expression instead of a string literal, this will be the unknown
1663 * type.
1664 */
1665 attribute?: string | unknown;
1666 /**
1667 * If `@Optional()` is used, this key is set to true.
1668 */
1669 optional?: true;
1670 /**
1671 * If `@Host` is used, this key is set to true.
1672 */
1673 host?: true;
1674 /**
1675 * If `@Self` is used, this key is set to true.
1676 */
1677 self?: true;
1678 /**
1679 * If `@SkipSelf` is used, this key is set to true.
1680 */
1681 skipSelf?: true;
1682} | null;
1683
1684/**
1685 * Defines a schema that allows an NgModule to contain the following:
1686 * - Non-Angular elements named with dash case (`-`).
1687 * - Element properties named with dash case (`-`).
1688 * Dash case is the naming convention for custom elements.
1689 *
1690 * @publicApi
1691 */
1692export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
1693
1694/**
1695 * @publicApi
1696 *
1697 * @see [Component testing scenarios](guide/testing-components-scenarios)
1698 * @see [Basics of testing components](guide/testing-components-basics)
1699 * @see [Testing utility APIs](guide/testing-utility-apis)
1700 */
1701export declare class DebugElement extends DebugNode {
1702 constructor(nativeNode: Element);
1703 /**
1704 * The underlying DOM element at the root of the component.
1705 */
1706 get nativeElement(): any;
1707 /**
1708 * The element tag name, if it is an element.
1709 */
1710 get name(): string;
1711 /**
1712 * Gets a map of property names to property values for an element.
1713 *
1714 * This map includes:
1715 * - Regular property bindings (e.g. `[id]="id"`)
1716 * - Host property bindings (e.g. `host: { '[id]': "id" }`)
1717 * - Interpolated property bindings (e.g. `id="{{ value }}")
1718 *
1719 * It does not include:
1720 * - input property bindings (e.g. `[myCustomInput]="value"`)
1721 * - attribute bindings (e.g. `[attr.role]="menu"`)
1722 */
1723 get properties(): {
1724 [key: string]: any;
1725 };
1726 /**
1727 * A map of attribute names to attribute values for an element.
1728 */
1729 get attributes(): {
1730 [key: string]: string | null;
1731 };
1732 /**
1733 * The inline styles of the DOM element.
1734 *
1735 * Will be `null` if there is no `style` property on the underlying DOM element.
1736 *
1737 * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)
1738 */
1739 get styles(): {
1740 [key: string]: string | null;
1741 };
1742 /**
1743 * A map containing the class names on the element as keys.
1744 *
1745 * This map is derived from the `className` property of the DOM element.
1746 *
1747 * Note: The values of this object will always be `true`. The class key will not appear in the KV
1748 * object if it does not exist on the element.
1749 *
1750 * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)
1751 */
1752 get classes(): {
1753 [key: string]: boolean;
1754 };
1755 /**
1756 * The `childNodes` of the DOM element as a `DebugNode` array.
1757 *
1758 * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
1759 */
1760 get childNodes(): DebugNode[];
1761 /**
1762 * The immediate `DebugElement` children. Walk the tree by descending through `children`.
1763 */
1764 get children(): DebugElement[];
1765 /**
1766 * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.
1767 */
1768 query(predicate: Predicate<DebugElement>): DebugElement;
1769 /**
1770 * @returns All `DebugElement` matches for the predicate at any depth in the subtree.
1771 */
1772 queryAll(predicate: Predicate<DebugElement>): DebugElement[];
1773 /**
1774 * @returns All `DebugNode` matches for the predicate at any depth in the subtree.
1775 */
1776 queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
1777 /**
1778 * Triggers the event by its name if there is a corresponding listener in the element's
1779 * `listeners` collection.
1780 *
1781 * If the event lacks a listener or there's some other problem, consider
1782 * calling `nativeElement.dispatchEvent(eventObject)`.
1783 *
1784 * @param eventName The name of the event to trigger
1785 * @param eventObj The _event object_ expected by the handler
1786 *
1787 * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)
1788 */
1789 triggerEventHandler(eventName: string, eventObj: any): void;
1790}
1791
1792/**
1793 * @publicApi
1794 */
1795export declare class DebugEventListener {
1796 name: string;
1797 callback: Function;
1798 constructor(name: string, callback: Function);
1799}
1800
1801/**
1802 * @publicApi
1803 */
1804export declare class DebugNode {
1805 /**
1806 * The underlying DOM node.
1807 */
1808 readonly nativeNode: any;
1809 constructor(nativeNode: Node);
1810 /**
1811 * The `DebugElement` parent. Will be `null` if this is the root element.
1812 */
1813 get parent(): DebugElement | null;
1814 /**
1815 * The host dependency injector. For example, the root element's component instance injector.
1816 */
1817 get injector(): Injector;
1818 /**
1819 * The element's own component instance, if it has one.
1820 */
1821 get componentInstance(): any;
1822 /**
1823 * An object that provides parent context for this element. Often an ancestor component instance
1824 * that governs this element.
1825 *
1826 * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`
1827 * property is the value of the row instance value. For example, the `hero` in `*ngFor="let hero
1828 * of heroes"`.
1829 */
1830 get context(): any;
1831 /**
1832 * The callbacks attached to the component's @Output properties and/or the element's event
1833 * properties.
1834 */
1835 get listeners(): DebugEventListener[];
1836 /**
1837 * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local
1838 * variable name.
1839 */
1840 get references(): {
1841 [key: string]: any;
1842 };
1843 /**
1844 * This component's injector lookup tokens. Includes the component itself plus the tokens that the
1845 * component lists in its providers metadata.
1846 */
1847 get providerTokens(): any[];
1848}
1849
1850/**
1851 * A logical node which comprise into `LView`s.
1852 *
1853 */
1854declare interface DebugNode_2 {
1855 /**
1856 * HTML representation of the node.
1857 */
1858 html: string | null;
1859 /**
1860 * Associated `TNode`
1861 */
1862 tNode: TNode;
1863 /**
1864 * Human readable node type.
1865 */
1866 type: string;
1867 /**
1868 * DOM native node.
1869 */
1870 native: Node;
1871 /**
1872 * Child nodes
1873 */
1874 children: DebugNode_2[];
1875 /**
1876 * A list of Component/Directive types which need to be instantiated an this location.
1877 */
1878 factories: Type<unknown>[];
1879 /**
1880 * A list of Component/Directive instances which were instantiated an this location.
1881 */
1882 instances: unknown[];
1883 /**
1884 * NodeInjector information.
1885 */
1886 injector: NodeInjectorDebug;
1887 /**
1888 * Injector resolution path.
1889 */
1890 injectorResolutionPath: any;
1891}
1892
1893declare const DECLARATION_COMPONENT_VIEW = 16;
1894
1895declare const DECLARATION_LCONTAINER = 17;
1896
1897declare const DECLARATION_VIEW = 15;
1898
1899/**
1900 * Provide this token to set the default currency code your application uses for
1901 * CurrencyPipe when there is no currency code passed into it. This is only used by
1902 * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.
1903 *
1904 * See the [i18n guide](guide/i18n-common-locale-id) for more information.
1905 *
1906 * <div class="alert is-helpful">
1907 *
1908 * **Deprecation notice:**
1909 *
1910 * The default currency code is currently always `USD` but this is deprecated from v9.
1911 *
1912 * **In v10 the default currency code will be taken from the current locale.**
1913 *
1914 * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in
1915 * your application `NgModule`:
1916 *
1917 * ```ts
1918 * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}
1919 * ```
1920 *
1921 * </div>
1922 *
1923 * @usageNotes
1924 * ### Example
1925 *
1926 * ```typescript
1927 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
1928 * import { AppModule } from './app/app.module';
1929 *
1930 * platformBrowserDynamic().bootstrapModule(AppModule, {
1931 * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]
1932 * });
1933 * ```
1934 *
1935 * @publicApi
1936 */
1937export declare const DEFAULT_CURRENCY_CODE: InjectionToken<string>;
1938
1939/**
1940 * @deprecated v4.0.0 - Should not be part of public API.
1941 * @publicApi
1942 */
1943export declare class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {
1944 readonly length: number;
1945 readonly collection: V[] | Iterable<V> | null;
1946 private _linkedRecords;
1947 private _unlinkedRecords;
1948 private _previousItHead;
1949 private _itHead;
1950 private _itTail;
1951 private _additionsHead;
1952 private _additionsTail;
1953 private _movesHead;
1954 private _movesTail;
1955 private _removalsHead;
1956 private _removalsTail;
1957 private _identityChangesHead;
1958 private _identityChangesTail;
1959 private _trackByFn;
1960 constructor(trackByFn?: TrackByFunction<V>);
1961 forEachItem(fn: (record: IterableChangeRecord_<V>) => void): void;
1962 forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
1963 forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void): void;
1964 forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
1965 forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
1966 forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
1967 forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void): void;
1968 diff(collection: NgIterable<V> | null | undefined): DefaultIterableDiffer<V> | null;
1969 onDestroy(): void;
1970 check(collection: NgIterable<V>): boolean;
1971 get isDirty(): boolean;
1972 private _addToRemovals;
1973}
1974
1975/**
1976 * @deprecated in v8, delete after v10. This API should be used only by generated code, and that
1977 * code should now use ɵɵdefineInjectable instead.
1978 * @publicApi
1979 */
1980export declare const defineInjectable: typeof ɵɵdefineInjectable;
1981
1982/**
1983 * Array of destroy hooks that should be executed for a view and their directive indices.
1984 *
1985 * The array is set up as a series of number/function or number/(number|function)[]:
1986 * - Even indices represent the context with which hooks should be called.
1987 * - Odd indices are the hook functions themselves. If a value at an odd index is an array,
1988 * it represents the destroy hooks of a `multi` provider where:
1989 * - Even indices represent the index of the provider for which we've registered a destroy hook,
1990 * inside of the `multi` provider array.
1991 * - Odd indices are the destroy hook functions.
1992 * For example:
1993 * LView: `[0, 1, 2, AService, 4, [BService, CService, DService]]`
1994 * destroyHooks: `[3, AService.ngOnDestroy, 5, [0, BService.ngOnDestroy, 2, DService.ngOnDestroy]]`
1995 *
1996 * In the example above `AService` is a type provider with an `ngOnDestroy`, whereas `BService`,
1997 * `CService` and `DService` are part of a `multi` provider where only `BService` and `DService`
1998 * have an `ngOnDestroy` hook.
1999 */
2000declare type DestroyHookData = (HookEntry | HookData)[];
2001
2002/**
2003 * Destroys the current Angular platform and all Angular applications on the page.
2004 * Destroys all modules and listeners registered with the platform.
2005 *
2006 * @publicApi
2007 */
2008export declare function destroyPlatform(): void;
2009
2010/**
2011 * Directive decorator and metadata.
2012 *
2013 * @Annotation
2014 * @publicApi
2015 */
2016export declare interface Directive {
2017 /**
2018 * The CSS selector that identifies this directive in a template
2019 * and triggers instantiation of the directive.
2020 *
2021 * Declare as one of the following:
2022 *
2023 * - `element-name`: Select by element name.
2024 * - `.class`: Select by class name.
2025 * - `[attribute]`: Select by attribute name.
2026 * - `[attribute=value]`: Select by attribute name and value.
2027 * - `:not(sub_selector)`: Select only if the element does not match the `sub_selector`.
2028 * - `selector1, selector2`: Select if either `selector1` or `selector2` matches.
2029 *
2030 * Angular only allows directives to apply on CSS selectors that do not cross
2031 * element boundaries.
2032 *
2033 * For the following template HTML, a directive with an `input[type=text]` selector,
2034 * would be instantiated only on the `<input type="text">` element.
2035 *
2036 * ```html
2037 * <form>
2038 * <input type="text">
2039 * <input type="radio">
2040 * <form>
2041 * ```
2042 *
2043 */
2044 selector?: string;
2045 /**
2046 * Enumerates the set of data-bound input properties for a directive
2047 *
2048 * Angular automatically updates input properties during change detection.
2049 * The `inputs` property defines a set of `directiveProperty` to `bindingProperty`
2050 * configuration:
2051 *
2052 * - `directiveProperty` specifies the component property where the value is written.
2053 * - `bindingProperty` specifies the DOM property where the value is read from.
2054 *
2055 * When `bindingProperty` is not provided, it is assumed to be equal to `directiveProperty`.
2056 *
2057 * @usageNotes
2058 *
2059 * The following example creates a component with two data-bound properties.
2060 *
2061 * ```typescript
2062 * @Component({
2063 * selector: 'bank-account',
2064 * inputs: ['bankName', 'id: account-id'],
2065 * template: `
2066 * Bank Name: {{bankName}}
2067 * Account Id: {{id}}
2068 * `
2069 * })
2070 * class BankAccount {
2071 * bankName: string;
2072 * id: string;
2073 * }
2074 * ```
2075 *
2076 */
2077 inputs?: string[];
2078 /**
2079 * Enumerates the set of event-bound output properties.
2080 *
2081 * When an output property emits an event, an event handler attached to that event
2082 * in the template is invoked.
2083 *
2084 * The `outputs` property defines a set of `directiveProperty` to `bindingProperty`
2085 * configuration:
2086 *
2087 * - `directiveProperty` specifies the component property that emits events.
2088 * - `bindingProperty` specifies the DOM property the event handler is attached to.
2089 *
2090 * @usageNotes
2091 *
2092 * ```typescript
2093 * @Component({
2094 * selector: 'child-dir',
2095 * outputs: [ 'bankNameChange' ]
2096 * template: `<input (input)="bankNameChange.emit($event.target.value)" />`
2097 * })
2098 * class ChildDir {
2099 * bankNameChange: EventEmitter<string> = new EventEmitter<string>();
2100 * }
2101 *
2102 * @Component({
2103 * selector: 'main',
2104 * template: `
2105 * {{ bankName }} <child-dir (bankNameChange)="onBankNameChange($event)"></child-dir>
2106 * `
2107 * })
2108 * class MainComponent {
2109 * bankName: string;
2110 *
2111 * onBankNameChange(bankName: string) {
2112 * this.bankName = bankName;
2113 * }
2114 * }
2115 * ```
2116 *
2117 */
2118 outputs?: string[];
2119 /**
2120 * Configures the [injector](guide/glossary#injector) of this
2121 * directive or component with a [token](guide/glossary#di-token)
2122 * that maps to a [provider](guide/glossary#provider) of a dependency.
2123 */
2124 providers?: Provider[];
2125 /**
2126 * Defines the name that can be used in the template to assign this directive to a variable.
2127 *
2128 * @usageNotes
2129 *
2130 * ```ts
2131 * @Directive({
2132 * selector: 'child-dir',
2133 * exportAs: 'child'
2134 * })
2135 * class ChildDir {
2136 * }
2137 *
2138 * @Component({
2139 * selector: 'main',
2140 * template: `<child-dir #c="child"></child-dir>`
2141 * })
2142 * class MainComponent {
2143 * }
2144 * ```
2145 *
2146 */
2147 exportAs?: string;
2148 /**
2149 * Configures the queries that will be injected into the directive.
2150 *
2151 * Content queries are set before the `ngAfterContentInit` callback is called.
2152 * View queries are set before the `ngAfterViewInit` callback is called.
2153 *
2154 * @usageNotes
2155 *
2156 * The following example shows how queries are defined
2157 * and when their results are available in lifecycle hooks:
2158 *
2159 * ```ts
2160 * @Component({
2161 * selector: 'someDir',
2162 * queries: {
2163 * contentChildren: new ContentChildren(ChildDirective),
2164 * viewChildren: new ViewChildren(ChildDirective)
2165 * },
2166 * template: '<child-directive></child-directive>'
2167 * })
2168 * class SomeDir {
2169 * contentChildren: QueryList<ChildDirective>,
2170 * viewChildren: QueryList<ChildDirective>
2171 *
2172 * ngAfterContentInit() {
2173 * // contentChildren is set
2174 * }
2175 *
2176 * ngAfterViewInit() {
2177 * // viewChildren is set
2178 * }
2179 * }
2180 * ```
2181 *
2182 * @Annotation
2183 */
2184 queries?: {
2185 [key: string]: any;
2186 };
2187 /**
2188 * Maps class properties to host element bindings for properties,
2189 * attributes, and events, using a set of key-value pairs.
2190 *
2191 * Angular automatically checks host property bindings during change detection.
2192 * If a binding changes, Angular updates the directive's host element.
2193 *
2194 * When the key is a property of the host element, the property value is
2195 * the propagated to the specified DOM property.
2196 *
2197 * When the key is a static attribute in the DOM, the attribute value
2198 * is propagated to the specified property in the host element.
2199 *
2200 * For event handling:
2201 * - The key is the DOM event that the directive listens to.
2202 * To listen to global events, add the target to the event name.
2203 * The target can be `window`, `document` or `body`.
2204 * - The value is the statement to execute when the event occurs. If the
2205 * statement evaluates to `false`, then `preventDefault` is applied on the DOM
2206 * event. A handler method can refer to the `$event` local variable.
2207 *
2208 */
2209 host?: {
2210 [key: string]: string;
2211 };
2212 /**
2213 * When present, this directive/component is ignored by the AOT compiler.
2214 * It remains in distributed code, and the JIT compiler attempts to compile it
2215 * at run time, in the browser.
2216 * To ensure the correct behavior, the app must import `@angular/compiler`.
2217 */
2218 jit?: true;
2219}
2220
2221/**
2222 * Type of the Directive metadata.
2223 *
2224 * @publicApi
2225 */
2226export declare const Directive: DirectiveDecorator;
2227
2228/**
2229 * Type of the Directive decorator / constructor function.
2230 * @publicApi
2231 */
2232export declare interface DirectiveDecorator {
2233 /**
2234 * Decorator that marks a class as an Angular directive.
2235 * You can define your own directives to attach custom behavior to elements in the DOM.
2236 *
2237 * The options provide configuration metadata that determines
2238 * how the directive should be processed, instantiated and used at
2239 * runtime.
2240 *
2241 * Directive classes, like component classes, can implement
2242 * [life-cycle hooks](guide/lifecycle-hooks) to influence their configuration and behavior.
2243 *
2244 *
2245 * @usageNotes
2246 * To define a directive, mark the class with the decorator and provide metadata.
2247 *
2248 * ```ts
2249 * import {Directive} from '@angular/core';
2250 *
2251 * @Directive({
2252 * selector: 'my-directive',
2253 * })
2254 * export class MyDirective {
2255 * ...
2256 * }
2257 * ```
2258 *
2259 * ### Declaring directives
2260 *
2261 * Directives are [declarables](guide/glossary#declarable).
2262 * They must be declared by an NgModule
2263 * in order to be usable in an app.
2264 *
2265 * A directive must belong to exactly one NgModule. Do not re-declare
2266 * a directive imported from another module.
2267 * List the directive class in the `declarations` field of an NgModule.
2268 *
2269 * ```ts
2270 * declarations: [
2271 * AppComponent,
2272 * MyDirective
2273 * ],
2274 * ```
2275 *
2276 * @Annotation
2277 */
2278 (obj?: Directive): TypeDecorator;
2279 /**
2280 * See the `Directive` decorator.
2281 */
2282 new (obj?: Directive): Directive;
2283}
2284
2285declare interface DirectiveDefFeature {
2286 <T>(directiveDef: ɵDirectiveDef<T>): void;
2287 /**
2288 * Marks a feature as something that {@link InheritDefinitionFeature} will execute
2289 * during inheritance.
2290 *
2291 * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers
2292 * identifying the change as a side effect, and the feature will be included in
2293 * every bundle.
2294 */
2295 ngInherit?: true;
2296}
2297
2298declare type DirectiveDefList = (ɵDirectiveDef<any> | ɵComponentDef<any>)[];
2299
2300/**
2301 * Type used for directiveDefs on component definition.
2302 *
2303 * The function is necessary to be able to support forward declarations.
2304 */
2305declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDefList;
2306
2307declare type DirectiveInstance = {};
2308
2309declare type DirectiveTypeList = (ɵDirectiveType<any> | ɵComponentType<any> | Type<any>)[];
2310
2311declare type DirectiveTypesOrFactory = (() => DirectiveTypeList) | DirectiveTypeList;
2312
2313/**
2314 * @description
2315 * Hook for manual bootstrapping of the application instead of using `bootstrap` array in @NgModule
2316 * annotation. This hook is invoked only when the `bootstrap` array is empty or not provided.
2317 *
2318 * Reference to the current application is provided as a parameter.
2319 *
2320 * See ["Bootstrapping"](guide/bootstrapping) and ["Entry components"](guide/entry-components).
2321 *
2322 * @usageNotes
2323 * The example below uses `ApplicationRef.bootstrap()` to render the
2324 * `AppComponent` on the page.
2325 *
2326 * ```typescript
2327 * class AppModule implements DoBootstrap {
2328 * ngDoBootstrap(appRef: ApplicationRef) {
2329 * appRef.bootstrap(AppComponent); // Or some other component
2330 * }
2331 * }
2332 * ```
2333 *
2334 * @publicApi
2335 */
2336export declare interface DoBootstrap {
2337 ngDoBootstrap(appRef: ApplicationRef): void;
2338}
2339
2340/**
2341 * A lifecycle hook that invokes a custom change-detection function for a directive,
2342 * in addition to the check performed by the default change-detector.
2343 *
2344 * The default change-detection algorithm looks for differences by comparing
2345 * bound-property values by reference across change detection runs. You can use this
2346 * hook to check for and respond to changes by some other means.
2347 *
2348 * When the default change detector detects changes, it invokes `ngOnChanges()` if supplied,
2349 * regardless of whether you perform additional change detection.
2350 * Typically, you should not use both `DoCheck` and `OnChanges` to respond to
2351 * changes on the same input.
2352 *
2353 * @see `OnChanges`
2354 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
2355 *
2356 * @usageNotes
2357 * The following snippet shows how a component can implement this interface
2358 * to invoke it own change-detection cycle.
2359 *
2360 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'}
2361 *
2362 * For a more complete example and discussion, see
2363 * [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection).
2364 *
2365 * @publicApi
2366 */
2367export declare interface DoCheck {
2368 /**
2369 * A callback method that performs change-detection, invoked
2370 * after the default change-detector runs.
2371 * See `KeyValueDiffers` and `IterableDiffers` for implementing
2372 * custom change checking for collections.
2373 *
2374 */
2375 ngDoCheck(): void;
2376}
2377
2378/**
2379 * Marks that the next string is an element name.
2380 *
2381 * See `I18nMutateOpCodes` documentation.
2382 */
2383declare const ELEMENT_MARKER: ELEMENT_MARKER;
2384
2385declare interface ELEMENT_MARKER {
2386 marker: 'element';
2387}
2388
2389/**
2390 * A wrapper around a native element inside of a View.
2391 *
2392 * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM
2393 * element.
2394 *
2395 * @security Permitting direct access to the DOM can make your application more vulnerable to
2396 * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the
2397 * [Security Guide](https://g.co/ng/security).
2398 *
2399 * @publicApi
2400 */
2401export declare class ElementRef<T = any> {
2402 /**
2403 * The underlying native element or `null` if direct access to native elements is not supported
2404 * (e.g. when the application runs in a web worker).
2405 *
2406 * <div class="callout is-critical">
2407 * <header>Use with caution</header>
2408 * <p>
2409 * Use this API as the last resort when direct access to DOM is needed. Use templating and
2410 * data-binding provided by Angular instead. Alternatively you can take a look at {@link
2411 * Renderer2}
2412 * which provides API that can safely be used even when direct access to native elements is not
2413 * supported.
2414 * </p>
2415 * <p>
2416 * Relying on direct DOM access creates tight coupling between your application and rendering
2417 * layers which will make it impossible to separate the two and deploy your application into a
2418 * web worker.
2419 * </p>
2420 * </div>
2421 *
2422 */
2423 nativeElement: T;
2424 constructor(nativeElement: T);
2425}
2426
2427/**
2428 * Represents an Angular [view](guide/glossary#view) in a view container.
2429 * An [embedded view](guide/glossary#view-tree) can be referenced from a component
2430 * other than the hosting component whose template defines it, or it can be defined
2431 * independently by a `TemplateRef`.
2432 *
2433 * Properties of elements in a view can change, but the structure (number and order) of elements in
2434 * a view cannot. Change the structure of elements by inserting, moving, or
2435 * removing nested views in a view container.
2436 *
2437 * @see `ViewContainerRef`
2438 *
2439 * @usageNotes
2440 *
2441 * The following template breaks down into two separate `TemplateRef` instances,
2442 * an outer one and an inner one.
2443 *
2444 * ```
2445 * Count: {{items.length}}
2446 * <ul>
2447 * <li *ngFor="let item of items">{{item}}</li>
2448 * </ul>
2449 * ```
2450 *
2451 * This is the outer `TemplateRef`:
2452 *
2453 * ```
2454 * Count: {{items.length}}
2455 * <ul>
2456 * <ng-template ngFor let-item [ngForOf]="items"></ng-template>
2457 * </ul>
2458 * ```
2459 *
2460 * This is the inner `TemplateRef`:
2461 *
2462 * ```
2463 * <li>{{item}}</li>
2464 * ```
2465 *
2466 * The outer and inner `TemplateRef` instances are assembled into views as follows:
2467 *
2468 * ```
2469 * <!-- ViewRef: outer-0 -->
2470 * Count: 2
2471 * <ul>
2472 * <ng-template view-container-ref></ng-template>
2473 * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->
2474 * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->
2475 * </ul>
2476 * <!-- /ViewRef: outer-0 -->
2477 * ```
2478 * @publicApi
2479 */
2480export declare abstract class EmbeddedViewRef<C> extends ViewRef {
2481 /**
2482 * The context for this view, inherited from the anchor element.
2483 */
2484 abstract context: C;
2485 /**
2486 * The root nodes for this embedded view.
2487 */
2488 abstract get rootNodes(): any[];
2489}
2490
2491/**
2492 * Disable Angular's development mode, which turns off assertions and other
2493 * checks within the framework.
2494 *
2495 * One important assertion this disables verifies that a change detection pass
2496 * does not result in additional changes to any bindings (also known as
2497 * unidirectional data flow).
2498 *
2499 * @publicApi
2500 */
2501export declare function enableProdMode(): void;
2502
2503
2504/**
2505 * Provides a hook for centralized exception handling.
2506 *
2507 * The default implementation of `ErrorHandler` prints error messages to the `console`. To
2508 * intercept error handling, write a custom exception handler that replaces this default as
2509 * appropriate for your app.
2510 *
2511 * @usageNotes
2512 * ### Example
2513 *
2514 * ```
2515 * class MyErrorHandler implements ErrorHandler {
2516 * handleError(error) {
2517 * // do something with the exception
2518 * }
2519 * }
2520 *
2521 * @NgModule({
2522 * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]
2523 * })
2524 * class MyModule {}
2525 * ```
2526 *
2527 * @publicApi
2528 */
2529export declare class ErrorHandler {
2530 handleError(error: any): void;
2531}
2532
2533/**
2534 * Use in components with the `@Output` directive to emit custom events
2535 * synchronously or asynchronously, and register handlers for those events
2536 * by subscribing to an instance.
2537 *
2538 * @usageNotes
2539 *
2540 * Extends
2541 * [RxJS `Subject`](https://rxjs.dev/api/index/class/Subject)
2542 * for Angular by adding the `emit()` method.
2543 *
2544 * In the following example, a component defines two output properties
2545 * that create event emitters. When the title is clicked, the emitter
2546 * emits an open or close event to toggle the current visibility state.
2547 *
2548 * ```html
2549 * @Component({
2550 * selector: 'zippy',
2551 * template: `
2552 * <div class="zippy">
2553 * <div (click)="toggle()">Toggle</div>
2554 * <div [hidden]="!visible">
2555 * <ng-content></ng-content>
2556 * </div>
2557 * </div>`})
2558 * export class Zippy {
2559 * visible: boolean = true;
2560 * @Output() open: EventEmitter<any> = new EventEmitter();
2561 * @Output() close: EventEmitter<any> = new EventEmitter();
2562 *
2563 * toggle() {
2564 * this.visible = !this.visible;
2565 * if (this.visible) {
2566 * this.open.emit(null);
2567 * } else {
2568 * this.close.emit(null);
2569 * }
2570 * }
2571 * }
2572 * ```
2573 *
2574 * Access the event object with the `$event` argument passed to the output event
2575 * handler:
2576 *
2577 * ```html
2578 * <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
2579 * ```
2580 *
2581 * @see [Observables in Angular](guide/observables-in-angular)
2582 * @publicApi
2583 */
2584export declare interface EventEmitter<T> extends Subject<T> {
2585 /**
2586 * Creates an instance of this class that can
2587 * deliver events synchronously or asynchronously.
2588 *
2589 * @param [isAsync=false] When true, deliver events asynchronously.
2590 *
2591 */
2592 new (isAsync?: boolean): EventEmitter<T>;
2593 /**
2594 * Emits an event containing a given value.
2595 * @param value The value to emit.
2596 */
2597 emit(value?: T): void;
2598 /**
2599 * Registers handlers for events emitted by this instance.
2600 * @param next When supplied, a custom handler for emitted events.
2601 * @param error When supplied, a custom handler for an error notification from this emitter.
2602 * @param complete When supplied, a custom handler for a completion notification from this
2603 * emitter.
2604 */
2605 subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Subscription;
2606 /**
2607 * Registers handlers for events emitted by this instance.
2608 * @param observerOrNext When supplied, a custom handler for emitted events, or an observer
2609 * object.
2610 * @param error When supplied, a custom handler for an error notification from this emitter.
2611 * @param complete When supplied, a custom handler for a completion notification from this
2612 * emitter.
2613 */
2614 subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription;
2615}
2616
2617/**
2618 * @publicApi
2619 */
2620export declare const EventEmitter: {
2621 new (isAsync?: boolean): EventEmitter<any>;
2622 new <T>(isAsync?: boolean): EventEmitter<T>;
2623 readonly prototype: EventEmitter<any>;
2624};
2625
2626/**
2627 * Configures the `Injector` to return a value of another `useExisting` token.
2628 *
2629 * @see ["Dependency Injection Guide"](guide/dependency-injection).
2630 *
2631 * @usageNotes
2632 *
2633 * {@example core/di/ts/provider_spec.ts region='ExistingProvider'}
2634 *
2635 * ### Multi-value example
2636 *
2637 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
2638 *
2639 * @publicApi
2640 */
2641export declare interface ExistingProvider extends ExistingSansProvider {
2642 /**
2643 * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
2644 */
2645 provide: any;
2646 /**
2647 * When true, injector returns an array of instances. This is useful to allow multiple
2648 * providers spread across many files to provide configuration information to a common token.
2649 */
2650 multi?: boolean;
2651}
2652
2653/**
2654 * Configures the `Injector` to return a value of another `useExisting` token.
2655 *
2656 * @see `ExistingProvider`
2657 * @see ["Dependency Injection Guide"](guide/dependency-injection).
2658 *
2659 * @publicApi
2660 */
2661export declare interface ExistingSansProvider {
2662 /**
2663 * Existing `token` to return. (Equivalent to `injector.get(useExisting)`)
2664 */
2665 useExisting: any;
2666}
2667
2668/**
2669 * Definition of what a factory function should look like.
2670 */
2671declare type FactoryFn<T> = {
2672 /**
2673 * Subclasses without an explicit constructor call through to the factory of their base
2674 * definition, providing it with their own constructor to instantiate.
2675 */
2676 <U extends T>(t?: Type<U>): U;
2677 /**
2678 * If no constructor to instantiate is provided, an instance of type T itself is created.
2679 */
2680 (t?: undefined): T;
2681};
2682
2683/**
2684 * Configures the `Injector` to return a value by invoking a `useFactory` function.
2685 * @see ["Dependency Injection Guide"](guide/dependency-injection).
2686 *
2687 * @usageNotes
2688 *
2689 * {@example core/di/ts/provider_spec.ts region='FactoryProvider'}
2690 *
2691 * Dependencies can also be marked as optional:
2692 *
2693 * {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps'}
2694 *
2695 * ### Multi-value example
2696 *
2697 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
2698 *
2699 * @publicApi
2700 */
2701export declare interface FactoryProvider extends FactorySansProvider {
2702 /**
2703 * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
2704 */
2705 provide: any;
2706 /**
2707 * When true, injector returns an array of instances. This is useful to allow multiple
2708 * providers spread across many files to provide configuration information to a common token.
2709 */
2710 multi?: boolean;
2711}
2712
2713/**
2714 * Configures the `Injector` to return a value by invoking a `useFactory` function.
2715 *
2716 * @see `FactoryProvider`
2717 * @see ["Dependency Injection Guide"](guide/dependency-injection).
2718 *
2719 * @publicApi
2720 */
2721export declare interface FactorySansProvider {
2722 /**
2723 * A function to invoke to create a value for this `token`. The function is invoked with
2724 * resolved values of `token`s in the `deps` field.
2725 */
2726 useFactory: Function;
2727 /**
2728 * A list of `token`s to be resolved by the injector. The list of values is then
2729 * used as arguments to the `useFactory` function.
2730 */
2731 deps?: any[];
2732}
2733
2734declare const FLAGS = 2;
2735
2736/**
2737 * Allows to refer to references which are not yet defined.
2738 *
2739 * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
2740 * DI is declared, but not yet defined. It is also used when the `token` which we use when creating
2741 * a query is not yet defined.
2742 *
2743 * @usageNotes
2744 * ### Example
2745 * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
2746 * @publicApi
2747 */
2748export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
2749
2750/**
2751 * An interface that a function passed into {@link forwardRef} has to implement.
2752 *
2753 * @usageNotes
2754 * ### Example
2755 *
2756 * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}
2757 * @publicApi
2758 */
2759export declare interface ForwardRefFn {
2760 (): any;
2761}
2762
2763/**
2764 * @publicApi
2765 */
2766declare function getDebugNode(nativeNode: any): DebugNode | null;
2767export { getDebugNode }
2768export { getDebugNode as ɵgetDebugNode }
2769
2770/**
2771 * Returns the NgModuleFactory with the given id (specified using [@NgModule.id
2772 * field](api/core/NgModule#id)), if it exists and has been loaded. Factories for NgModules that do
2773 * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.
2774 * @publicApi
2775 * @deprecated Use `getNgModuleById` instead.
2776 */
2777export declare function getModuleFactory(id: string): NgModuleFactory<any>;
2778
2779/**
2780 * Returns the NgModule class with the given id (specified using [@NgModule.id
2781 * field](api/core/NgModule#id)), if it exists and has been loaded. Classes for NgModules that do
2782 * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.
2783 * @publicApi
2784 */
2785export declare function getNgModuleById<T>(id: string): Type<T>;
2786
2787/**
2788 * Returns the current platform.
2789 *
2790 * @publicApi
2791 */
2792export declare function getPlatform(): PlatformRef | null;
2793
2794/**
2795 * Adapter interface for retrieving the `Testability` service associated for a
2796 * particular context.
2797 *
2798 * @publicApi
2799 */
2800export declare interface GetTestability {
2801 addToWindow(registry: TestabilityRegistry): void;
2802 findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
2803}
2804
2805declare type GlobalTargetName = 'document' | 'window' | 'body';
2806
2807declare type GlobalTargetResolver = (element: any) => EventTarget;
2808
2809/**
2810 * Flag to signify that this `LContainer` may have transplanted views which need to be change
2811 * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.
2812 *
2813 * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip
2814 * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify
2815 * that the `MOVED_VIEWS` are transplanted and on-push.
2816 */
2817declare const HAS_TRANSPLANTED_VIEWS = 2;
2818
2819/**
2820 * Array of hooks that should be executed for a view and their directive indices.
2821 *
2822 * For each node of the view, the following data is stored:
2823 * 1) Node index (optional)
2824 * 2) A series of number/function pairs where:
2825 * - even indices are directive indices
2826 * - odd indices are hook functions
2827 *
2828 * Special cases:
2829 * - a negative directive index flags an init hook (ngOnInit, ngAfterContentInit, ngAfterViewInit)
2830 */
2831declare type HookData = HookEntry[];
2832
2833/**
2834 * Information necessary to call a hook. E.g. the callback that
2835 * needs to invoked and the index at which to find its context.
2836 */
2837declare type HookEntry = number | HookFn;
2838
2839/** Single hook callback function. */
2840declare type HookFn = () => void;
2841
2842declare const HOST = 0;
2843
2844/**
2845 * Type of the Host metadata.
2846 *
2847 * @publicApi
2848 */
2849export declare interface Host {
2850}
2851
2852/**
2853 * Host decorator and metadata.
2854 *
2855 * @Annotation
2856 * @publicApi
2857 */
2858export declare const Host: HostDecorator;
2859
2860/**
2861 * Type of the HostBinding metadata.
2862 *
2863 * @publicApi
2864 */
2865export declare interface HostBinding {
2866 /**
2867 * The DOM property that is bound to a data property.
2868 */
2869 hostPropertyName?: string;
2870}
2871
2872/**
2873 * @Annotation
2874 * @publicApi
2875 */
2876export declare const HostBinding: HostBindingDecorator;
2877
2878/**
2879 * Type of the HostBinding decorator / constructor function.
2880 *
2881 * @publicApi
2882 */
2883export declare interface HostBindingDecorator {
2884 /**
2885 * Decorator that marks a DOM property as a host-binding property and supplies configuration
2886 * metadata.
2887 * Angular automatically checks host property bindings during change detection, and
2888 * if a binding changes it updates the host element of the directive.
2889 *
2890 * @usageNotes
2891 *
2892 * The following example creates a directive that sets the `valid` and `invalid`
2893 * properties on the DOM element that has an `ngModel` directive on it.
2894 *
2895 * ```typescript
2896 * @Directive({selector: '[ngModel]'})
2897 * class NgModelStatus {
2898 * constructor(public control: NgModel) {}
2899 * @HostBinding('class.valid') get valid() { return this.control.valid; }
2900 * @HostBinding('class.invalid') get invalid() { return this.control.invalid; }
2901 * }
2902 *
2903 * @Component({
2904 * selector: 'app',
2905 * template: `<input [(ngModel)]="prop">`,
2906 * })
2907 * class App {
2908 * prop;
2909 * }
2910 * ```
2911 *
2912 */
2913 (hostPropertyName?: string): any;
2914 new (hostPropertyName?: string): any;
2915}
2916
2917/**
2918 * Stores a set of OpCodes to process `HostBindingsFunction` associated with a current view.
2919 *
2920 * In order to invoke `HostBindingsFunction` we need:
2921 * 1. 'elementIdx`: Index to the element associated with the `HostBindingsFunction`.
2922 * 2. 'directiveIdx`: Index to the directive associated with the `HostBindingsFunction`. (This will
2923 * become the context for the `HostBindingsFunction` invocation.)
2924 * 3. `bindingRootIdx`: Location where the bindings for the `HostBindingsFunction` start. Internally
2925 * `HostBindingsFunction` binding indexes start from `0` so we need to add `bindingRootIdx` to
2926 * it.
2927 * 4. `HostBindingsFunction`: A host binding function to execute.
2928 *
2929 * The above information needs to be encoded into the `HostBindingOpCodes` in an efficient manner.
2930 *
2931 * 1. `elementIdx` is encoded into the `HostBindingOpCodes` as `~elementIdx` (so a negative number);
2932 * 2. `directiveIdx`
2933 * 3. `bindingRootIdx`
2934 * 4. `HostBindingsFunction` is passed in as is.
2935 *
2936 * The `HostBindingOpCodes` array contains:
2937 * - negative number to select the element index.
2938 * - followed by 1 or more of:
2939 * - a number to select the directive index
2940 * - a number to select the bindingRoot index
2941 * - and a function to invoke.
2942 *
2943 * ## Example
2944 *
2945 * ```
2946 * const hostBindingOpCodes = [
2947 * ~30, // Select element 30
2948 * 40, 45, MyDir.ɵdir.hostBindings // Invoke host bindings on MyDir on element 30;
2949 * // directiveIdx = 40; bindingRootIdx = 45;
2950 * 50, 55, OtherDir.ɵdir.hostBindings // Invoke host bindings on OtherDire on element 30
2951 * // directiveIdx = 50; bindingRootIdx = 55;
2952 * ]
2953 * ```
2954 *
2955 * ## Pseudocode
2956 * ```
2957 * const hostBindingOpCodes = tView.hostBindingOpCodes;
2958 * if (hostBindingOpCodes === null) return;
2959 * for (let i = 0; i < hostBindingOpCodes.length; i++) {
2960 * const opCode = hostBindingOpCodes[i] as number;
2961 * if (opCode < 0) {
2962 * // Negative numbers are element indexes.
2963 * setSelectedIndex(~opCode);
2964 * } else {
2965 * // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.
2966 * const directiveIdx = opCode;
2967 * const bindingRootIndx = hostBindingOpCodes[++i] as number;
2968 * const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;
2969 * setBindingRootForHostBindings(bindingRootIndx, directiveIdx);
2970 * const context = lView[directiveIdx];
2971 * hostBindingFn(RenderFlags.Update, context);
2972 * }
2973 * }
2974 * ```
2975 *
2976 */
2977declare interface HostBindingOpCodes extends Array<number | HostBindingsFunction<any>> {
2978 __brand__: 'HostBindingOpCodes';
2979 debug?: string[];
2980}
2981
2982declare type HostBindingsFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U) => void;
2983
2984/**
2985 * Type of the `Host` decorator / constructor function.
2986 *
2987 * @publicApi
2988 */
2989export declare interface HostDecorator {
2990 /**
2991 * Parameter decorator on a view-provider parameter of a class constructor
2992 * that tells the DI framework to resolve the view by checking injectors of child
2993 * elements, and stop when reaching the host element of the current component.
2994 *
2995 * @usageNotes
2996 *
2997 * The following shows use with the `@Optional` decorator, and allows for a `null` result.
2998 *
2999 * <code-example path="core/di/ts/metadata_spec.ts" region="Host">
3000 * </code-example>
3001 *
3002 * For an extended example, see ["Dependency Injection
3003 * Guide"](guide/dependency-injection-in-action#optional).
3004 */
3005 (): any;
3006 new (): Host;
3007}
3008
3009/** See CreateComponentOptions.hostFeatures */
3010declare type HostFeature = (<T>(component: T, componentDef: ɵComponentDef<T>) => void);
3011
3012/**
3013 * Type of the HostListener metadata.
3014 *
3015 * @publicApi
3016 */
3017export declare interface HostListener {
3018 /**
3019 * The DOM event to listen for.
3020 */
3021 eventName?: string;
3022 /**
3023 * A set of arguments to pass to the handler method when the event occurs.
3024 */
3025 args?: string[];
3026}
3027
3028/**
3029 * Decorator that binds a DOM event to a host listener and supplies configuration metadata.
3030 * Angular invokes the supplied handler method when the host element emits the specified event,
3031 * and updates the bound element with the result.
3032 *
3033 * If the handler method returns false, applies `preventDefault` on the bound element.
3034 *
3035 * @usageNotes
3036 *
3037 * The following example declares a directive
3038 * that attaches a click listener to a button and counts clicks.
3039 *
3040 * ```ts
3041 * @Directive({selector: 'button[counting]'})
3042 * class CountClicks {
3043 * numberOfClicks = 0;
3044 *
3045 * @HostListener('click', ['$event.target'])
3046 * onClick(btn) {
3047 * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);
3048 * }
3049 * }
3050 *
3051 * @Component({
3052 * selector: 'app',
3053 * template: '<button counting>Increment</button>',
3054 * })
3055 * class App {}
3056 *
3057 * ```
3058 *
3059 * The following example registers another DOM event handler that listens for `Enter` key-press
3060 * events on the global `window`.
3061 * ``` ts
3062 * import { HostListener, Component } from "@angular/core";
3063 *
3064 * @Component({
3065 * selector: 'app',
3066 * template: `<h1>Hello, you have pressed enter {{counter}} number of times!</h1> Press enter key
3067 * to increment the counter.
3068 * <button (click)="resetCounter()">Reset Counter</button>`
3069 * })
3070 * class AppComponent {
3071 * counter = 0;
3072 * @HostListener('window:keydown.enter', ['$event'])
3073 * handleKeyDown(event: KeyboardEvent) {
3074 * this.counter++;
3075 * }
3076 * resetCounter() {
3077 * this.counter = 0;
3078 * }
3079 * }
3080 * ```
3081 * The list of valid key names for `keydown` and `keyup` events
3082 * can be found here:
3083 * https://www.w3.org/TR/DOM-Level-3-Events-key/#named-key-attribute-values
3084 *
3085 * Note that keys can also be combined, e.g. `@HostListener('keydown.shift.a')`.
3086 *
3087 * The global target names that can be used to prefix an event name are
3088 * `document:`, `window:` and `body:`.
3089 *
3090 * @Annotation
3091 * @publicApi
3092 */
3093export declare const HostListener: HostListenerDecorator;
3094
3095/**
3096 * Type of the HostListener decorator / constructor function.
3097 *
3098 * @publicApi
3099 */
3100export declare interface HostListenerDecorator {
3101 /**
3102 * Decorator that declares a DOM event to listen for,
3103 * and provides a handler method to run when that event occurs.
3104 *
3105 * Angular invokes the supplied handler method when the host element emits the specified event,
3106 * and updates the bound element with the result.
3107 *
3108 * If the handler method returns false, applies `preventDefault` on the bound element.
3109 */
3110 (eventName: string, args?: string[]): any;
3111 new (eventName: string, args?: string[]): any;
3112}
3113
3114declare namespace i0 {
3115 export {
3116 ɵɵinject,
3117 ɵɵdefineInjectable,
3118 ɵɵdefineInjector,
3119 ɵɵInjectableDeclaration,
3120 ɵNgModuleDef as NgModuleDef,
3121 ɵɵdefineNgModule,
3122 ɵɵFactoryDeclaration,
3123 ɵɵInjectorDeclaration,
3124 ɵɵNgModuleDeclaration,
3125 ɵsetClassMetadata as setClassMetadata,
3126 ɵNgModuleFactory as NgModuleFactory,
3127 ɵnoSideEffects,
3128 ITS_JUST_ANGULAR
3129 }
3130}
3131
3132/**
3133 * Array storing OpCode for dynamically creating `i18n` translation DOM elements.
3134 *
3135 * This array creates a sequence of `Text` and `Comment` (as ICU anchor) DOM elements. It consists
3136 * of a pair of `number` and `string` pairs which encode the operations for the creation of the
3137 * translated block.
3138 *
3139 * The number is shifted and encoded according to `I18nCreateOpCode`
3140 *
3141 * Pseudocode:
3142 * ```
3143 * const i18nCreateOpCodes = [
3144 * 10 << I18nCreateOpCode.SHIFT, "Text Node add to DOM",
3145 * 11 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.COMMENT, "Comment Node add to DOM",
3146 * 12 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.APPEND_LATER, "Text Node added later"
3147 * ];
3148 *
3149 * for(var i=0; i<i18nCreateOpCodes.length; i++) {
3150 * const opcode = i18NCreateOpCodes[i++];
3151 * const index = opcode >> I18nCreateOpCode.SHIFT;
3152 * const text = i18NCreateOpCodes[i];
3153 * let node: Text|Comment;
3154 * if (opcode & I18nCreateOpCode.COMMENT === I18nCreateOpCode.COMMENT) {
3155 * node = lView[~index] = document.createComment(text);
3156 * } else {
3157 * node = lView[index] = document.createText(text);
3158 * }
3159 * if (opcode & I18nCreateOpCode.APPEND_EAGERLY !== I18nCreateOpCode.APPEND_EAGERLY) {
3160 * parentNode.appendChild(node);
3161 * }
3162 * }
3163 * ```
3164 */
3165declare interface I18nCreateOpCodes extends Array<number | string>, I18nDebug {
3166 __brand__: 'I18nCreateOpCodes';
3167}
3168
3169declare interface I18nDebug {
3170 /**
3171 * Human readable representation of the OpCode arrays.
3172 *
3173 * NOTE: This property only exists if `ngDevMode` is set to `true` and it is not present in
3174 * production. Its presence is purely to help debug issue in development, and should not be relied
3175 * on in production application.
3176 */
3177 debug?: string[];
3178}
3179
3180/**
3181 * Stores a list of nodes which need to be removed.
3182 *
3183 * Numbers are indexes into the `LView`
3184 * - index > 0: `removeRNode(lView[0])`
3185 * - index < 0: `removeICU(~lView[0])`
3186 */
3187declare interface I18nRemoveOpCodes extends Array<number> {
3188 __brand__: 'I18nRemoveOpCodes';
3189}
3190
3191/**
3192 * Stores DOM operations which need to be applied to update DOM render tree due to changes in
3193 * expressions.
3194 *
3195 * The basic idea is that `i18nExp` OpCodes capture expression changes and update a change
3196 * mask bit. (Bit 1 for expression 1, bit 2 for expression 2 etc..., bit 32 for expression 32 and
3197 * higher.) The OpCodes then compare its own change mask against the expression change mask to
3198 * determine if the OpCodes should execute.
3199 *
3200 * NOTE: 32nd bit is special as it says 32nd or higher. This way if we have more than 32 bindings
3201 * the code still works, but with lower efficiency. (it is unlikely that a translation would have
3202 * more than 32 bindings.)
3203 *
3204 * These OpCodes can be used by both the i18n block as well as ICU sub-block.
3205 *
3206 * ## Example
3207 *
3208 * Assume
3209 * ```ts
3210 * if (rf & RenderFlags.Update) {
3211 * i18nExp(ctx.exp1); // If changed set mask bit 1
3212 * i18nExp(ctx.exp2); // If changed set mask bit 2
3213 * i18nExp(ctx.exp3); // If changed set mask bit 3
3214 * i18nExp(ctx.exp4); // If changed set mask bit 4
3215 * i18nApply(0); // Apply all changes by executing the OpCodes.
3216 * }
3217 * ```
3218 * We can assume that each call to `i18nExp` sets an internal `changeMask` bit depending on the
3219 * index of `i18nExp`.
3220 *
3221 * ### OpCodes
3222 * ```ts
3223 * <I18nUpdateOpCodes>[
3224 * // The following OpCodes represent: `<div i18n-title="pre{{exp1}}in{{exp2}}post">`
3225 * // If `changeMask & 0b11`
3226 * // has changed then execute update OpCodes.
3227 * // has NOT changed then skip `8` values and start processing next OpCodes.
3228 * 0b11, 8,
3229 * // Concatenate `newValue = 'pre'+lView[bindIndex-4]+'in'+lView[bindIndex-3]+'post';`.
3230 * 'pre', -4, 'in', -3, 'post',
3231 * // Update attribute: `elementAttribute(1, 'title', sanitizerFn(newValue));`
3232 * 1 << SHIFT_REF | Attr, 'title', sanitizerFn,
3233 *
3234 * // The following OpCodes represent: `<div i18n>Hello {{exp3}}!">`
3235 * // If `changeMask & 0b100`
3236 * // has changed then execute update OpCodes.
3237 * // has NOT changed then skip `4` values and start processing next OpCodes.
3238 * 0b100, 4,
3239 * // Concatenate `newValue = 'Hello ' + lView[bindIndex -2] + '!';`.
3240 * 'Hello ', -2, '!',
3241 * // Update text: `lView[1].textContent = newValue;`
3242 * 1 << SHIFT_REF | Text,
3243 *
3244 * // The following OpCodes represent: `<div i18n>{exp4, plural, ... }">`
3245 * // If `changeMask & 0b1000`
3246 * // has changed then execute update OpCodes.
3247 * // has NOT changed then skip `2` values and start processing next OpCodes.
3248 * 0b1000, 2,
3249 * // Concatenate `newValue = lView[bindIndex -1];`.
3250 * -1,
3251 * // Switch ICU: `icuSwitchCase(lView[1], 0, newValue);`
3252 * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuSwitch,
3253 *
3254 * // Note `changeMask & -1` is always true, so the IcuUpdate will always execute.
3255 * -1, 1,
3256 * // Update ICU: `icuUpdateCase(lView[1], 0);`
3257 * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuUpdate,
3258 *
3259 * ];
3260 * ```
3261 *
3262 */
3263declare interface I18nUpdateOpCodes extends Array<string | number | SanitizerFn | null>, I18nDebug {
3264 __brand__: 'I18nUpdateOpCodes';
3265}
3266
3267/**
3268 * Marks that the next string is comment text need for ICU.
3269 *
3270 * See `I18nMutateOpCodes` documentation.
3271 */
3272declare const ICU_MARKER: ICU_MARKER;
3273
3274declare interface ICU_MARKER {
3275 marker: 'ICU';
3276}
3277
3278/**
3279 * Array storing OpCode for dynamically creating `i18n` blocks.
3280 *
3281 * Example:
3282 * ```ts
3283 * <I18nCreateOpCode>[
3284 * // For adding text nodes
3285 * // ---------------------
3286 * // Equivalent to:
3287 * // lView[1].appendChild(lView[0] = document.createTextNode('xyz'));
3288 * 'xyz', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
3289 *
3290 * // For adding element nodes
3291 * // ---------------------
3292 * // Equivalent to:
3293 * // lView[1].appendChild(lView[0] = document.createElement('div'));
3294 * ELEMENT_MARKER, 'div', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
3295 *
3296 * // For adding comment nodes
3297 * // ---------------------
3298 * // Equivalent to:
3299 * // lView[1].appendChild(lView[0] = document.createComment(''));
3300 * ICU_MARKER, '', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
3301 *
3302 * // For moving existing nodes to a different location
3303 * // --------------------------------------------------
3304 * // Equivalent to:
3305 * // const node = lView[1];
3306 * // lView[2].appendChild(node);
3307 * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
3308 *
3309 * // For removing existing nodes
3310 * // --------------------------------------------------
3311 * // const node = lView[1];
3312 * // removeChild(tView.data(1), node, lView);
3313 * 1 << SHIFT_REF | Remove,
3314 *
3315 * // For writing attributes
3316 * // --------------------------------------------------
3317 * // const node = lView[1];
3318 * // node.setAttribute('attr', 'value');
3319 * 1 << SHIFT_REF | Attr, 'attr', 'value'
3320 * ];
3321 * ```
3322 */
3323declare interface IcuCreateOpCodes extends Array<number | string | ELEMENT_MARKER | ICU_MARKER | null>, I18nDebug {
3324 __brand__: 'I18nCreateOpCodes';
3325}
3326
3327/**
3328 * Defines the ICU type of `select` or `plural`
3329 */
3330declare const enum IcuType {
3331 select = 0,
3332 plural = 1
3333}
3334
3335/**
3336 * This array contains information about input properties that
3337 * need to be set once from attribute data. It's ordered by
3338 * directive index (relative to element) so it's simple to
3339 * look up a specific directive's initial input data.
3340 *
3341 * Within each sub-array:
3342 *
3343 * i+0: attribute name
3344 * i+1: minified/internal input name
3345 * i+2: initial value
3346 *
3347 * If a directive on a node does not have any input properties
3348 * that should be set from attributes, its index is set to null
3349 * to avoid a sparse array.
3350 *
3351 * e.g. [null, ['role-min', 'minified-input', 'button']]
3352 */
3353declare type InitialInputData = (InitialInputs | null)[];
3354
3355/**
3356 * Used by InitialInputData to store input properties
3357 * that should be set once from attributes.
3358 *
3359 * i+0: attribute name
3360 * i+1: minified/internal input name
3361 * i+2: initial value
3362 *
3363 * e.g. ['role-min', 'minified-input', 'button']
3364 */
3365declare type InitialInputs = string[];
3366
3367/**
3368 * Type of the Inject metadata.
3369 *
3370 * @publicApi
3371 */
3372export declare interface Inject {
3373 /**
3374 * A [DI token](guide/glossary#di-token) that maps to the dependency to be injected.
3375 */
3376 token: any;
3377}
3378
3379/**
3380 * Inject decorator and metadata.
3381 *
3382 * @Annotation
3383 * @publicApi
3384 */
3385export declare const Inject: InjectDecorator;
3386
3387/**
3388 * Injects a token from the currently active injector.
3389 *
3390 * Must be used in the context of a factory function such as one defined for an
3391 * `InjectionToken`. Throws an error if not called from such a context.
3392 *
3393 * Within such a factory function, using this function to request injection of a dependency
3394 * is faster and more type-safe than providing an additional array of dependencies
3395 * (as has been common with `useFactory` providers).
3396 *
3397 * @param token The injection token for the dependency to be injected.
3398 * @param flags Optional flags that control how injection is executed.
3399 * The flags correspond to injection strategies that can be specified with
3400 * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.
3401 * @returns the injected value if injection is successful, `null` otherwise.
3402 *
3403 * @usageNotes
3404 *
3405 * ### Example
3406 *
3407 * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
3408 *
3409 * @publicApi
3410 */
3411export declare const inject: typeof ɵɵinject;
3412
3413/**
3414 * Type of the Injectable metadata.
3415 *
3416 * @publicApi
3417 */
3418export declare interface Injectable {
3419 /**
3420 * Determines which injectors will provide the injectable.
3421 *
3422 * - `Type<any>` - associates the injectable with an `@NgModule` or other `InjectorType`,
3423 * - 'null' : Equivalent to `undefined`. The injectable is not provided in any scope automatically
3424 * and must be added to a `providers` array of an [@NgModule](api/core/NgModule#providers),
3425 * [@Component](api/core/Directive#providers) or [@Directive](api/core/Directive#providers).
3426 *
3427 * The following options specify that this injectable should be provided in one of the following
3428 * injectors:
3429 * - 'root' : The application-level injector in most apps.
3430 * - 'platform' : A special singleton platform injector shared by all
3431 * applications on the page.
3432 * - 'any' : Provides a unique instance in each lazy loaded module while all eagerly loaded
3433 * modules share one instance.
3434 *
3435 */
3436 providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
3437}
3438
3439/**
3440 * Injectable decorator and metadata.
3441 *
3442 * @Annotation
3443 * @publicApi
3444 */
3445export declare const Injectable: InjectableDecorator;
3446
3447/**
3448 * Type of the Injectable decorator / constructor function.
3449 *
3450 * @publicApi
3451 */
3452export declare interface InjectableDecorator {
3453 /**
3454 * Decorator that marks a class as available to be
3455 * provided and injected as a dependency.
3456 *
3457 * @see [Introduction to Services and DI](guide/architecture-services)
3458 * @see [Dependency Injection Guide](guide/dependency-injection)
3459 *
3460 * @usageNotes
3461 *
3462 * Marking a class with `@Injectable` ensures that the compiler
3463 * will generate the necessary metadata to create the class's
3464 * dependencies when the class is injected.
3465 *
3466 * The following example shows how a service class is properly
3467 * marked so that a supporting service can be injected upon creation.
3468 *
3469 * <code-example path="core/di/ts/metadata_spec.ts" region="Injectable"></code-example>
3470 *
3471 */
3472 (): TypeDecorator;
3473 (options?: {
3474 providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
3475 } & InjectableProvider): TypeDecorator;
3476 new (): Injectable;
3477 new (options?: {
3478 providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
3479 } & InjectableProvider): Injectable;
3480}
3481
3482/**
3483 * Injectable providers used in `@Injectable` decorator.
3484 *
3485 * @publicApi
3486 */
3487export declare type InjectableProvider = ValueSansProvider | ExistingSansProvider | StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider;
3488
3489/**
3490 * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.
3491 *
3492 * `InjectableType`s contain their own Dependency Injection metadata and are usable in an
3493 * `InjectorDef`-based `StaticInjector.
3494 *
3495 * @publicApi
3496 */
3497export declare interface InjectableType<T> extends Type<T> {
3498 /**
3499 * Opaque type whose structure is highly version dependent. Do not rely on any properties.
3500 */
3501 ɵprov: unknown;
3502}
3503
3504
3505/**
3506 * Type of the Inject decorator / constructor function.
3507 *
3508 * @publicApi
3509 */
3510export declare interface InjectDecorator {
3511 /**
3512 * Parameter decorator on a dependency parameter of a class constructor
3513 * that specifies a custom provider of the dependency.
3514 *
3515 * @usageNotes
3516 * The following example shows a class constructor that specifies a
3517 * custom provider of a dependency using the parameter decorator.
3518 *
3519 * When `@Inject()` is not present, the injector uses the type annotation of the
3520 * parameter as the provider.
3521 *
3522 * <code-example path="core/di/ts/metadata_spec.ts" region="InjectWithoutDecorator">
3523 * </code-example>
3524 *
3525 * @see ["Dependency Injection Guide"](guide/dependency-injection)
3526 *
3527 */
3528 (token: any): any;
3529 new (token: any): Inject;
3530}
3531
3532/**
3533 * Injection flags for DI.
3534 *
3535 * @publicApi
3536 */
3537export declare enum InjectFlags {
3538 /** Check self and check parent injector if needed */
3539 Default = 0,
3540 /**
3541 * Specifies that an injector should retrieve a dependency from any injector until reaching the
3542 * host element of the current component. (Only used with Element Injector)
3543 */
3544 Host = 1,
3545 /** Don't ascend to ancestors of the node requesting injection. */
3546 Self = 2,
3547 /** Skip the node that is requesting injection. */
3548 SkipSelf = 4,
3549 /** Inject `defaultValue` instead if token not found. */
3550 Optional = 8
3551}
3552
3553/**
3554 * Creates a token that can be used in a DI Provider.
3555 *
3556 * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a
3557 * runtime representation) such as when injecting an interface, callable type, array or
3558 * parameterized type.
3559 *
3560 * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
3561 * the `Injector`. This provides an additional level of type safety.
3562 *
3563 * ```
3564 * interface MyInterface {...}
3565 * const myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));
3566 * // myInterface is inferred to be MyInterface.
3567 * ```
3568 *
3569 * When creating an `InjectionToken`, you can optionally specify a factory function which returns
3570 * (possibly by creating) a default value of the parameterized type `T`. This sets up the
3571 * `InjectionToken` using this factory as a provider as if it was defined explicitly in the
3572 * application's root injector. If the factory function, which takes zero arguments, needs to inject
3573 * dependencies, it can do so using the `inject` function.
3574 * As you can see in the Tree-shakable InjectionToken example below.
3575 *
3576 * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which
3577 * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As
3578 * mentioned above, `'root'` is the default value for `providedIn`.
3579 *
3580 * @usageNotes
3581 * ### Basic Examples
3582 *
3583 * ### Plain InjectionToken
3584 *
3585 * {@example core/di/ts/injector_spec.ts region='InjectionToken'}
3586 *
3587 * ### Tree-shakable InjectionToken
3588 *
3589 * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
3590 *
3591 *
3592 * @publicApi
3593 */
3594export declare class InjectionToken<T> {
3595 protected _desc: string;
3596 readonly ɵprov: unknown;
3597 /**
3598 * @param _desc Description for the token,
3599 * used only for debugging purposes,
3600 * it should but does not need to be unique
3601 * @param options Options for the token's usage, as described above
3602 */
3603 constructor(_desc: string, options?: {
3604 providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
3605 factory: () => T;
3606 });
3607 toString(): string;
3608}
3609
3610/**
3611 * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.
3612 *
3613 * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a
3614 * project.
3615 *
3616 * @publicApi
3617 */
3618export declare const INJECTOR: InjectionToken<Injector>;
3619
3620/**
3621 * Concrete injectors implement this interface. Injectors are configured
3622 * with [providers](guide/glossary#provider) that associate
3623 * dependencies of various types with [injection tokens](guide/glossary#di-token).
3624 *
3625 * @see ["DI Providers"](guide/dependency-injection-providers).
3626 * @see `StaticProvider`
3627 *
3628 * @usageNotes
3629 *
3630 * The following example creates a service injector instance.
3631 *
3632 * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
3633 *
3634 * ### Usage example
3635 *
3636 * {@example core/di/ts/injector_spec.ts region='Injector'}
3637 *
3638 * `Injector` returns itself when given `Injector` as a token:
3639 *
3640 * {@example core/di/ts/injector_spec.ts region='injectInjector'}
3641 *
3642 * @publicApi
3643 */
3644export declare abstract class Injector {
3645 static THROW_IF_NOT_FOUND: {};
3646 static NULL: Injector;
3647 /**
3648 * Retrieves an instance from the injector based on the provided token.
3649 * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
3650 * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
3651 */
3652 abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
3653 /**
3654 * @deprecated from v4.0.0 use ProviderToken<T>
3655 * @suppress {duplicate}
3656 */
3657 abstract get(token: any, notFoundValue?: any): any;
3658 /**
3659 * @deprecated from v5 use the new signature Injector.create(options)
3660 */
3661 static create(providers: StaticProvider[], parent?: Injector): Injector;
3662 /**
3663 * Creates a new injector instance that provides one or more dependencies,
3664 * according to a given type or types of `StaticProvider`.
3665 *
3666 * @param options An object with the following properties:
3667 * * `providers`: An array of providers of the [StaticProvider type](api/core/StaticProvider).
3668 * * `parent`: (optional) A parent injector.
3669 * * `name`: (optional) A developer-defined identifying name for the new injector.
3670 *
3671 * @returns The new injector instance.
3672 *
3673 */
3674 static create(options: {
3675 providers: StaticProvider[];
3676 parent?: Injector;
3677 name?: string;
3678 }): Injector;
3679 /** @nocollapse */
3680 static ɵprov: unknown;
3681}
3682
3683declare const INJECTOR_2 = 9;
3684
3685/**
3686 * A type which has an `InjectorDef` static field.
3687 *
3688 * `InjectorTypes` can be used to configure a `StaticInjector`.
3689 *
3690 * This is an opaque type whose structure is highly version dependent. Do not rely on any
3691 * properties.
3692 *
3693 * @publicApi
3694 */
3695export declare interface InjectorType<T> extends Type<T> {
3696 ɵfac?: unknown;
3697 ɵinj: unknown;
3698}
3699
3700/**
3701 * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorType` with an
3702 * associated array of providers.
3703 *
3704 * Objects of this type can be listed in the imports section of an `InjectorDef`.
3705 *
3706 * NOTE: This is a private type and should not be exported
3707 */
3708declare interface InjectorTypeWithProviders<T> {
3709 ngModule: InjectorType<T>;
3710 providers?: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[];
3711}
3712
3713/**
3714 * Type of metadata for an `Input` property.
3715 *
3716 * @publicApi
3717 */
3718export declare interface Input {
3719 /**
3720 * The name of the DOM property to which the input property is bound.
3721 */
3722 bindingPropertyName?: string;
3723}
3724
3725/**
3726 * @Annotation
3727 * @publicApi
3728 */
3729export declare const Input: InputDecorator;
3730
3731/**
3732 * @publicApi
3733 */
3734export declare interface InputDecorator {
3735 /**
3736 * Decorator that marks a class field as an input property and supplies configuration metadata.
3737 * The input property is bound to a DOM property in the template. During change detection,
3738 * Angular automatically updates the data property with the DOM property's value.
3739 *
3740 * @usageNotes
3741 *
3742 * You can supply an optional name to use in templates when the
3743 * component is instantiated, that maps to the
3744 * name of the bound property. By default, the original
3745 * name of the bound property is used for input binding.
3746 *
3747 * The following example creates a component with two input properties,
3748 * one of which is given a special binding name.
3749 *
3750 * ```typescript
3751 * @Component({
3752 * selector: 'bank-account',
3753 * template: `
3754 * Bank Name: {{bankName}}
3755 * Account Id: {{id}}
3756 * `
3757 * })
3758 * class BankAccount {
3759 * // This property is bound using its original name.
3760 * @Input() bankName: string;
3761 * // this property value is bound to a different property name
3762 * // when this component is instantiated in a template.
3763 * @Input('account-id') id: string;
3764 *
3765 * // this property is not bound, and is not automatically updated by Angular
3766 * normalizedBankName: string;
3767 * }
3768 *
3769 * @Component({
3770 * selector: 'app',
3771 * template: `
3772 * <bank-account bankName="RBC" account-id="4747"></bank-account>
3773 * `
3774 * })
3775 * class App {}
3776 * ```
3777 *
3778 * @see [Input and Output properties](guide/inputs-outputs)
3779 */
3780 (bindingPropertyName?: string): any;
3781 new (bindingPropertyName?: string): any;
3782}
3783
3784/**
3785 * See `TNode.insertBeforeIndex`
3786 */
3787declare type InsertBeforeIndex = null | number | number[];
3788
3789declare interface InternalNgModuleRef<T> extends NgModuleRef<T> {
3790 _bootstrapComponents: Type<any>[];
3791}
3792
3793declare interface InternalViewRef extends ViewRef {
3794 detachFromAppRef(): void;
3795 attachToAppRef(appRef: ViewRefTracker): void;
3796}
3797
3798
3799/**
3800 * Returns whether Angular is in development mode. After called once,
3801 * the value is locked and won't change any more.
3802 *
3803 * By default, this is true, unless a user calls `enableProdMode` before calling this.
3804 *
3805 * @publicApi
3806 */
3807export declare function isDevMode(): boolean;
3808
3809/**
3810 * Record representing the item change information.
3811 *
3812 * @publicApi
3813 */
3814export declare interface IterableChangeRecord<V> {
3815 /** Current index of the item in `Iterable` or null if removed. */
3816 readonly currentIndex: number | null;
3817 /** Previous index of the item in `Iterable` or null if added. */
3818 readonly previousIndex: number | null;
3819 /** The item. */
3820 readonly item: V;
3821 /** Track by identity as computed by the `TrackByFunction`. */
3822 readonly trackById: any;
3823}
3824
3825declare class IterableChangeRecord_<V> implements IterableChangeRecord<V> {
3826 item: V;
3827 trackById: any;
3828 currentIndex: number | null;
3829 previousIndex: number | null;
3830 constructor(item: V, trackById: any);
3831}
3832
3833/**
3834 * An object describing the changes in the `Iterable` collection since last time
3835 * `IterableDiffer#diff()` was invoked.
3836 *
3837 * @publicApi
3838 */
3839export declare interface IterableChanges<V> {
3840 /**
3841 * Iterate over all changes. `IterableChangeRecord` will contain information about changes
3842 * to each item.
3843 */
3844 forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;
3845 /**
3846 * Iterate over a set of operations which when applied to the original `Iterable` will produce the
3847 * new `Iterable`.
3848 *
3849 * NOTE: These are not necessarily the actual operations which were applied to the original
3850 * `Iterable`, rather these are a set of computed operations which may not be the same as the
3851 * ones applied.
3852 *
3853 * @param record A change which needs to be applied
3854 * @param previousIndex The `IterableChangeRecord#previousIndex` of the `record` refers to the
3855 * original `Iterable` location, where as `previousIndex` refers to the transient location
3856 * of the item, after applying the operations up to this point.
3857 * @param currentIndex The `IterableChangeRecord#currentIndex` of the `record` refers to the
3858 * original `Iterable` location, where as `currentIndex` refers to the transient location
3859 * of the item, after applying the operations up to this point.
3860 */
3861 forEachOperation(fn: (record: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
3862 /**
3863 * Iterate over changes in the order of original `Iterable` showing where the original items
3864 * have moved.
3865 */
3866 forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;
3867 /** Iterate over all added items. */
3868 forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;
3869 /** Iterate over all moved items. */
3870 forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
3871 /** Iterate over all removed items. */
3872 forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
3873 /**
3874 * Iterate over all items which had their identity (as computed by the `TrackByFunction`)
3875 * changed.
3876 */
3877 forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;
3878}
3879
3880/**
3881 * A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to
3882 * respond to changes in an iterable by effecting equivalent changes in the DOM.
3883 *
3884 * @publicApi
3885 */
3886export declare interface IterableDiffer<V> {
3887 /**
3888 * Compute a difference between the previous state and the new `object` state.
3889 *
3890 * @param object containing the new value.
3891 * @returns an object describing the difference. The return value is only valid until the next
3892 * `diff()` invocation.
3893 */
3894 diff(object: NgIterable<V> | undefined | null): IterableChanges<V> | null;
3895}
3896
3897/**
3898 * Provides a factory for {@link IterableDiffer}.
3899 *
3900 * @publicApi
3901 */
3902export declare interface IterableDifferFactory {
3903 supports(objects: any): boolean;
3904 create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;
3905}
3906
3907/**
3908 * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
3909 *
3910 * @publicApi
3911 */
3912export declare class IterableDiffers {
3913 /** @nocollapse */
3914 static ɵprov: unknown;
3915 /**
3916 * @deprecated v4.0.0 - Should be private
3917 */
3918 factories: IterableDifferFactory[];
3919 constructor(factories: IterableDifferFactory[]);
3920 static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers;
3921 /**
3922 * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
3923 * inherited {@link IterableDiffers} instance with the provided factories and return a new
3924 * {@link IterableDiffers} instance.
3925 *
3926 * @usageNotes
3927 * ### Example
3928 *
3929 * The following example shows how to extend an existing list of factories,
3930 * which will only be applied to the injector for this component and its children.
3931 * This step is all that's required to make a new {@link IterableDiffer} available.
3932 *
3933 * ```
3934 * @Component({
3935 * viewProviders: [
3936 * IterableDiffers.extend([new ImmutableListDiffer()])
3937 * ]
3938 * })
3939 * ```
3940 */
3941 static extend(factories: IterableDifferFactory[]): StaticProvider;
3942 find(iterable: any): IterableDifferFactory;
3943}
3944
3945/**
3946 * The existence of this constant (in this particular file) informs the Angular compiler that the
3947 * current program is actually @angular/core, which needs to be compiled specially.
3948 */
3949declare const ITS_JUST_ANGULAR = true;
3950
3951/**
3952 * `KeyValueArray` is an array where even positions contain keys and odd positions contain values.
3953 *
3954 * `KeyValueArray` provides a very efficient way of iterating over its contents. For small
3955 * sets (~10) the cost of binary searching an `KeyValueArray` has about the same performance
3956 * characteristics that of a `Map` with significantly better memory footprint.
3957 *
3958 * If used as a `Map` the keys are stored in alphabetical order so that they can be binary searched
3959 * for retrieval.
3960 *
3961 * See: `keyValueArraySet`, `keyValueArrayGet`, `keyValueArrayIndexOf`, `keyValueArrayDelete`.
3962 */
3963declare interface KeyValueArray<VALUE> extends Array<VALUE | string> {
3964 __brand__: 'array-map';
3965}
3966
3967/**
3968 * Record representing the item change information.
3969 *
3970 * @publicApi
3971 */
3972export declare interface KeyValueChangeRecord<K, V> {
3973 /**
3974 * Current key in the Map.
3975 */
3976 readonly key: K;
3977 /**
3978 * Current value for the key or `null` if removed.
3979 */
3980 readonly currentValue: V | null;
3981 /**
3982 * Previous value for the key or `null` if added.
3983 */
3984 readonly previousValue: V | null;
3985}
3986
3987/**
3988 * An object describing the changes in the `Map` or `{[k:string]: string}` since last time
3989 * `KeyValueDiffer#diff()` was invoked.
3990 *
3991 * @publicApi
3992 */
3993export declare interface KeyValueChanges<K, V> {
3994 /**
3995 * Iterate over all changes. `KeyValueChangeRecord` will contain information about changes
3996 * to each item.
3997 */
3998 forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
3999 /**
4000 * Iterate over changes in the order of original Map showing where the original items
4001 * have moved.
4002 */
4003 forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
4004 /**
4005 * Iterate over all keys for which values have changed.
4006 */
4007 forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
4008 /**
4009 * Iterate over all added items.
4010 */
4011 forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
4012 /**
4013 * Iterate over all removed items.
4014 */
4015 forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
4016}
4017
4018/**
4019 * A differ that tracks changes made to an object over time.
4020 *
4021 * @publicApi
4022 */
4023export declare interface KeyValueDiffer<K, V> {
4024 /**
4025 * Compute a difference between the previous state and the new `object` state.
4026 *
4027 * @param object containing the new value.
4028 * @returns an object describing the difference. The return value is only valid until the next
4029 * `diff()` invocation.
4030 */
4031 diff(object: Map<K, V>): KeyValueChanges<K, V> | null;
4032 /**
4033 * Compute a difference between the previous state and the new `object` state.
4034 *
4035 * @param object containing the new value.
4036 * @returns an object describing the difference. The return value is only valid until the next
4037 * `diff()` invocation.
4038 */
4039 diff(object: {
4040 [key: string]: V;
4041 }): KeyValueChanges<string, V> | null;
4042}
4043
4044/**
4045 * Provides a factory for {@link KeyValueDiffer}.
4046 *
4047 * @publicApi
4048 */
4049export declare interface KeyValueDifferFactory {
4050 /**
4051 * Test to see if the differ knows how to diff this kind of object.
4052 */
4053 supports(objects: any): boolean;
4054 /**
4055 * Create a `KeyValueDiffer`.
4056 */
4057 create<K, V>(): KeyValueDiffer<K, V>;
4058}
4059
4060/**
4061 * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
4062 *
4063 * @publicApi
4064 */
4065export declare class KeyValueDiffers {
4066 /** @nocollapse */
4067 static ɵprov: unknown;
4068 /**
4069 * @deprecated v4.0.0 - Should be private.
4070 */
4071 factories: KeyValueDifferFactory[];
4072 constructor(factories: KeyValueDifferFactory[]);
4073 static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers;
4074 /**
4075 * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
4076 * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
4077 * {@link KeyValueDiffers} instance.
4078 *
4079 * @usageNotes
4080 * ### Example
4081 *
4082 * The following example shows how to extend an existing list of factories,
4083 * which will only be applied to the injector for this component and its children.
4084 * This step is all that's required to make a new {@link KeyValueDiffer} available.
4085 *
4086 * ```
4087 * @Component({
4088 * viewProviders: [
4089 * KeyValueDiffers.extend([new ImmutableMapDiffer()])
4090 * ]
4091 * })
4092 * ```
4093 */
4094 static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider;
4095 find(kv: any): KeyValueDifferFactory;
4096}
4097
4098/**
4099 * The state associated with a container.
4100 *
4101 * This is an array so that its structure is closer to LView. This helps
4102 * when traversing the view tree (which is a mix of containers and component
4103 * views), so we can jump to viewOrContainer[NEXT] in the same way regardless
4104 * of type.
4105 */
4106declare interface LContainer extends Array<any> {
4107 /**
4108 * The host element of this LContainer.
4109 *
4110 * The host could be an LView if this container is on a component node.
4111 * In that case, the component LView is its HOST.
4112 */
4113 readonly [HOST]: RElement | RComment | LView;
4114 /**
4115 * This is a type field which allows us to differentiate `LContainer` from `StylingContext` in an
4116 * efficient way. The value is always set to `true`
4117 */
4118 [TYPE]: true;
4119 /**
4120 * Flag to signify that this `LContainer` may have transplanted views which need to be change
4121 * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.
4122 *
4123 * This flag, once set, is never unset for the `LContainer`.
4124 */
4125 [HAS_TRANSPLANTED_VIEWS]: boolean;
4126 /**
4127 * Access to the parent view is necessary so we can propagate back
4128 * up from inside a container to parent[NEXT].
4129 */
4130 [PARENT]: LView;
4131 /**
4132 * This allows us to jump from a container to a sibling container or component
4133 * view with the same parent, so we can remove listeners efficiently.
4134 */
4135 [NEXT]: LView | LContainer | null;
4136 /**
4137 * The number of direct transplanted views which need a refresh or have descendants themselves
4138 * that need a refresh but have not marked their ancestors as Dirty. This tells us that during
4139 * change detection we should still descend to find those children to refresh, even if the parents
4140 * are not `Dirty`/`CheckAlways`.
4141 */
4142 [TRANSPLANTED_VIEWS_TO_REFRESH]: number;
4143 /**
4144 * A collection of views created based on the underlying `<ng-template>` element but inserted into
4145 * a different `LContainer`. We need to track views created from a given declaration point since
4146 * queries collect matches from the embedded view declaration point and _not_ the insertion point.
4147 */
4148 [MOVED_VIEWS]: LView[] | null;
4149 /**
4150 * Pointer to the `TNode` which represents the host of the container.
4151 */
4152 [T_HOST]: TNode;
4153 /** The comment element that serves as an anchor for this LContainer. */
4154 readonly [NATIVE]: RComment;
4155 /**
4156 * Array of `ViewRef`s used by any `ViewContainerRef`s that point to this container.
4157 *
4158 * This is lazily initialized by `ViewContainerRef` when the first view is inserted.
4159 *
4160 * NOTE: This is stored as `any[]` because render3 should really not be aware of `ViewRef` and
4161 * doing so creates circular dependency.
4162 */
4163 [VIEW_REFS]: unknown[] | null;
4164}
4165
4166/**
4167 * Human readable version of the `LContainer`
4168 *
4169 * `LContainer` is a data structure used internally to keep track of child views. The `LContainer`
4170 * is designed for efficiency and so at times it is difficult to read or write tests which assert on
4171 * its values. For this reason when `ngDevMode` is true we patch a `LContainer.debug` property which
4172 * points to `LContainerDebug` for easier debugging and test writing. It is the intent of
4173 * `LContainerDebug` to be used in tests.
4174 */
4175declare interface LContainerDebug {
4176 readonly native: RComment;
4177 /**
4178 * Child `LView`s.
4179 */
4180 readonly views: LViewDebug[];
4181 readonly parent: LViewDebug | null;
4182 readonly movedViews: LView[] | null;
4183 readonly host: RElement | RComment | LView;
4184 readonly next: LViewDebug | LContainerDebug | null;
4185 readonly hasTransplantedViews: boolean;
4186}
4187
4188/**
4189 * Provide this token to set the locale of your application.
4190 * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
4191 * DecimalPipe and PercentPipe) and by ICU expressions.
4192 *
4193 * See the [i18n guide](guide/i18n-common-locale-id) for more information.
4194 *
4195 * @usageNotes
4196 * ### Example
4197 *
4198 * ```typescript
4199 * import { LOCALE_ID } from '@angular/core';
4200 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4201 * import { AppModule } from './app/app.module';
4202 *
4203 * platformBrowserDynamic().bootstrapModule(AppModule, {
4204 * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]
4205 * });
4206 * ```
4207 *
4208 * @publicApi
4209 */
4210export declare const LOCALE_ID: InjectionToken<string>;
4211
4212/**
4213 * Type for a function that extracts a value for a local refs.
4214 * Example:
4215 * - `<div #nativeDivEl>` - `nativeDivEl` should point to the native `<div>` element;
4216 * - `<ng-template #tplRef>` - `tplRef` should point to the `TemplateRef` instance;
4217 */
4218declare type LocalRefExtractor = (tNode: TNodeWithLocalRefs, currentView: LView) => any;
4219
4220/**
4221 * lQueries represent a collection of individual LQuery objects tracked in a given view.
4222 */
4223declare interface LQueries {
4224 /**
4225 * A collection of queries tracked in a given view.
4226 */
4227 queries: LQuery<any>[];
4228 /**
4229 * A method called when a new embedded view is created. As a result a set of LQueries applicable
4230 * for a new embedded view is instantiated (cloned) from the declaration view.
4231 * @param tView
4232 */
4233 createEmbeddedView(tView: TView): LQueries | null;
4234 /**
4235 * A method called when an embedded view is inserted into a container. As a result all impacted
4236 * `LQuery` objects (and associated `QueryList`) are marked as dirty.
4237 * @param tView
4238 */
4239 insertView(tView: TView): void;
4240 /**
4241 * A method called when an embedded view is detached from a container. As a result all impacted
4242 * `LQuery` objects (and associated `QueryList`) are marked as dirty.
4243 * @param tView
4244 */
4245 detachView(tView: TView): void;
4246}
4247
4248/**
4249 * An interface that represents query-related information specific to a view instance. Most notably
4250 * it contains:
4251 * - materialized query matches;
4252 * - a pointer to a QueryList where materialized query results should be reported.
4253 */
4254declare interface LQuery<T> {
4255 /**
4256 * Materialized query matches for a given view only (!). Results are initialized lazily so the
4257 * array of matches is set to `null` initially.
4258 */
4259 matches: (T | null)[] | null;
4260 /**
4261 * A QueryList where materialized query results should be reported.
4262 */
4263 queryList: QueryList<T>;
4264 /**
4265 * Clones an LQuery for an embedded view. A cloned query shares the same `QueryList` but has a
4266 * separate collection of materialized matches.
4267 */
4268 clone(): LQuery<T>;
4269 /**
4270 * Called when an embedded view, impacting results of this query, is inserted or removed.
4271 */
4272 setDirty(): void;
4273}
4274
4275/**
4276 * `LView` stores all of the information needed to process the instructions as
4277 * they are invoked from the template. Each embedded view and component view has its
4278 * own `LView`. When processing a particular view, we set the `viewData` to that
4279 * `LView`. When that view is done processing, the `viewData` is set back to
4280 * whatever the original `viewData` was before (the parent `LView`).
4281 *
4282 * Keeping separate state for each view facilities view insertion / deletion, so we
4283 * don't have to edit the data array based on which views are present.
4284 */
4285declare interface LView extends Array<any> {
4286 /**
4287 * Human readable representation of the `LView`.
4288 *
4289 * NOTE: This property only exists if `ngDevMode` is set to `true` and it is not present in
4290 * production. Its presence is purely to help debug issue in development, and should not be relied
4291 * on in production application.
4292 */
4293 debug?: LViewDebug;
4294 /**
4295 * The node into which this `LView` is inserted.
4296 */
4297 [HOST]: RElement | null;
4298 /**
4299 * The static data for this view. We need a reference to this so we can easily walk up the
4300 * node tree in DI and get the TView.data array associated with a node (where the
4301 * directive defs are stored).
4302 */
4303 readonly [TVIEW]: TView;
4304 /** Flags for this view. See LViewFlags for more info. */
4305 [FLAGS]: LViewFlags;
4306 /**
4307 * This may store an {@link LView} or {@link LContainer}.
4308 *
4309 * `LView` - The parent view. This is needed when we exit the view and must restore the previous
4310 * LView. Without this, the render method would have to keep a stack of
4311 * views as it is recursively rendering templates.
4312 *
4313 * `LContainer` - The current view is part of a container, and is an embedded view.
4314 */
4315 [PARENT]: LView | LContainer | null;
4316 /**
4317 *
4318 * The next sibling LView or LContainer.
4319 *
4320 * Allows us to propagate between sibling view states that aren't in the same
4321 * container. Embedded views already have a node.next, but it is only set for
4322 * views in the same container. We need a way to link component views and views
4323 * across containers as well.
4324 */
4325 [NEXT]: LView | LContainer | null;
4326 /** Queries active for this view - nodes from a view are reported to those queries. */
4327 [QUERIES]: LQueries | null;
4328 /**
4329 * Store the `TNode` of the location where the current `LView` is inserted into.
4330 *
4331 * Given:
4332 * ```
4333 * <div>
4334 * <ng-template><span></span></ng-template>
4335 * </div>
4336 * ```
4337 *
4338 * We end up with two `TView`s.
4339 * - `parent` `TView` which contains `<div><!-- anchor --></div>`
4340 * - `child` `TView` which contains `<span></span>`
4341 *
4342 * Typically the `child` is inserted into the declaration location of the `parent`, but it can be
4343 * inserted anywhere. Because it can be inserted anywhere it is not possible to store the
4344 * insertion information in the `TView` and instead we must store it in the `LView[T_HOST]`.
4345 *
4346 * So to determine where is our insertion parent we would execute:
4347 * ```
4348 * const parentLView = lView[PARENT];
4349 * const parentTNode = lView[T_HOST];
4350 * const insertionParent = parentLView[parentTNode.index];
4351 * ```
4352 *
4353 *
4354 * If `null`, this is the root view of an application (root component is in this view) and it has
4355 * no parents.
4356 */
4357 [T_HOST]: TNode | null;
4358 /**
4359 * When a view is destroyed, listeners need to be released and outputs need to be
4360 * unsubscribed. This context array stores both listener functions wrapped with
4361 * their context and output subscription instances for a particular view.
4362 *
4363 * These change per LView instance, so they cannot be stored on TView. Instead,
4364 * TView.cleanup saves an index to the necessary context in this array.
4365 *
4366 * After `LView` is created it is possible to attach additional instance specific functions at the
4367 * end of the `lView[CLENUP]` because we know that no more `T` level cleanup functions will be
4368 * addeded here.
4369 */
4370 [CLEANUP]: any[] | null;
4371 /**
4372 * - For dynamic views, this is the context with which to render the template (e.g.
4373 * `NgForContext`), or `{}` if not defined explicitly.
4374 * - For root view of the root component the context contains change detection data.
4375 * - For non-root components, the context is the component instance,
4376 * - For inline views, the context is null.
4377 */
4378 [CONTEXT]: {} | RootContext | null;
4379 /** An optional Module Injector to be used as fall back after Element Injectors are consulted. */
4380 readonly [INJECTOR_2]: Injector | null;
4381 /** Factory to be used for creating Renderer. */
4382 [RENDERER_FACTORY]: RendererFactory3;
4383 /** Renderer to be used for this view. */
4384 [RENDERER]: Renderer3;
4385 /** An optional custom sanitizer. */
4386 [SANITIZER]: Sanitizer | null;
4387 /**
4388 * Reference to the first LView or LContainer beneath this LView in
4389 * the hierarchy.
4390 *
4391 * Necessary to store this so views can traverse through their nested views
4392 * to remove listeners and call onDestroy callbacks.
4393 */
4394 [CHILD_HEAD]: LView | LContainer | null;
4395 /**
4396 * The last LView or LContainer beneath this LView in the hierarchy.
4397 *
4398 * The tail allows us to quickly add a new state to the end of the view list
4399 * without having to propagate starting from the first child.
4400 */
4401 [CHILD_TAIL]: LView | LContainer | null;
4402 /**
4403 * View where this view's template was declared.
4404 *
4405 * The template for a dynamically created view may be declared in a different view than
4406 * it is inserted. We already track the "insertion view" (view where the template was
4407 * inserted) in LView[PARENT], but we also need access to the "declaration view"
4408 * (view where the template was declared). Otherwise, we wouldn't be able to call the
4409 * view's template function with the proper contexts. Context should be inherited from
4410 * the declaration view tree, not the insertion view tree.
4411 *
4412 * Example (AppComponent template):
4413 *
4414 * <ng-template #foo></ng-template> <-- declared here -->
4415 * <some-comp [tpl]="foo"></some-comp> <-- inserted inside this component -->
4416 *
4417 * The <ng-template> above is declared in the AppComponent template, but it will be passed into
4418 * SomeComp and inserted there. In this case, the declaration view would be the AppComponent,
4419 * but the insertion view would be SomeComp. When we are removing views, we would want to
4420 * traverse through the insertion view to clean up listeners. When we are calling the
4421 * template function during change detection, we need the declaration view to get inherited
4422 * context.
4423 */
4424 [DECLARATION_VIEW]: LView | null;
4425 /**
4426 * Points to the declaration component view, used to track transplanted `LView`s.
4427 *
4428 * See: `DECLARATION_VIEW` which points to the actual `LView` where it was declared, whereas
4429 * `DECLARATION_COMPONENT_VIEW` points to the component which may not be same as
4430 * `DECLARATION_VIEW`.
4431 *
4432 * Example:
4433 * ```
4434 * <#VIEW #myComp>
4435 * <div *ngIf="true">
4436 * <ng-template #myTmpl>...</ng-template>
4437 * </div>
4438 * </#VIEW>
4439 * ```
4440 * In the above case `DECLARATION_VIEW` for `myTmpl` points to the `LView` of `ngIf` whereas
4441 * `DECLARATION_COMPONENT_VIEW` points to `LView` of the `myComp` which owns the template.
4442 *
4443 * The reason for this is that all embedded views are always check-always whereas the component
4444 * view can be check-always or on-push. When we have a transplanted view it is important to
4445 * determine if we have transplanted a view from check-always declaration to on-push insertion
4446 * point. In such a case the transplanted view needs to be added to the `LContainer` in the
4447 * declared `LView` and CD during the declared view CD (in addition to the CD at the insertion
4448 * point.) (Any transplanted views which are intra Component are of no interest because the CD
4449 * strategy of declaration and insertion will always be the same, because it is the same
4450 * component.)
4451 *
4452 * Queries already track moved views in `LView[DECLARATION_LCONTAINER]` and
4453 * `LContainer[MOVED_VIEWS]`. However the queries also track `LView`s which moved within the same
4454 * component `LView`. Transplanted views are a subset of moved views, and we use
4455 * `DECLARATION_COMPONENT_VIEW` to differentiate them. As in this example.
4456 *
4457 * Example showing intra component `LView` movement.
4458 * ```
4459 * <#VIEW #myComp>
4460 * <div *ngIf="condition; then thenBlock else elseBlock"></div>
4461 * <ng-template #thenBlock>Content to render when condition is true.</ng-template>
4462 * <ng-template #elseBlock>Content to render when condition is false.</ng-template>
4463 * </#VIEW>
4464 * ```
4465 * The `thenBlock` and `elseBlock` is moved but not transplanted.
4466 *
4467 * Example showing inter component `LView` movement (transplanted view).
4468 * ```
4469 * <#VIEW #myComp>
4470 * <ng-template #myTmpl>...</ng-template>
4471 * <insertion-component [template]="myTmpl"></insertion-component>
4472 * </#VIEW>
4473 * ```
4474 * In the above example `myTmpl` is passed into a different component. If `insertion-component`
4475 * instantiates `myTmpl` and `insertion-component` is on-push then the `LContainer` needs to be
4476 * marked as containing transplanted views and those views need to be CD as part of the
4477 * declaration CD.
4478 *
4479 *
4480 * When change detection runs, it iterates over `[MOVED_VIEWS]` and CDs any child `LView`s where
4481 * the `DECLARATION_COMPONENT_VIEW` of the current component and the child `LView` does not match
4482 * (it has been transplanted across components.)
4483 *
4484 * Note: `[DECLARATION_COMPONENT_VIEW]` points to itself if the LView is a component view (the
4485 * simplest / most common case).
4486 *
4487 * see also:
4488 * - https://hackmd.io/@mhevery/rJUJsvv9H write up of the problem
4489 * - `LContainer[HAS_TRANSPLANTED_VIEWS]` which marks which `LContainer` has transplanted views.
4490 * - `LContainer[TRANSPLANT_HEAD]` and `LContainer[TRANSPLANT_TAIL]` storage for transplanted
4491 * - `LView[DECLARATION_LCONTAINER]` similar problem for queries
4492 * - `LContainer[MOVED_VIEWS]` similar problem for queries
4493 */
4494 [DECLARATION_COMPONENT_VIEW]: LView;
4495 /**
4496 * A declaration point of embedded views (ones instantiated based on the content of a
4497 * <ng-template>), null for other types of views.
4498 *
4499 * We need to track all embedded views created from a given declaration point so we can prepare
4500 * query matches in a proper order (query matches are ordered based on their declaration point and
4501 * _not_ the insertion point).
4502 */
4503 [DECLARATION_LCONTAINER]: LContainer | null;
4504 /**
4505 * More flags for this view. See PreOrderHookFlags for more info.
4506 */
4507 [PREORDER_HOOK_FLAGS]: PreOrderHookFlags;
4508 /**
4509 * The number of direct transplanted views which need a refresh or have descendants themselves
4510 * that need a refresh but have not marked their ancestors as Dirty. This tells us that during
4511 * change detection we should still descend to find those children to refresh, even if the parents
4512 * are not `Dirty`/`CheckAlways`.
4513 */
4514 [TRANSPLANTED_VIEWS_TO_REFRESH]: number;
4515}
4516
4517/**
4518 * Human readable version of the `LView`.
4519 *
4520 * `LView` is a data structure used internally to keep track of views. The `LView` is designed for
4521 * efficiency and so at times it is difficult to read or write tests which assert on its values. For
4522 * this reason when `ngDevMode` is true we patch a `LView.debug` property which points to
4523 * `LViewDebug` for easier debugging and test writing. It is the intent of `LViewDebug` to be used
4524 * in tests.
4525 */
4526declare interface LViewDebug {
4527 /**
4528 * Flags associated with the `LView` unpacked into a more readable state.
4529 *
4530 * See `LViewFlags` for the flag meanings.
4531 */
4532 readonly flags: {
4533 initPhaseState: number;
4534 creationMode: boolean;
4535 firstViewPass: boolean;
4536 checkAlways: boolean;
4537 dirty: boolean;
4538 attached: boolean;
4539 destroyed: boolean;
4540 isRoot: boolean;
4541 indexWithinInitPhase: number;
4542 };
4543 /**
4544 * Associated TView
4545 */
4546 readonly tView: TView;
4547 /**
4548 * Parent view (or container)
4549 */
4550 readonly parent: LViewDebug | LContainerDebug | null;
4551 /**
4552 * Next sibling to the `LView`.
4553 */
4554 readonly next: LViewDebug | LContainerDebug | null;
4555 /**
4556 * The context used for evaluation of the `LView`
4557 *
4558 * (Usually the component)
4559 */
4560 readonly context: {} | null;
4561 /**
4562 * Hierarchical tree of nodes.
4563 */
4564 readonly nodes: DebugNode_2[];
4565 /**
4566 * Template structure (no instance data).
4567 * (Shows how TNodes are connected)
4568 */
4569 readonly template: string;
4570 /**
4571 * HTML representation of the `LView`.
4572 *
4573 * This is only approximate to actual HTML as child `LView`s are removed.
4574 */
4575 readonly html: string;
4576 /**
4577 * The host element to which this `LView` is attached.
4578 */
4579 readonly hostHTML: string | null;
4580 /**
4581 * Child `LView`s
4582 */
4583 readonly childViews: Array<LViewDebug | LContainerDebug>;
4584 /**
4585 * Sub range of `LView` containing decls (DOM elements).
4586 */
4587 readonly decls: LViewDebugRange;
4588 /**
4589 * Sub range of `LView` containing vars (bindings).
4590 */
4591 readonly vars: LViewDebugRange;
4592 /**
4593 * Sub range of `LView` containing expando (used by DI).
4594 */
4595 readonly expando: LViewDebugRange;
4596}
4597
4598/**
4599 * `LView` is subdivided to ranges where the actual data is stored. Some of these ranges such as
4600 * `decls` and `vars` are known at compile time. Other such as `i18n` and `expando` are runtime only
4601 * concepts.
4602 */
4603declare interface LViewDebugRange {
4604 /**
4605 * The starting index in `LView` where the range begins. (Inclusive)
4606 */
4607 start: number;
4608 /**
4609 * The ending index in `LView` where the range ends. (Exclusive)
4610 */
4611 end: number;
4612 /**
4613 * The length of the range
4614 */
4615 length: number;
4616 /**
4617 * The merged content of the range. `t` contains data from `TView.data` and `l` contains `LView`
4618 * data at an index.
4619 */
4620 content: LViewDebugRangeContent[];
4621}
4622
4623/**
4624 * For convenience the static and instance portions of `TView` and `LView` are merged into a single
4625 * object in `LViewRange`.
4626 */
4627declare interface LViewDebugRangeContent {
4628 /**
4629 * Index into original `LView` or `TView.data`.
4630 */
4631 index: number;
4632 /**
4633 * Value from the `TView.data[index]` location.
4634 */
4635 t: any;
4636 /**
4637 * Value from the `LView[index]` location.
4638 */
4639 l: any;
4640}
4641
4642/** Flags associated with an LView (saved in LView[FLAGS]) */
4643declare const enum LViewFlags {
4644 /** The state of the init phase on the first 2 bits */
4645 InitPhaseStateIncrementer = 1,
4646 InitPhaseStateMask = 3,
4647 /**
4648 * Whether or not the view is in creationMode.
4649 *
4650 * This must be stored in the view rather than using `data` as a marker so that
4651 * we can properly support embedded views. Otherwise, when exiting a child view
4652 * back into the parent view, `data` will be defined and `creationMode` will be
4653 * improperly reported as false.
4654 */
4655 CreationMode = 4,
4656 /**
4657 * Whether or not this LView instance is on its first processing pass.
4658 *
4659 * An LView instance is considered to be on its "first pass" until it
4660 * has completed one creation mode run and one update mode run. At this
4661 * time, the flag is turned off.
4662 */
4663 FirstLViewPass = 8,
4664 /** Whether this view has default change detection strategy (checks always) or onPush */
4665 CheckAlways = 16,
4666 /**
4667 * Whether or not manual change detection is turned on for onPush components.
4668 *
4669 * This is a special mode that only marks components dirty in two cases:
4670 * 1) There has been a change to an @Input property
4671 * 2) `markDirty()` has been called manually by the user
4672 *
4673 * Note that in this mode, the firing of events does NOT mark components
4674 * dirty automatically.
4675 *
4676 * Manual mode is turned off by default for backwards compatibility, as events
4677 * automatically mark OnPush components dirty in View Engine.
4678 *
4679 * TODO: Add a public API to ChangeDetectionStrategy to turn this mode on
4680 */
4681 ManualOnPush = 32,
4682 /** Whether or not this view is currently dirty (needing check) */
4683 Dirty = 64,
4684 /** Whether or not this view is currently attached to change detection tree. */
4685 Attached = 128,
4686 /** Whether or not this view is destroyed. */
4687 Destroyed = 256,
4688 /** Whether or not this view is the root view */
4689 IsRoot = 512,
4690 /**
4691 * Whether this moved LView was needs to be refreshed at the insertion location because the
4692 * declaration was dirty.
4693 */
4694 RefreshTransplantedView = 1024,
4695 /**
4696 * Index of the current init phase on last 21 bits
4697 */
4698 IndexWithinInitPhaseIncrementer = 2048,
4699 IndexWithinInitPhaseShift = 11,
4700 IndexWithinInitPhaseReset = 2047
4701}
4702
4703/**
4704 * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
4705 * that the compiler should use in case of missing translations:
4706 * - Error: throw if you have missing translations.
4707 * - Warning (default): show a warning in the console and/or shell.
4708 * - Ignore: do nothing.
4709 *
4710 * See the [i18n guide](guide/i18n-common-merge#report-missing-translations) for more information.
4711 *
4712 * @usageNotes
4713 * ### Example
4714 * ```typescript
4715 * import { MissingTranslationStrategy } from '@angular/core';
4716 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4717 * import { AppModule } from './app/app.module';
4718 *
4719 * platformBrowserDynamic().bootstrapModule(AppModule, {
4720 * missingTranslation: MissingTranslationStrategy.Error
4721 * });
4722 * ```
4723 *
4724 * @publicApi
4725 */
4726export declare enum MissingTranslationStrategy {
4727 Error = 0,
4728 Warning = 1,
4729 Ignore = 2
4730}
4731
4732/**
4733 * Combination of NgModuleFactory and ComponentFactories.
4734 *
4735 * @publicApi
4736 *
4737 * @deprecated
4738 * Ivy JIT mode doesn't require accessing this symbol.
4739 * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for
4740 * additional context.
4741 */
4742export declare class ModuleWithComponentFactories<T> {
4743 ngModuleFactory: NgModuleFactory<T>;
4744 componentFactories: ComponentFactory<any>[];
4745 constructor(ngModuleFactory: NgModuleFactory<T>, componentFactories: ComponentFactory<any>[]);
4746}
4747
4748/**
4749 * A wrapper around an NgModule that associates it with [providers](guide/glossary#provider
4750 * "Definition"). Usage without a generic type is deprecated.
4751 *
4752 * @see [Deprecations](guide/deprecations#modulewithproviders-type-without-a-generic)
4753 *
4754 * @publicApi
4755 */
4756export declare interface ModuleWithProviders<T> {
4757 ngModule: Type<T>;
4758 providers?: Provider[];
4759}
4760
4761declare const MOVED_VIEWS = 9;
4762
4763declare const NATIVE = 7;
4764
4765declare const NEXT = 4;
4766
4767/**
4768 * A type describing supported iterable types.
4769 *
4770 * @publicApi
4771 */
4772export declare type NgIterable<T> = Array<T> | Iterable<T>;
4773
4774/**
4775 * Type of the NgModule metadata.
4776 *
4777 * @publicApi
4778 */
4779export declare interface NgModule {
4780 /**
4781 * The set of injectable objects that are available in the injector
4782 * of this module.
4783 *
4784 * @see [Dependency Injection guide](guide/dependency-injection)
4785 * @see [NgModule guide](guide/providers)
4786 *
4787 * @usageNotes
4788 *
4789 * Dependencies whose providers are listed here become available for injection
4790 * into any component, directive, pipe or service that is a child of this injector.
4791 * The NgModule used for bootstrapping uses the root injector, and can provide dependencies
4792 * to any part of the app.
4793 *
4794 * A lazy-loaded module has its own injector, typically a child of the app root injector.
4795 * Lazy-loaded services are scoped to the lazy-loaded module's injector.
4796 * If a lazy-loaded module also provides the `UserService`, any component created
4797 * within that module's context (such as by router navigation) gets the local instance
4798 * of the service, not the instance in the root injector.
4799 * Components in external modules continue to receive the instance provided by their injectors.
4800 *
4801 * ### Example
4802 *
4803 * The following example defines a class that is injected in
4804 * the HelloWorld NgModule:
4805 *
4806 * ```
4807 * class Greeter {
4808 * greet(name:string) {
4809 * return 'Hello ' + name + '!';
4810 * }
4811 * }
4812 *
4813 * @NgModule({
4814 * providers: [
4815 * Greeter
4816 * ]
4817 * })
4818 * class HelloWorld {
4819 * greeter:Greeter;
4820 *
4821 * constructor(greeter:Greeter) {
4822 * this.greeter = greeter;
4823 * }
4824 * }
4825 * ```
4826 */
4827 providers?: Provider[];
4828 /**
4829 * The set of components, directives, and pipes ([declarables](guide/glossary#declarable))
4830 * that belong to this module.
4831 *
4832 * @usageNotes
4833 *
4834 * The set of selectors that are available to a template include those declared here, and
4835 * those that are exported from imported NgModules.
4836 *
4837 * Declarables must belong to exactly one module.
4838 * The compiler emits an error if you try to declare the same class in more than one module.
4839 * Be careful not to declare a class that is imported from another module.
4840 *
4841 * ### Example
4842 *
4843 * The following example allows the CommonModule to use the `NgFor`
4844 * directive.
4845 *
4846 * ```javascript
4847 * @NgModule({
4848 * declarations: [NgFor]
4849 * })
4850 * class CommonModule {
4851 * }
4852 * ```
4853 */
4854 declarations?: Array<Type<any> | any[]>;
4855 /**
4856 * The set of NgModules whose exported [declarables](guide/glossary#declarable)
4857 * are available to templates in this module.
4858 *
4859 * @usageNotes
4860 *
4861 * A template can use exported declarables from any
4862 * imported module, including those from modules that are imported indirectly
4863 * and re-exported.
4864 * For example, `ModuleA` imports `ModuleB`, and also exports
4865 * it, which makes the declarables from `ModuleB` available
4866 * wherever `ModuleA` is imported.
4867 *
4868 * ### Example
4869 *
4870 * The following example allows MainModule to use anything exported by
4871 * `CommonModule`:
4872 *
4873 * ```javascript
4874 * @NgModule({
4875 * imports: [CommonModule]
4876 * })
4877 * class MainModule {
4878 * }
4879 * ```
4880 *
4881 */
4882 imports?: Array<Type<any> | ModuleWithProviders<{}> | any[]>;
4883 /**
4884 * The set of components, directives, and pipes declared in this
4885 * NgModule that can be used in the template of any component that is part of an
4886 * NgModule that imports this NgModule. Exported declarations are the module's public API.
4887 *
4888 * A declarable belongs to one and only one NgModule.
4889 * A module can list another module among its exports, in which case all of that module's
4890 * public declaration are exported.
4891 *
4892 * @usageNotes
4893 *
4894 * Declarations are private by default.
4895 * If this ModuleA does not export UserComponent, then only the components within this
4896 * ModuleA can use UserComponent.
4897 *
4898 * ModuleA can import ModuleB and also export it, making exports from ModuleB
4899 * available to an NgModule that imports ModuleA.
4900 *
4901 * ### Example
4902 *
4903 * The following example exports the `NgFor` directive from CommonModule.
4904 *
4905 * ```javascript
4906 * @NgModule({
4907 * exports: [NgFor]
4908 * })
4909 * class CommonModule {
4910 * }
4911 * ```
4912 */
4913 exports?: Array<Type<any> | any[]>;
4914 /**
4915 * The set of components to compile when this NgModule is defined,
4916 * so that they can be dynamically loaded into the view.
4917 *
4918 * For each component listed here, Angular creates a `ComponentFactory`
4919 * and stores it in the `ComponentFactoryResolver`.
4920 *
4921 * Angular automatically adds components in the module's bootstrap
4922 * and route definitions into the `entryComponents` list. Use this
4923 * option to add components that are bootstrapped
4924 * using one of the imperative techniques, such as `ViewContainerRef.createComponent()`.
4925 *
4926 * @see [Entry Components](guide/entry-components)
4927 * @deprecated
4928 * Since 9.0.0. With Ivy, this property is no longer necessary.
4929 * (You may need to keep these if building a library that will be consumed by a View Engine
4930 * application.)
4931 */
4932 entryComponents?: Array<Type<any> | any[]>;
4933 /**
4934 * The set of components that are bootstrapped when
4935 * this module is bootstrapped. The components listed here
4936 * are automatically added to `entryComponents`.
4937 */
4938 bootstrap?: Array<Type<any> | any[]>;
4939 /**
4940 * The set of schemas that declare elements to be allowed in the NgModule.
4941 * Elements and properties that are neither Angular components nor directives
4942 * must be declared in a schema.
4943 *
4944 * Allowed value are `NO_ERRORS_SCHEMA` and `CUSTOM_ELEMENTS_SCHEMA`.
4945 *
4946 * @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA`
4947 * you must ensure that allowed elements and properties securely escape inputs.
4948 */
4949 schemas?: Array<SchemaMetadata | any[]>;
4950 /**
4951 * A name or path that uniquely identifies this NgModule in `getNgModuleById`.
4952 * If left `undefined`, the NgModule is not registered with `getNgModuleById`.
4953 */
4954 id?: string;
4955 /**
4956 * When present, this module is ignored by the AOT compiler.
4957 * It remains in distributed code, and the JIT compiler attempts to compile it
4958 * at run time, in the browser.
4959 * To ensure the correct behavior, the app must import `@angular/compiler`.
4960 */
4961 jit?: true;
4962}
4963
4964/**
4965 * @Annotation
4966 * @publicApi
4967 */
4968export declare const NgModule: NgModuleDecorator;
4969
4970/**
4971 * Type of the NgModule decorator / constructor function.
4972 *
4973 * @publicApi
4974 */
4975export declare interface NgModuleDecorator {
4976 /**
4977 * Decorator that marks a class as an NgModule and supplies configuration metadata.
4978 */
4979 (obj?: NgModule): TypeDecorator;
4980 new (obj?: NgModule): NgModule;
4981}
4982
4983/**
4984 * @publicApi
4985 *
4986 * @deprecated
4987 * This class was mostly used as a part of ViewEngine-based JIT API and is no longer needed in Ivy
4988 * JIT mode. See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes)
4989 * for additional context. Angular provides APIs that accept NgModule classes directly (such as
4990 * [PlatformRef.bootstrapModule](api/core/PlatformRef#bootstrapModule) and
4991 * [createNgModuleRef](api/core/createNgModuleRef)), consider switching to those APIs instead of
4992 * using factory-based ones.
4993 */
4994export declare abstract class NgModuleFactory<T> {
4995 abstract get moduleType(): Type<T>;
4996 abstract create(parentInjector: Injector | null): NgModuleRef<T>;
4997}
4998
4999/**
5000 * Represents an instance of an `NgModule` created by an `NgModuleFactory`.
5001 * Provides access to the `NgModule` instance and related objects.
5002 *
5003 * @publicApi
5004 */
5005export declare abstract class NgModuleRef<T> {
5006 /**
5007 * The injector that contains all of the providers of the `NgModule`.
5008 */
5009 abstract get injector(): Injector;
5010 /**
5011 * The resolver that can retrieve component factories in a context of this module.
5012 *
5013 * Note: since v13, dynamic component creation via
5014 * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)
5015 * does **not** require resolving component factory: component class can be used directly.
5016 *
5017 * @deprecated Angular no longer requires Component factories. Please use other APIs where
5018 * Component class can be used directly.
5019 */
5020 abstract get componentFactoryResolver(): ComponentFactoryResolver;
5021 /**
5022 * The `NgModule` instance.
5023 */
5024 abstract get instance(): T;
5025 /**
5026 * Destroys the module instance and all of the data structures associated with it.
5027 */
5028 abstract destroy(): void;
5029 /**
5030 * Registers a callback to be executed when the module is destroyed.
5031 */
5032 abstract onDestroy(callback: () => void): void;
5033}
5034
5035/**
5036 * A token for third-party components that can register themselves with NgProbe.
5037 *
5038 * @publicApi
5039 */
5040export declare class NgProbeToken {
5041 name: string;
5042 token: any;
5043 constructor(name: string, token: any);
5044}
5045
5046/**
5047 * An injectable service for executing work inside or outside of the Angular zone.
5048 *
5049 * The most common use of this service is to optimize performance when starting a work consisting of
5050 * one or more asynchronous tasks that don't require UI updates or error handling to be handled by
5051 * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks
5052 * can reenter the Angular zone via {@link #run}.
5053 *
5054 * <!-- TODO: add/fix links to:
5055 * - docs explaining zones and the use of zones in Angular and change-detection
5056 * - link to runOutsideAngular/run (throughout this file!)
5057 * -->
5058 *
5059 * @usageNotes
5060 * ### Example
5061 *
5062 * ```
5063 * import {Component, NgZone} from '@angular/core';
5064 * import {NgIf} from '@angular/common';
5065 *
5066 * @Component({
5067 * selector: 'ng-zone-demo',
5068 * template: `
5069 * <h2>Demo: NgZone</h2>
5070 *
5071 * <p>Progress: {{progress}}%</p>
5072 * <p *ngIf="progress >= 100">Done processing {{label}} of Angular zone!</p>
5073 *
5074 * <button (click)="processWithinAngularZone()">Process within Angular zone</button>
5075 * <button (click)="processOutsideOfAngularZone()">Process outside of Angular zone</button>
5076 * `,
5077 * })
5078 * export class NgZoneDemo {
5079 * progress: number = 0;
5080 * label: string;
5081 *
5082 * constructor(private _ngZone: NgZone) {}
5083 *
5084 * // Loop inside the Angular zone
5085 * // so the UI DOES refresh after each setTimeout cycle
5086 * processWithinAngularZone() {
5087 * this.label = 'inside';
5088 * this.progress = 0;
5089 * this._increaseProgress(() => console.log('Inside Done!'));
5090 * }
5091 *
5092 * // Loop outside of the Angular zone
5093 * // so the UI DOES NOT refresh after each setTimeout cycle
5094 * processOutsideOfAngularZone() {
5095 * this.label = 'outside';
5096 * this.progress = 0;
5097 * this._ngZone.runOutsideAngular(() => {
5098 * this._increaseProgress(() => {
5099 * // reenter the Angular zone and display done
5100 * this._ngZone.run(() => { console.log('Outside Done!'); });
5101 * });
5102 * });
5103 * }
5104 *
5105 * _increaseProgress(doneCallback: () => void) {
5106 * this.progress += 1;
5107 * console.log(`Current progress: ${this.progress}%`);
5108 *
5109 * if (this.progress < 100) {
5110 * window.setTimeout(() => this._increaseProgress(doneCallback), 10);
5111 * } else {
5112 * doneCallback();
5113 * }
5114 * }
5115 * }
5116 * ```
5117 *
5118 * @publicApi
5119 */
5120export declare class NgZone {
5121 readonly hasPendingMacrotasks: boolean;
5122 readonly hasPendingMicrotasks: boolean;
5123 /**
5124 * Whether there are no outstanding microtasks or macrotasks.
5125 */
5126 readonly isStable: boolean;
5127 /**
5128 * Notifies when code enters Angular Zone. This gets fired first on VM Turn.
5129 */
5130 readonly onUnstable: EventEmitter<any>;
5131 /**
5132 * Notifies when there is no more microtasks enqueued in the current VM Turn.
5133 * This is a hint for Angular to do change detection, which may enqueue more microtasks.
5134 * For this reason this event can fire multiple times per VM Turn.
5135 */
5136 readonly onMicrotaskEmpty: EventEmitter<any>;
5137 /**
5138 * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
5139 * implies we are about to relinquish VM turn.
5140 * This event gets called just once.
5141 */
5142 readonly onStable: EventEmitter<any>;
5143 /**
5144 * Notifies that an error has been delivered.
5145 */
5146 readonly onError: EventEmitter<any>;
5147 constructor({ enableLongStackTrace, shouldCoalesceEventChangeDetection, shouldCoalesceRunChangeDetection }: {
5148 enableLongStackTrace?: boolean | undefined;
5149 shouldCoalesceEventChangeDetection?: boolean | undefined;
5150 shouldCoalesceRunChangeDetection?: boolean | undefined;
5151 });
5152 static isInAngularZone(): boolean;
5153 static assertInAngularZone(): void;
5154 static assertNotInAngularZone(): void;
5155 /**
5156 * Executes the `fn` function synchronously within the Angular zone and returns value returned by
5157 * the function.
5158 *
5159 * Running functions via `run` allows you to reenter Angular zone from a task that was executed
5160 * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
5161 *
5162 * Any future tasks or microtasks scheduled from within this function will continue executing from
5163 * within the Angular zone.
5164 *
5165 * If a synchronous error happens it will be rethrown and not reported via `onError`.
5166 */
5167 run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
5168 /**
5169 * Executes the `fn` function synchronously within the Angular zone as a task and returns value
5170 * returned by the function.
5171 *
5172 * Running functions via `run` allows you to reenter Angular zone from a task that was executed
5173 * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
5174 *
5175 * Any future tasks or microtasks scheduled from within this function will continue executing from
5176 * within the Angular zone.
5177 *
5178 * If a synchronous error happens it will be rethrown and not reported via `onError`.
5179 */
5180 runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T;
5181 /**
5182 * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
5183 * rethrown.
5184 */
5185 runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
5186 /**
5187 * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
5188 * the function.
5189 *
5190 * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
5191 * work that
5192 * doesn't trigger Angular change-detection or is subject to Angular's error handling.
5193 *
5194 * Any future tasks or microtasks scheduled from within this function will continue executing from
5195 * outside of the Angular zone.
5196 *
5197 * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
5198 */
5199 runOutsideAngular<T>(fn: (...args: any[]) => T): T;
5200}
5201
5202/**
5203 * Defines a schema that allows any property on any element.
5204 *
5205 * This schema allows you to ignore the errors related to any unknown elements or properties in a
5206 * template. The usage of this schema is generally discouraged because it prevents useful validation
5207 * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.
5208 *
5209 * @publicApi
5210 */
5211export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
5212
5213declare interface NodeInjectorDebug {
5214 /**
5215 * Instance bloom. Does the current injector have a provider with a given bloom mask.
5216 */
5217 bloom: string;
5218 /**
5219 * Cumulative bloom. Do any of the above injectors have a provider with a given bloom mask.
5220 */
5221 cumulativeBloom: string;
5222 /**
5223 * A list of providers associated with this injector.
5224 */
5225 providers: (Type<unknown> | ɵDirectiveDef<unknown> | ɵComponentDef<unknown>)[];
5226 /**
5227 * A list of providers associated with this injector visible to the view of the component only.
5228 */
5229 viewProviders: Type<unknown>[];
5230 /**
5231 * Location of the parent `TNode`.
5232 */
5233 parentInjectorIndex: number;
5234}
5235
5236/**
5237 * Object Oriented style of API needed to create elements and text nodes.
5238 *
5239 * This is the native browser API style, e.g. operations are methods on individual objects
5240 * like HTMLElement. With this style, no additional code is needed as a facade
5241 * (reducing payload size).
5242 * */
5243declare interface ObjectOrientedRenderer3 {
5244 createComment(data: string): RComment;
5245 createElement(tagName: string): RElement;
5246 createElementNS(namespace: string, tagName: string): RElement;
5247 createTextNode(data: string): RText;
5248 querySelector(selectors: string): RElement | null;
5249}
5250
5251/**
5252 * @description
5253 * A lifecycle hook that is called when any data-bound property of a directive changes.
5254 * Define an `ngOnChanges()` method to handle the changes.
5255 *
5256 * @see `DoCheck`
5257 * @see `OnInit`
5258 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
5259 *
5260 * @usageNotes
5261 * The following snippet shows how a component can implement this interface to
5262 * define an on-changes handler for an input property.
5263 *
5264 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnChanges'}
5265 *
5266 * @publicApi
5267 */
5268export declare interface OnChanges {
5269 /**
5270 * A callback method that is invoked immediately after the
5271 * default change detector has checked data-bound properties
5272 * if at least one has changed, and before the view and content
5273 * children are checked.
5274 * @param changes The changed properties.
5275 */
5276 ngOnChanges(changes: SimpleChanges): void;
5277}
5278
5279/**
5280 * A lifecycle hook that is called when a directive, pipe, or service is destroyed.
5281 * Use for any custom cleanup that needs to occur when the
5282 * instance is destroyed.
5283 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
5284 *
5285 * @usageNotes
5286 * The following snippet shows how a component can implement this interface
5287 * to define its own custom clean-up method.
5288 *
5289 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'}
5290 *
5291 * @publicApi
5292 */
5293export declare interface OnDestroy {
5294 /**
5295 * A callback method that performs custom clean-up, invoked immediately
5296 * before a directive, pipe, or service instance is destroyed.
5297 */
5298 ngOnDestroy(): void;
5299}
5300
5301/**
5302 * @description
5303 * A lifecycle hook that is called after Angular has initialized
5304 * all data-bound properties of a directive.
5305 * Define an `ngOnInit()` method to handle any additional initialization tasks.
5306 *
5307 * @see `AfterContentInit`
5308 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
5309 *
5310 * @usageNotes
5311 * The following snippet shows how a component can implement this interface to
5312 * define its own initialization method.
5313 *
5314 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'}
5315 *
5316 * @publicApi
5317 */
5318export declare interface OnInit {
5319 /**
5320 * A callback method that is invoked immediately after the
5321 * default change detector has checked the directive's
5322 * data-bound properties for the first time,
5323 * and before any of the view or content children have been checked.
5324 * It is invoked only once when the directive is instantiated.
5325 */
5326 ngOnInit(): void;
5327}
5328
5329declare type OpaqueValue = unknown;
5330
5331declare interface OpaqueViewState {
5332 '__brand__': 'Brand for OpaqueViewState that nothing will match';
5333}
5334
5335/**
5336 * Type of the Optional metadata.
5337 *
5338 * @publicApi
5339 */
5340export declare interface Optional {
5341}
5342
5343/**
5344 * Optional decorator and metadata.
5345 *
5346 * @Annotation
5347 * @publicApi
5348 */
5349export declare const Optional: OptionalDecorator;
5350
5351/**
5352 * Type of the Optional decorator / constructor function.
5353 *
5354 * @publicApi
5355 */
5356export declare interface OptionalDecorator {
5357 /**
5358 * Parameter decorator to be used on constructor parameters,
5359 * which marks the parameter as being an optional dependency.
5360 * The DI framework provides `null` if the dependency is not found.
5361 *
5362 * Can be used together with other parameter decorators
5363 * that modify how dependency injection operates.
5364 *
5365 * @usageNotes
5366 *
5367 * The following code allows the possibility of a `null` result:
5368 *
5369 * <code-example path="core/di/ts/metadata_spec.ts" region="Optional">
5370 * </code-example>
5371 *
5372 * @see ["Dependency Injection Guide"](guide/dependency-injection).
5373 */
5374 (): any;
5375 new (): Optional;
5376}
5377
5378/**
5379 * Type of the Output metadata.
5380 *
5381 * @publicApi
5382 */
5383export declare interface Output {
5384 /**
5385 * The name of the DOM property to which the output property is bound.
5386 */
5387 bindingPropertyName?: string;
5388}
5389
5390/**
5391 * @Annotation
5392 * @publicApi
5393 */
5394export declare const Output: OutputDecorator;
5395
5396/**
5397 * Type of the Output decorator / constructor function.
5398 *
5399 * @publicApi
5400 */
5401export declare interface OutputDecorator {
5402 /**
5403 * Decorator that marks a class field as an output property and supplies configuration metadata.
5404 * The DOM property bound to the output property is automatically updated during change detection.
5405 *
5406 * @usageNotes
5407 *
5408 * You can supply an optional name to use in templates when the
5409 * component is instantiated, that maps to the
5410 * name of the bound property. By default, the original
5411 * name of the bound property is used for output binding.
5412 *
5413 * See `Input` decorator for an example of providing a binding name.
5414 *
5415 * @see [Input and Output properties](guide/inputs-outputs)
5416 *
5417 */
5418 (bindingPropertyName?: string): any;
5419 new (bindingPropertyName?: string): any;
5420}
5421
5422/**
5423 * A [DI token](guide/glossary#di-token "DI token definition") that indicates the root directory of
5424 * the application
5425 * @publicApi
5426 */
5427export declare const PACKAGE_ROOT_URL: InjectionToken<string>;
5428
5429declare const PARENT = 3;
5430
5431/**
5432 * Type of the Pipe metadata.
5433 *
5434 * @publicApi
5435 */
5436export declare interface Pipe {
5437 /**
5438 * The pipe name to use in template bindings.
5439 * Typically uses [lowerCamelCase](guide/glossary#case-types)
5440 * because the name cannot contain hyphens.
5441 */
5442 name: string;
5443 /**
5444 * When true, the pipe is pure, meaning that the
5445 * `transform()` method is invoked only when its input arguments
5446 * change. Pipes are pure by default.
5447 *
5448 * If the pipe has internal state (that is, the result
5449 * depends on state other than its arguments), set `pure` to false.
5450 * In this case, the pipe is invoked on each change-detection cycle,
5451 * even if the arguments have not changed.
5452 */
5453 pure?: boolean;
5454}
5455
5456/**
5457 * @Annotation
5458 * @publicApi
5459 */
5460export declare const Pipe: PipeDecorator;
5461
5462/**
5463 * Type of the Pipe decorator / constructor function.
5464 *
5465 * @publicApi
5466 */
5467export declare interface PipeDecorator {
5468 /**
5469 *
5470 * Decorator that marks a class as pipe and supplies configuration metadata.
5471 *
5472 * A pipe class must implement the `PipeTransform` interface.
5473 * For example, if the name is "myPipe", use a template binding expression
5474 * such as the following:
5475 *
5476 * ```
5477 * {{ exp | myPipe }}
5478 * ```
5479 *
5480 * The result of the expression is passed to the pipe's `transform()` method.
5481 *
5482 * A pipe must belong to an NgModule in order for it to be available
5483 * to a template. To make it a member of an NgModule,
5484 * list it in the `declarations` field of the `NgModule` metadata.
5485 *
5486 * @see [Style Guide: Pipe Names](guide/styleguide#02-09)
5487 *
5488 */
5489 (obj: Pipe): TypeDecorator;
5490 /**
5491 * See the `Pipe` decorator.
5492 */
5493 new (obj: Pipe): Pipe;
5494}
5495
5496declare type PipeDefList = ɵPipeDef<any>[];
5497
5498/**
5499 * Type used for PipeDefs on component definition.
5500 *
5501 * The function is necessary to be able to support forward declarations.
5502 */
5503declare type PipeDefListOrFactory = (() => PipeDefList) | PipeDefList;
5504
5505
5506/**
5507 * An interface that is implemented by pipes in order to perform a transformation.
5508 * Angular invokes the `transform` method with the value of a binding
5509 * as the first argument, and any parameters as the second argument in list form.
5510 *
5511 * @usageNotes
5512 *
5513 * In the following example, `TruncatePipe` returns the shortened value with an added ellipses.
5514 *
5515 * <code-example path="core/ts/pipes/simple_truncate.ts" header="simple_truncate.ts"></code-example>
5516 *
5517 * Invoking `{{ 'It was the best of times' | truncate }}` in a template will produce `It was...`.
5518 *
5519 * In the following example, `TruncatePipe` takes parameters that sets the truncated length and the
5520 * string to append with.
5521 *
5522 * <code-example path="core/ts/pipes/truncate.ts" header="truncate.ts"></code-example>
5523 *
5524 * Invoking `{{ 'It was the best of times' | truncate:4:'....' }}` in a template will produce `It
5525 * was the best....`.
5526 *
5527 * @publicApi
5528 */
5529export declare interface PipeTransform {
5530 transform(value: any, ...args: any[]): any;
5531}
5532
5533/**
5534 * A subclass of `Type` which has a static `ɵpipe`:`PipeDef` field making it
5535 * consumable for rendering.
5536 */
5537declare interface PipeType<T> extends Type<T> {
5538 ɵpipe: unknown;
5539}
5540
5541declare type PipeTypeList = (PipeType<any> | Type<any>)[];
5542
5543declare type PipeTypesOrFactory = (() => PipeTypeList) | PipeTypeList;
5544
5545/**
5546 * A token that indicates an opaque platform ID.
5547 * @publicApi
5548 */
5549export declare const PLATFORM_ID: InjectionToken<Object>;
5550
5551/**
5552 * A function that is executed when a platform is initialized.
5553 * @publicApi
5554 */
5555export declare const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>;
5556
5557/**
5558 * This platform has to be included in any other platform
5559 *
5560 * @publicApi
5561 */
5562export declare const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
5563
5564/**
5565 * The Angular platform is the entry point for Angular on a web page.
5566 * Each page has exactly one platform. Services (such as reflection) which are common
5567 * to every Angular application running on the page are bound in its scope.
5568 * A page's platform is initialized implicitly when a platform is created using a platform
5569 * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.
5570 *
5571 * @publicApi
5572 */
5573export declare class PlatformRef {
5574 private _injector;
5575 private _modules;
5576 private _destroyListeners;
5577 private _destroyed;
5578 /**
5579 * Creates an instance of an `@NgModule` for the given platform.
5580 *
5581 * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function
5582 * argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.
5583 */
5584 bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions): Promise<NgModuleRef<M>>;
5585 /**
5586 * Creates an instance of an `@NgModule` for a given platform.
5587 *
5588 * @usageNotes
5589 * ### Simple Example
5590 *
5591 * ```typescript
5592 * @NgModule({
5593 * imports: [BrowserModule]
5594 * })
5595 * class MyModule {}
5596 *
5597 * let moduleRef = platformBrowser().bootstrapModule(MyModule);
5598 * ```
5599 *
5600 */
5601 bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>;
5602 private _moduleDoBootstrap;
5603 /**
5604 * Registers a listener to be called when the platform is destroyed.
5605 */
5606 onDestroy(callback: () => void): void;
5607 /**
5608 * Retrieves the platform {@link Injector}, which is the parent injector for
5609 * every Angular application on the page and provides singleton providers.
5610 */
5611 get injector(): Injector;
5612 /**
5613 * Destroys the current Angular platform and all Angular applications on the page.
5614 * Destroys all modules and listeners registered with the platform.
5615 */
5616 destroy(): void;
5617 get destroyed(): boolean;
5618 static ɵfac: i0.ɵɵFactoryDeclaration<PlatformRef, never>;
5619 static ɵprov: i0.ɵɵInjectableDeclaration<PlatformRef>;
5620}
5621
5622declare interface PlatformReflectionCapabilities {
5623 isReflectionEnabled(): boolean;
5624 factory(type: Type<any>): Function;
5625 hasLifecycleHook(type: any, lcProperty: string): boolean;
5626 guards(type: any): {
5627 [key: string]: any;
5628 };
5629 /**
5630 * Return a list of annotations/types for constructor parameters
5631 */
5632 parameters(type: Type<any>): any[][];
5633 /**
5634 * Return a list of annotations declared on the class
5635 */
5636 annotations(type: Type<any>): any[];
5637 /**
5638 * Return a object literal which describes the annotations on Class fields/properties.
5639 */
5640 propMetadata(typeOrFunc: Type<any>): {
5641 [key: string]: any[];
5642 };
5643 getter(name: string): ɵGetterFn;
5644 setter(name: string): ɵSetterFn;
5645 method(name: string): ɵMethodFn;
5646 importUri(type: Type<any>): string;
5647 resourceUri(type: Type<any>): string;
5648 resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any;
5649 resolveEnum(enumIdentifier: any, name: string): any;
5650}
5651
5652/**
5653 * A boolean-valued function over a value, possibly including context information
5654 * regarding that value's position in an array.
5655 *
5656 * @publicApi
5657 */
5658export declare interface Predicate<T> {
5659 (value: T): boolean;
5660}
5661
5662declare const PREORDER_HOOK_FLAGS = 18;
5663
5664/** More flags associated with an LView (saved in LView[PREORDER_HOOK_FLAGS]) */
5665declare const enum PreOrderHookFlags {
5666 /**
5667 The index of the next pre-order hook to be called in the hooks array, on the first 16
5668 bits
5669 */
5670 IndexOfTheNextPreOrderHookMaskMask = 65535,
5671 /**
5672 * The number of init hooks that have already been called, on the last 16 bits
5673 */
5674 NumberOfInitHooksCalledIncrementer = 65536,
5675 NumberOfInitHooksCalledShift = 16,
5676 NumberOfInitHooksCalledMask = 4294901760
5677}
5678
5679/**
5680 * Procedural style of API needed to create elements and text nodes.
5681 *
5682 * In non-native browser environments (e.g. platforms such as web-workers), this is the
5683 * facade that enables element manipulation. This also facilitates backwards compatibility
5684 * with Renderer2.
5685 */
5686declare interface ProceduralRenderer3 {
5687 destroy(): void;
5688 createComment(value: string): RComment;
5689 createElement(name: string, namespace?: string | null): RElement;
5690 createText(value: string): RText;
5691 /**
5692 * This property is allowed to be null / undefined,
5693 * in which case the view engine won't call it.
5694 * This is used as a performance optimization for production mode.
5695 */
5696 destroyNode?: ((node: RNode) => void) | null;
5697 appendChild(parent: RElement, newChild: RNode): void;
5698 insertBefore(parent: RNode, newChild: RNode, refChild: RNode | null, isMove?: boolean): void;
5699 removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;
5700 selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): RElement;
5701 parentNode(node: RNode): RElement | null;
5702 nextSibling(node: RNode): RNode | null;
5703 setAttribute(el: RElement, name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL, namespace?: string | null): void;
5704 removeAttribute(el: RElement, name: string, namespace?: string | null): void;
5705 addClass(el: RElement, name: string): void;
5706 removeClass(el: RElement, name: string): void;
5707 setStyle(el: RElement, style: string, value: any, flags?: RendererStyleFlags2 | RendererStyleFlags3): void;
5708 removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2 | RendererStyleFlags3): void;
5709 setProperty(el: RElement, name: string, value: any): void;
5710 setValue(node: RText | RComment, value: string): void;
5711 listen(target: GlobalTargetName | RNode, eventName: string, callback: (event: any) => boolean | void): () => void;
5712}
5713
5714/**
5715 * Describes a function that is used to process provider lists (such as provider
5716 * overrides).
5717 */
5718declare type ProcessProvidersFunction = (providers: Provider[]) => Provider[];
5719
5720/**
5721 * List of slots for a projection. A slot can be either based on a parsed CSS selector
5722 * which will be used to determine nodes which are projected into that slot.
5723 *
5724 * When set to "*", the slot is reserved and can be used for multi-slot projection
5725 * using {@link ViewContainerRef#createComponent}. The last slot that specifies the
5726 * wildcard selector will retrieve all projectable nodes which do not match any selector.
5727 */
5728declare type ProjectionSlots = (ɵCssSelectorList | '*')[];
5729
5730/**
5731 * This mapping is necessary so we can set input properties and output listeners
5732 * properly at runtime when property names are minified or aliased.
5733 *
5734 * Key: unminified / public input or output name
5735 * Value: array containing minified / internal name and related directive index
5736 *
5737 * The value must be an array to support inputs and outputs with the same name
5738 * on the same node.
5739 */
5740declare type PropertyAliases = {
5741 [key: string]: PropertyAliasValue;
5742};
5743
5744/**
5745 * Store the runtime input or output names for all the directives.
5746 *
5747 * i+0: directive instance index
5748 * i+1: privateName
5749 *
5750 * e.g. [0, 'change-minified']
5751 */
5752declare type PropertyAliasValue = (number | string)[];
5753
5754/**
5755 * Describes how the `Injector` should be configured.
5756 * @see ["Dependency Injection Guide"](guide/dependency-injection).
5757 *
5758 * @see `StaticProvider`
5759 *
5760 * @publicApi
5761 */
5762export declare type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | any[];
5763
5764/**
5765 * @description
5766 *
5767 * Token that can be used to retrieve an instance from an injector or through a query.
5768 *
5769 * @publicApi
5770 */
5771export declare type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToken<T>;
5772
5773/**
5774 * Testability API.
5775 * `declare` keyword causes tsickle to generate externs, so these methods are
5776 * not renamed by Closure Compiler.
5777 * @publicApi
5778 */
5779declare interface PublicTestability {
5780 isStable(): boolean;
5781 whenStable(callback: Function, timeout?: number, updateCallback?: Function): void;
5782 findProviders(using: any, provider: string, exactMatch: boolean): any[];
5783}
5784
5785declare const QUERIES = 19;
5786
5787/**
5788 * Type of the Query metadata.
5789 *
5790 * @publicApi
5791 */
5792export declare interface Query {
5793 descendants: boolean;
5794 emitDistinctChangesOnly: boolean;
5795 first: boolean;
5796 read: any;
5797 isViewQuery: boolean;
5798 selector: any;
5799 static?: boolean;
5800}
5801
5802/**
5803 * Base class for query metadata.
5804 *
5805 * @see `ContentChildren`.
5806 * @see `ContentChild`.
5807 * @see `ViewChildren`.
5808 * @see `ViewChild`.
5809 *
5810 * @publicApi
5811 */
5812export declare abstract class Query {
5813}
5814
5815/**
5816 * A set of flags to be used with Queries.
5817 *
5818 * NOTE: Ensure changes here are reflected in `packages/compiler/src/render3/view/compiler.ts`
5819 */
5820declare const enum QueryFlags {
5821 /**
5822 * No flags
5823 */
5824 none = 0,
5825 /**
5826 * Whether or not the query should descend into children.
5827 */
5828 descendants = 1,
5829 /**
5830 * The query can be computed statically and hence can be assigned eagerly.
5831 *
5832 * NOTE: Backwards compatibility with ViewEngine.
5833 */
5834 isStatic = 2,
5835 /**
5836 * If the `QueryList` should fire change event only if actual change to query was computed (vs old
5837 * behavior where the change was fired whenever the query was recomputed, even if the recomputed
5838 * query resulted in the same list.)
5839 */
5840 emitDistinctChangesOnly = 4
5841}
5842
5843/**
5844 * An unmodifiable list of items that Angular keeps up to date when the state
5845 * of the application changes.
5846 *
5847 * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}
5848 * provide.
5849 *
5850 * Implements an iterable interface, therefore it can be used in both ES6
5851 * javascript `for (var i of items)` loops as well as in Angular templates with
5852 * `*ngFor="let i of myList"`.
5853 *
5854 * Changes can be observed by subscribing to the changes `Observable`.
5855 *
5856 * NOTE: In the future this class will implement an `Observable` interface.
5857 *
5858 * @usageNotes
5859 * ### Example
5860 * ```typescript
5861 * @Component({...})
5862 * class Container {
5863 * @ViewChildren(Item) items:QueryList<Item>;
5864 * }
5865 * ```
5866 *
5867 * @publicApi
5868 */
5869export declare class QueryList<T> implements Iterable<T> {
5870 private _emitDistinctChangesOnly;
5871 readonly dirty = true;
5872 private _results;
5873 private _changesDetected;
5874 private _changes;
5875 readonly length: number;
5876 readonly first: T;
5877 readonly last: T;
5878 /**
5879 * Returns `Observable` of `QueryList` notifying the subscriber of changes.
5880 */
5881 get changes(): Observable<any>;
5882 /**
5883 * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change
5884 * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in
5885 * the same result)
5886 */
5887 constructor(_emitDistinctChangesOnly?: boolean);
5888 /**
5889 * Returns the QueryList entry at `index`.
5890 */
5891 get(index: number): T | undefined;
5892 /**
5893 * See
5894 * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
5895 */
5896 map<U>(fn: (item: T, index: number, array: T[]) => U): U[];
5897 /**
5898 * See
5899 * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
5900 */
5901 filter(fn: (item: T, index: number, array: T[]) => boolean): T[];
5902 /**
5903 * See
5904 * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
5905 */
5906 find(fn: (item: T, index: number, array: T[]) => boolean): T | undefined;
5907 /**
5908 * See
5909 * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
5910 */
5911 reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U;
5912 /**
5913 * See
5914 * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
5915 */
5916 forEach(fn: (item: T, index: number, array: T[]) => void): void;
5917 /**
5918 * See
5919 * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
5920 */
5921 some(fn: (value: T, index: number, array: T[]) => boolean): boolean;
5922 /**
5923 * Returns a copy of the internal results list as an Array.
5924 */
5925 toArray(): T[];
5926 toString(): string;
5927 /**
5928 * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that
5929 * on change detection, it will not notify of changes to the queries, unless a new change
5930 * occurs.
5931 *
5932 * @param resultsTree The query results to store
5933 * @param identityAccessor Optional function for extracting stable object identity from a value
5934 * in the array. This function is executed for each element of the query result list while
5935 * comparing current query list with the new one (provided as a first argument of the `reset`
5936 * function) to detect if the lists are different. If the function is not provided, elements
5937 * are compared as is (without any pre-processing).
5938 */
5939 reset(resultsTree: Array<T | any[]>, identityAccessor?: (value: T) => unknown): void;
5940 /**
5941 * Triggers a change event by emitting on the `changes` {@link EventEmitter}.
5942 */
5943 notifyOnChanges(): void;
5944 /** internal */
5945 setDirty(): void;
5946 /** internal */
5947 destroy(): void;
5948 [Symbol.iterator]: () => Iterator<T>;
5949}
5950
5951declare interface R3DeclareComponentFacade extends R3DeclareDirectiveFacade {
5952 template: string;
5953 isInline?: boolean;
5954 styles?: string[];
5955 components?: R3DeclareUsedDirectiveFacade[];
5956 directives?: R3DeclareUsedDirectiveFacade[];
5957 pipes?: {
5958 [pipeName: string]: OpaqueValue | (() => OpaqueValue);
5959 };
5960 viewProviders?: OpaqueValue;
5961 animations?: OpaqueValue;
5962 changeDetection?: ChangeDetectionStrategy_2;
5963 encapsulation?: ViewEncapsulation_2;
5964 interpolation?: [string, string];
5965 preserveWhitespaces?: boolean;
5966}
5967
5968declare interface R3DeclareDependencyMetadataFacade {
5969 token: OpaqueValue;
5970 attribute?: boolean;
5971 host?: boolean;
5972 optional?: boolean;
5973 self?: boolean;
5974 skipSelf?: boolean;
5975}
5976
5977declare interface R3DeclareDirectiveFacade {
5978 selector?: string;
5979 type: Type_2;
5980 inputs?: {
5981 [classPropertyName: string]: string | [string, string];
5982 };
5983 outputs?: {
5984 [classPropertyName: string]: string;
5985 };
5986 host?: {
5987 attributes?: {
5988 [key: string]: OpaqueValue;
5989 };
5990 listeners?: {
5991 [key: string]: string;
5992 };
5993 properties?: {
5994 [key: string]: string;
5995 };
5996 classAttribute?: string;
5997 styleAttribute?: string;
5998 };
5999 queries?: R3DeclareQueryMetadataFacade[];
6000 viewQueries?: R3DeclareQueryMetadataFacade[];
6001 providers?: OpaqueValue;
6002 exportAs?: string[];
6003 usesInheritance?: boolean;
6004 usesOnChanges?: boolean;
6005}
6006
6007declare interface R3DeclareFactoryFacade {
6008 type: Type_2;
6009 deps: R3DeclareDependencyMetadataFacade[] | 'invalid' | null;
6010 target: ɵɵFactoryTarget;
6011}
6012
6013declare interface R3DeclareInjectableFacade {
6014 type: Type_2;
6015 providedIn?: Type_2 | 'root' | 'platform' | 'any' | null;
6016 useClass?: OpaqueValue;
6017 useFactory?: OpaqueValue;
6018 useExisting?: OpaqueValue;
6019 useValue?: OpaqueValue;
6020 deps?: R3DeclareDependencyMetadataFacade[];
6021}
6022
6023declare interface R3DeclareInjectorFacade {
6024 type: Type_2;
6025 imports?: OpaqueValue[];
6026 providers?: OpaqueValue[];
6027}
6028
6029declare interface R3DeclareNgModuleFacade {
6030 type: Type_2;
6031 bootstrap?: OpaqueValue[] | (() => OpaqueValue[]);
6032 declarations?: OpaqueValue[] | (() => OpaqueValue[]);
6033 imports?: OpaqueValue[] | (() => OpaqueValue[]);
6034 exports?: OpaqueValue[] | (() => OpaqueValue[]);
6035 schemas?: OpaqueValue[];
6036 id?: OpaqueValue;
6037}
6038
6039declare interface R3DeclarePipeFacade {
6040 type: Type_2;
6041 name: string;
6042 pure?: boolean;
6043}
6044
6045declare interface R3DeclareQueryMetadataFacade {
6046 propertyName: string;
6047 first?: boolean;
6048 predicate: OpaqueValue | string[];
6049 descendants?: boolean;
6050 read?: OpaqueValue;
6051 static?: boolean;
6052 emitDistinctChangesOnly?: boolean;
6053}
6054
6055declare interface R3DeclareUsedDirectiveFacade {
6056 selector: string;
6057 type: OpaqueValue | (() => OpaqueValue);
6058 inputs?: string[];
6059 outputs?: string[];
6060 exportAs?: string[];
6061}
6062
6063declare class R3Injector {
6064 readonly parent: Injector;
6065 /**
6066 * Map of tokens to records which contain the instances of those tokens.
6067 * - `null` value implies that we don't have the record. Used by tree-shakable injectors
6068 * to prevent further searches.
6069 */
6070 private records;
6071 /**
6072 * The transitive set of `InjectorType`s which define this injector.
6073 */
6074 private injectorDefTypes;
6075 /**
6076 * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
6077 */
6078 private onDestroy;
6079 /**
6080 * Flag indicating this injector provides the APP_ROOT_SCOPE token, and thus counts as the
6081 * root scope.
6082 */
6083 private readonly scope;
6084 readonly source: string | null;
6085 /**
6086 * Flag indicating that this injector was previously destroyed.
6087 */
6088 get destroyed(): boolean;
6089 private _destroyed;
6090 constructor(def: InjectorType<any>, additionalProviders: StaticProvider[] | null, parent: Injector, source?: string | null);
6091 /**
6092 * Destroy the injector and release references to every instance or provider associated with it.
6093 *
6094 * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
6095 * hook was found.
6096 */
6097 destroy(): void;
6098 get<T>(token: ProviderToken<T>, notFoundValue?: any, flags?: InjectFlags): T;
6099 toString(): string;
6100 private assertNotDestroyed;
6101 /**
6102 * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers
6103 * to this injector.
6104 *
6105 * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,
6106 * the function will return "true" to indicate that the providers of the type definition need
6107 * to be processed. This allows us to process providers of injector types after all imports of
6108 * an injector definition are processed. (following View Engine semantics: see FW-1349)
6109 */
6110 private processInjectorType;
6111 /**
6112 * Process a `SingleProvider` and add it.
6113 */
6114 private processProvider;
6115 private hydrate;
6116 private injectableDefInScope;
6117}
6118
6119declare interface RComment extends RNode {
6120 textContent: string | null;
6121}
6122
6123declare interface RCssStyleDeclaration {
6124 removeProperty(propertyName: string): string;
6125 setProperty(propertyName: string, value: string | null, priority?: string): void;
6126}
6127
6128declare interface RDomTokenList {
6129 add(token: string): void;
6130 remove(token: string): void;
6131}
6132
6133/**
6134 * `Dependency` is used by the framework to extend DI.
6135 * This is internal to Angular and should not be used directly.
6136 */
6137declare class ReflectiveDependency {
6138 key: ReflectiveKey;
6139 optional: boolean;
6140 visibility: Self | SkipSelf | null;
6141 constructor(key: ReflectiveKey, optional: boolean, visibility: Self | SkipSelf | null);
6142 static fromKey(key: ReflectiveKey): ReflectiveDependency;
6143}
6144
6145/**
6146 * A ReflectiveDependency injection container used for instantiating objects and resolving
6147 * dependencies.
6148 *
6149 * An `Injector` is a replacement for a `new` operator, which can automatically resolve the
6150 * constructor dependencies.
6151 *
6152 * In typical use, application code asks for the dependencies in the constructor and they are
6153 * resolved by the `Injector`.
6154 *
6155 * @usageNotes
6156 * ### Example
6157 *
6158 * The following example creates an `Injector` configured to create `Engine` and `Car`.
6159 *
6160 * ```typescript
6161 * @Injectable()
6162 * class Engine {
6163 * }
6164 *
6165 * @Injectable()
6166 * class Car {
6167 * constructor(public engine:Engine) {}
6168 * }
6169 *
6170 * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
6171 * var car = injector.get(Car);
6172 * expect(car instanceof Car).toBe(true);
6173 * expect(car.engine instanceof Engine).toBe(true);
6174 * ```
6175 *
6176 * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`
6177 * resolve all of the object's dependencies automatically.
6178 *
6179 * TODO: delete in v14.
6180 *
6181 * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.
6182 * @publicApi
6183 */
6184export declare abstract class ReflectiveInjector implements Injector {
6185 /**
6186 * Turns an array of provider definitions into an array of resolved providers.
6187 *
6188 * A resolution is a process of flattening multiple nested arrays and converting individual
6189 * providers into an array of `ResolvedReflectiveProvider`s.
6190 *
6191 * @usageNotes
6192 * ### Example
6193 *
6194 * ```typescript
6195 * @Injectable()
6196 * class Engine {
6197 * }
6198 *
6199 * @Injectable()
6200 * class Car {
6201 * constructor(public engine:Engine) {}
6202 * }
6203 *
6204 * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
6205 *
6206 * expect(providers.length).toEqual(2);
6207 *
6208 * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
6209 * expect(providers[0].key.displayName).toBe("Car");
6210 * expect(providers[0].dependencies.length).toEqual(1);
6211 * expect(providers[0].factory).toBeDefined();
6212 *
6213 * expect(providers[1].key.displayName).toBe("Engine");
6214 * });
6215 * ```
6216 *
6217 */
6218 static resolve(providers: Provider[]): ResolvedReflectiveProvider[];
6219 /**
6220 * Resolves an array of providers and creates an injector from those providers.
6221 *
6222 * The passed-in providers can be an array of `Type`, `Provider`,
6223 * or a recursive array of more providers.
6224 *
6225 * @usageNotes
6226 * ### Example
6227 *
6228 * ```typescript
6229 * @Injectable()
6230 * class Engine {
6231 * }
6232 *
6233 * @Injectable()
6234 * class Car {
6235 * constructor(public engine:Engine) {}
6236 * }
6237 *
6238 * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
6239 * expect(injector.get(Car) instanceof Car).toBe(true);
6240 * ```
6241 */
6242 static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector;
6243 /**
6244 * Creates an injector from previously resolved providers.
6245 *
6246 * This API is the recommended way to construct injectors in performance-sensitive parts.
6247 *
6248 * @usageNotes
6249 * ### Example
6250 *
6251 * ```typescript
6252 * @Injectable()
6253 * class Engine {
6254 * }
6255 *
6256 * @Injectable()
6257 * class Car {
6258 * constructor(public engine:Engine) {}
6259 * }
6260 *
6261 * var providers = ReflectiveInjector.resolve([Car, Engine]);
6262 * var injector = ReflectiveInjector.fromResolvedProviders(providers);
6263 * expect(injector.get(Car) instanceof Car).toBe(true);
6264 * ```
6265 */
6266 static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector;
6267 /**
6268 * Parent of this injector.
6269 *
6270 * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
6271 * -->
6272 */
6273 abstract get parent(): Injector | null;
6274 /**
6275 * Resolves an array of providers and creates a child injector from those providers.
6276 *
6277 * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
6278 * -->
6279 *
6280 * The passed-in providers can be an array of `Type`, `Provider`,
6281 * or a recursive array of more providers.
6282 *
6283 * @usageNotes
6284 * ### Example
6285 *
6286 * ```typescript
6287 * class ParentProvider {}
6288 * class ChildProvider {}
6289 *
6290 * var parent = ReflectiveInjector.resolveAndCreate([ParentProvider]);
6291 * var child = parent.resolveAndCreateChild([ChildProvider]);
6292 *
6293 * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
6294 * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
6295 * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
6296 * ```
6297 */
6298 abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
6299 /**
6300 * Creates a child injector from previously resolved providers.
6301 *
6302 * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
6303 * -->
6304 *
6305 * This API is the recommended way to construct injectors in performance-sensitive parts.
6306 *
6307 * @usageNotes
6308 * ### Example
6309 *
6310 * ```typescript
6311 * class ParentProvider {}
6312 * class ChildProvider {}
6313 *
6314 * var parentProviders = ReflectiveInjector.resolve([ParentProvider]);
6315 * var childProviders = ReflectiveInjector.resolve([ChildProvider]);
6316 *
6317 * var parent = ReflectiveInjector.fromResolvedProviders(parentProviders);
6318 * var child = parent.createChildFromResolved(childProviders);
6319 *
6320 * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
6321 * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
6322 * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
6323 * ```
6324 */
6325 abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
6326 /**
6327 * Resolves a provider and instantiates an object in the context of the injector.
6328 *
6329 * The created object does not get cached by the injector.
6330 *
6331 * @usageNotes
6332 * ### Example
6333 *
6334 * ```typescript
6335 * @Injectable()
6336 * class Engine {
6337 * }
6338 *
6339 * @Injectable()
6340 * class Car {
6341 * constructor(public engine:Engine) {}
6342 * }
6343 *
6344 * var injector = ReflectiveInjector.resolveAndCreate([Engine]);
6345 *
6346 * var car = injector.resolveAndInstantiate(Car);
6347 * expect(car.engine).toBe(injector.get(Engine));
6348 * expect(car).not.toBe(injector.resolveAndInstantiate(Car));
6349 * ```
6350 */
6351 abstract resolveAndInstantiate(provider: Provider): any;
6352 /**
6353 * Instantiates an object using a resolved provider in the context of the injector.
6354 *
6355 * The created object does not get cached by the injector.
6356 *
6357 * @usageNotes
6358 * ### Example
6359 *
6360 * ```typescript
6361 * @Injectable()
6362 * class Engine {
6363 * }
6364 *
6365 * @Injectable()
6366 * class Car {
6367 * constructor(public engine:Engine) {}
6368 * }
6369 *
6370 * var injector = ReflectiveInjector.resolveAndCreate([Engine]);
6371 * var carProvider = ReflectiveInjector.resolve([Car])[0];
6372 * var car = injector.instantiateResolved(carProvider);
6373 * expect(car.engine).toBe(injector.get(Engine));
6374 * expect(car).not.toBe(injector.instantiateResolved(carProvider));
6375 * ```
6376 */
6377 abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
6378 abstract get(token: any, notFoundValue?: any): any;
6379}
6380
6381
6382/**
6383 * A unique object used for retrieving items from the {@link ReflectiveInjector}.
6384 *
6385 * Keys have:
6386 * - a system-wide unique `id`.
6387 * - a `token`.
6388 *
6389 * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows
6390 * the
6391 * injector to store created objects in a more efficient way.
6392 *
6393 * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when
6394 * resolving
6395 * providers.
6396 *
6397 * @deprecated No replacement
6398 * @publicApi
6399 */
6400export declare class ReflectiveKey {
6401 token: Object;
6402 id: number;
6403 readonly displayName: string;
6404 /**
6405 * Private
6406 */
6407 constructor(token: Object, id: number);
6408 /**
6409 * Retrieves a `Key` for a token.
6410 */
6411 static get(token: Object): ReflectiveKey;
6412 /**
6413 * @returns the number of keys registered in the system.
6414 */
6415 static get numberOfKeys(): number;
6416}
6417
6418/**
6419 * Subset of API needed for writing attributes, properties, and setting up
6420 * listeners on Element.
6421 */
6422declare interface RElement extends RNode {
6423 style: RCssStyleDeclaration;
6424 classList: RDomTokenList;
6425 className: string;
6426 textContent: string | null;
6427 setAttribute(name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL): void;
6428 removeAttribute(name: string): void;
6429 setAttributeNS(namespaceURI: string, qualifiedName: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL): void;
6430 addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;
6431 removeEventListener(type: string, listener?: EventListener, options?: boolean): void;
6432 setProperty?(name: string, value: any): void;
6433}
6434
6435declare const RENDERER = 11;
6436
6437/**
6438 * Extend this base class to implement custom rendering. By default, Angular
6439 * renders a template into DOM. You can use custom rendering to intercept
6440 * rendering calls, or to render to something other than DOM.
6441 *
6442 * Create your custom renderer using `RendererFactory2`.
6443 *
6444 * Use a custom renderer to bypass Angular's templating and
6445 * make custom UI changes that can't be expressed declaratively.
6446 * For example if you need to set a property or an attribute whose name is
6447 * not statically known, use the `setProperty()` or
6448 * `setAttribute()` method.
6449 *
6450 * @publicApi
6451 */
6452export declare abstract class Renderer2 {
6453 /**
6454 * Use to store arbitrary developer-defined data on a renderer instance,
6455 * as an object containing key-value pairs.
6456 * This is useful for renderers that delegate to other renderers.
6457 */
6458 abstract get data(): {
6459 [key: string]: any;
6460 };
6461 /**
6462 * Implement this callback to destroy the renderer or the host element.
6463 */
6464 abstract destroy(): void;
6465 /**
6466 * Implement this callback to create an instance of the host element.
6467 * @param name An identifying name for the new element, unique within the namespace.
6468 * @param namespace The namespace for the new element.
6469 * @returns The new element.
6470 */
6471 abstract createElement(name: string, namespace?: string | null): any;
6472 /**
6473 * Implement this callback to add a comment to the DOM of the host element.
6474 * @param value The comment text.
6475 * @returns The modified element.
6476 */
6477 abstract createComment(value: string): any;
6478 /**
6479 * Implement this callback to add text to the DOM of the host element.
6480 * @param value The text string.
6481 * @returns The modified element.
6482 */
6483 abstract createText(value: string): any;
6484 /**
6485 * If null or undefined, the view engine won't call it.
6486 * This is used as a performance optimization for production mode.
6487 */
6488 destroyNode: ((node: any) => void) | null;
6489 /**
6490 * Appends a child to a given parent node in the host element DOM.
6491 * @param parent The parent node.
6492 * @param newChild The new child node.
6493 */
6494 abstract appendChild(parent: any, newChild: any): void;
6495 /**
6496 * Implement this callback to insert a child node at a given position in a parent node
6497 * in the host element DOM.
6498 * @param parent The parent node.
6499 * @param newChild The new child nodes.
6500 * @param refChild The existing child node before which `newChild` is inserted.
6501 * @param isMove Optional argument which signifies if the current `insertBefore` is a result of a
6502 * move. Animation uses this information to trigger move animations. In the past the Animation
6503 * would always assume that any `insertBefore` is a move. This is not strictly true because
6504 * with runtime i18n it is possible to invoke `insertBefore` as a result of i18n and it should
6505 * not trigger an animation move.
6506 */
6507 abstract insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void;
6508 /**
6509 * Implement this callback to remove a child node from the host element's DOM.
6510 * @param parent The parent node.
6511 * @param oldChild The child node to remove.
6512 * @param isHostElement Optionally signal to the renderer whether this element is a host element
6513 * or not
6514 */
6515 abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;
6516 /**
6517 * Implement this callback to prepare an element to be bootstrapped
6518 * as a root element, and return the element instance.
6519 * @param selectorOrNode The DOM element.
6520 * @param preserveContent Whether the contents of the root element
6521 * should be preserved, or cleared upon bootstrap (default behavior).
6522 * Use with `ViewEncapsulation.ShadowDom` to allow simple native
6523 * content projection via `<slot>` elements.
6524 * @returns The root element.
6525 */
6526 abstract selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): any;
6527 /**
6528 * Implement this callback to get the parent of a given node
6529 * in the host element's DOM.
6530 * @param node The child node to query.
6531 * @returns The parent node, or null if there is no parent.
6532 * For WebWorkers, always returns true.
6533 * This is because the check is synchronous,
6534 * and the caller can't rely on checking for null.
6535 */
6536 abstract parentNode(node: any): any;
6537 /**
6538 * Implement this callback to get the next sibling node of a given node
6539 * in the host element's DOM.
6540 * @returns The sibling node, or null if there is no sibling.
6541 * For WebWorkers, always returns a value.
6542 * This is because the check is synchronous,
6543 * and the caller can't rely on checking for null.
6544 */
6545 abstract nextSibling(node: any): any;
6546 /**
6547 * Implement this callback to set an attribute value for an element in the DOM.
6548 * @param el The element.
6549 * @param name The attribute name.
6550 * @param value The new value.
6551 * @param namespace The namespace.
6552 */
6553 abstract setAttribute(el: any, name: string, value: string, namespace?: string | null): void;
6554 /**
6555 * Implement this callback to remove an attribute from an element in the DOM.
6556 * @param el The element.
6557 * @param name The attribute name.
6558 * @param namespace The namespace.
6559 */
6560 abstract removeAttribute(el: any, name: string, namespace?: string | null): void;
6561 /**
6562 * Implement this callback to add a class to an element in the DOM.
6563 * @param el The element.
6564 * @param name The class name.
6565 */
6566 abstract addClass(el: any, name: string): void;
6567 /**
6568 * Implement this callback to remove a class from an element in the DOM.
6569 * @param el The element.
6570 * @param name The class name.
6571 */
6572 abstract removeClass(el: any, name: string): void;
6573 /**
6574 * Implement this callback to set a CSS style for an element in the DOM.
6575 * @param el The element.
6576 * @param style The name of the style.
6577 * @param value The new value.
6578 * @param flags Flags for style variations. No flags are set by default.
6579 */
6580 abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;
6581 /**
6582 * Implement this callback to remove the value from a CSS style for an element in the DOM.
6583 * @param el The element.
6584 * @param style The name of the style.
6585 * @param flags Flags for style variations to remove, if set. ???
6586 */
6587 abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;
6588 /**
6589 * Implement this callback to set the value of a property of an element in the DOM.
6590 * @param el The element.
6591 * @param name The property name.
6592 * @param value The new value.
6593 */
6594 abstract setProperty(el: any, name: string, value: any): void;
6595 /**
6596 * Implement this callback to set the value of a node in the host element.
6597 * @param node The node.
6598 * @param value The new value.
6599 */
6600 abstract setValue(node: any, value: string): void;
6601 /**
6602 * Implement this callback to start an event listener.
6603 * @param target The context in which to listen for events. Can be
6604 * the entire window or document, the body of the document, or a specific
6605 * DOM element.
6606 * @param eventName The event to listen for.
6607 * @param callback A handler function to invoke when the event occurs.
6608 * @returns An "unlisten" function for disposing of this handler.
6609 */
6610 abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void;
6611}
6612
6613declare type Renderer3 = ObjectOrientedRenderer3 | ProceduralRenderer3;
6614
6615declare const RENDERER_FACTORY = 10;
6616
6617/**
6618 * Creates and initializes a custom renderer that implements the `Renderer2` base class.
6619 *
6620 * @publicApi
6621 */
6622export declare abstract class RendererFactory2 {
6623 /**
6624 * Creates and initializes a custom renderer for a host DOM element.
6625 * @param hostElement The element to render.
6626 * @param type The base class to implement.
6627 * @returns The new custom renderer instance.
6628 */
6629 abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2;
6630 /**
6631 * A callback invoked when rendering has begun.
6632 */
6633 abstract begin?(): void;
6634 /**
6635 * A callback invoked when rendering has completed.
6636 */
6637 abstract end?(): void;
6638 /**
6639 * Use with animations test-only mode. Notifies the test when rendering has completed.
6640 * @returns The asynchronous result of the developer-defined function.
6641 */
6642 abstract whenRenderingDone?(): Promise<any>;
6643}
6644
6645declare interface RendererFactory3 {
6646 createRenderer(hostElement: RElement | null, rendererType: RendererType2 | null): Renderer3;
6647 begin?(): void;
6648 end?(): void;
6649}
6650
6651/**
6652 * Flags for renderer-specific style modifiers.
6653 * @publicApi
6654 */
6655export declare enum RendererStyleFlags2 {
6656 /**
6657 * Marks a style as important.
6658 */
6659 Important = 1,
6660 /**
6661 * Marks a style as using dash case naming (this-is-dash-case).
6662 */
6663 DashCase = 2
6664}
6665
6666declare enum RendererStyleFlags3 {
6667 Important = 1,
6668 DashCase = 2
6669}
6670
6671/**
6672 * Used by `RendererFactory2` to associate custom rendering data and styles
6673 * with a rendering implementation.
6674 * @publicApi
6675 */
6676export declare interface RendererType2 {
6677 /**
6678 * A unique identifying string for the new renderer, used when creating
6679 * unique styles for encapsulation.
6680 */
6681 id: string;
6682 /**
6683 * The view encapsulation type, which determines how styles are applied to
6684 * DOM elements. One of
6685 * - `Emulated` (default): Emulate native scoping of styles.
6686 * - `Native`: Use the native encapsulation mechanism of the renderer.
6687 * - `ShadowDom`: Use modern [Shadow
6688 * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
6689 * create a ShadowRoot for component's host element.
6690 * - `None`: Do not provide any template or style encapsulation.
6691 */
6692 encapsulation: ViewEncapsulation;
6693 /**
6694 * Defines CSS styles to be stored on a renderer instance.
6695 */
6696 styles: (string | any[])[];
6697 /**
6698 * Defines arbitrary developer-defined data to be stored on a renderer instance.
6699 * This is useful for renderers that delegate to other renderers.
6700 */
6701 data: {
6702 [kind: string]: any;
6703 };
6704}
6705
6706/**
6707 * An internal resolved representation of a factory function created by resolving `Provider`.
6708 * @publicApi
6709 */
6710export declare class ResolvedReflectiveFactory {
6711 /**
6712 * Factory function which can return an instance of an object represented by a key.
6713 */
6714 factory: Function;
6715 /**
6716 * Arguments (dependencies) to the `factory` function.
6717 */
6718 dependencies: ReflectiveDependency[];
6719 constructor(
6720 /**
6721 * Factory function which can return an instance of an object represented by a key.
6722 */
6723 factory: Function,
6724 /**
6725 * Arguments (dependencies) to the `factory` function.
6726 */
6727 dependencies: ReflectiveDependency[]);
6728}
6729
6730/**
6731 * An internal resolved representation of a `Provider` used by the `Injector`.
6732 *
6733 * @usageNotes
6734 * This is usually created automatically by `Injector.resolveAndCreate`.
6735 *
6736 * It can be created manually, as follows:
6737 *
6738 * ### Example
6739 *
6740 * ```typescript
6741 * var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);
6742 * var injector = Injector.fromResolvedProviders(resolvedProviders);
6743 *
6744 * expect(injector.get('message')).toEqual('Hello');
6745 * ```
6746 *
6747 * @publicApi
6748 */
6749export declare interface ResolvedReflectiveProvider {
6750 /**
6751 * A key, usually a `Type<any>`.
6752 */
6753 key: ReflectiveKey;
6754 /**
6755 * Factory function which can return an instance of an object represented by a key.
6756 */
6757 resolvedFactories: ResolvedReflectiveFactory[];
6758 /**
6759 * Indicates if the provider is a multi-provider or a regular provider.
6760 */
6761 multiProvider: boolean;
6762}
6763
6764/**
6765 * Lazily retrieves the reference value from a forwardRef.
6766 *
6767 * Acts as the identity function when given a non-forward-ref value.
6768 *
6769 * @usageNotes
6770 * ### Example
6771 *
6772 * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
6773 *
6774 * @see `forwardRef`
6775 * @publicApi
6776 */
6777export declare function resolveForwardRef<T>(type: T): T;
6778
6779/**
6780 * The goal here is to make sure that the browser DOM API is the Renderer.
6781 * We do this by defining a subset of DOM API to be the renderer and then
6782 * use that at runtime for rendering.
6783 *
6784 * At runtime we can then use the DOM api directly, in server or web-worker
6785 * it will be easy to implement such API.
6786 */
6787/** Subset of API needed for appending elements and text nodes. */
6788declare interface RNode {
6789 /**
6790 * Returns the parent Element, Document, or DocumentFragment
6791 */
6792 parentNode: RNode | null;
6793 /**
6794 * Returns the parent Element if there is one
6795 */
6796 parentElement: RElement | null;
6797 /**
6798 * Gets the Node immediately following this one in the parent's childNodes
6799 */
6800 nextSibling: RNode | null;
6801 /**
6802 * Removes a child from the current node and returns the removed node
6803 * @param oldChild the child node to remove
6804 */
6805 removeChild(oldChild: RNode): RNode;
6806 /**
6807 * Insert a child node.
6808 *
6809 * Used exclusively for adding View root nodes into ViewAnchor location.
6810 */
6811 insertBefore(newChild: RNode, refChild: RNode | null, isViewRoot: boolean): void;
6812 /**
6813 * Append a child node.
6814 *
6815 * Used exclusively for building up DOM which are static (ie not View roots)
6816 */
6817 appendChild(newChild: RNode): RNode;
6818}
6819
6820/**
6821 * RootContext contains information which is shared for all components which
6822 * were bootstrapped with {@link renderComponent}.
6823 */
6824declare interface RootContext {
6825 /**
6826 * A function used for scheduling change detection in the future. Usually
6827 * this is `requestAnimationFrame`.
6828 */
6829 scheduler: (workFn: () => void) => void;
6830 /**
6831 * A promise which is resolved when all components are considered clean (not dirty).
6832 *
6833 * This promise is overwritten every time a first call to {@link markDirty} is invoked.
6834 */
6835 clean: Promise<null>;
6836 /**
6837 * RootComponents - The components that were instantiated by the call to
6838 * {@link renderComponent}.
6839 */
6840 components: {}[];
6841 /**
6842 * The player flushing handler to kick off all animations
6843 */
6844 playerHandler: ɵPlayerHandler | null;
6845 /**
6846 * What render-related operations to run once a scheduler has been set
6847 */
6848 flags: RootContextFlags;
6849}
6850
6851declare const enum RootContextFlags {
6852 Empty = 0,
6853 DetectChanges = 1,
6854 FlushPlayers = 2
6855}
6856
6857declare interface RText extends RNode {
6858 textContent: string | null;
6859}
6860
6861
6862/**
6863 * The list of error codes used in runtime code of the `core` package.
6864 * Reserved error code range: 100-999.
6865 *
6866 * Note: the minus sign denotes the fact that a particular code has a detailed guide on
6867 * angular.io. This extra annotation is needed to avoid introducing a separate set to store
6868 * error codes which have guides, which might leak into runtime code.
6869 *
6870 * Full list of available error guides can be found at https://angular.io/errors.
6871 */
6872declare const enum RuntimeErrorCode {
6873 EXPRESSION_CHANGED_AFTER_CHECKED = -100,
6874 RECURSIVE_APPLICATION_REF_TICK = 101,
6875 CYCLIC_DI_DEPENDENCY = -200,
6876 PROVIDER_NOT_FOUND = -201,
6877 INVALID_FACTORY_DEPENDENCY = 202,
6878 MISSING_INJECTION_CONTEXT = 203,
6879 INVALID_INJECTION_TOKEN = 204,
6880 INJECTOR_ALREADY_DESTROYED = 205,
6881 MULTIPLE_COMPONENTS_MATCH = -300,
6882 EXPORT_NOT_FOUND = -301,
6883 PIPE_NOT_FOUND = -302,
6884 UNKNOWN_BINDING = 303,
6885 UNKNOWN_ELEMENT = 304,
6886 TEMPLATE_STRUCTURE_ERROR = 305,
6887 INVALID_EVENT_BINDING = 306,
6888 MULTIPLE_PLATFORMS = 400,
6889 PLATFORM_NOT_FOUND = 401,
6890 ERROR_HANDLER_NOT_FOUND = 402,
6891 BOOTSTRAP_COMPONENTS_NOT_FOUND = 403,
6892 ALREADY_DESTROYED_PLATFORM = 404,
6893 ASYNC_INITIALIZERS_STILL_RUNNING = 405,
6894 INVALID_I18N_STRUCTURE = 700,
6895 INVALID_DIFFER_INPUT = 900,
6896 NO_SUPPORTING_DIFFER_FACTORY = 901,
6897 VIEW_ALREADY_ATTACHED = 902,
6898 INVALID_INHERITANCE = 903,
6899 UNSAFE_VALUE_IN_RESOURCE_URL = 904,
6900 UNSAFE_VALUE_IN_SCRIPT = 905
6901}
6902
6903declare const SANITIZER = 12;
6904
6905/**
6906 * Sanitizer is used by the views to sanitize potentially dangerous values.
6907 *
6908 * @publicApi
6909 */
6910export declare abstract class Sanitizer {
6911 abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;
6912 /** @nocollapse */
6913 static ɵprov: unknown;
6914}
6915
6916/**
6917 * Function used to sanitize the value before writing it into the renderer.
6918 */
6919declare type SanitizerFn = (value: any, tagName?: string, propName?: string) => string | TrustedHTML | TrustedScript | TrustedScriptURL;
6920
6921
6922/**
6923 * A schema definition associated with an NgModule.
6924 *
6925 * @see `@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`
6926 *
6927 * @param name The name of a defined schema.
6928 *
6929 * @publicApi
6930 */
6931export declare interface SchemaMetadata {
6932 name: string;
6933}
6934
6935
6936/**
6937 * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
6938 * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
6939 * handled.
6940 *
6941 * See DomSanitizer for more details on security in Angular applications.
6942 *
6943 * @publicApi
6944 */
6945export declare enum SecurityContext {
6946 NONE = 0,
6947 HTML = 1,
6948 STYLE = 2,
6949 SCRIPT = 3,
6950 URL = 4,
6951 RESOURCE_URL = 5
6952}
6953
6954/** Flags used to build up CssSelectors */
6955declare const enum SelectorFlags {
6956 /** Indicates this is the beginning of a new negative selector */
6957 NOT = 1,
6958 /** Mode for matching attributes */
6959 ATTRIBUTE = 2,
6960 /** Mode for matching tag names */
6961 ELEMENT = 4,
6962 /** Mode for matching class names */
6963 CLASS = 8
6964}
6965
6966/**
6967 * Type of the Self metadata.
6968 *
6969 * @publicApi
6970 */
6971export declare interface Self {
6972}
6973
6974/**
6975 * Self decorator and metadata.
6976 *
6977 * @Annotation
6978 * @publicApi
6979 */
6980export declare const Self: SelfDecorator;
6981
6982/**
6983 * Type of the Self decorator / constructor function.
6984 *
6985 * @publicApi
6986 */
6987export declare interface SelfDecorator {
6988 /**
6989 * Parameter decorator to be used on constructor parameters,
6990 * which tells the DI framework to start dependency resolution from the local injector.
6991 *
6992 * Resolution works upward through the injector hierarchy, so the children
6993 * of this class must configure their own providers or be prepared for a `null` result.
6994 *
6995 * @usageNotes
6996 *
6997 * In the following example, the dependency can be resolved
6998 * by the local injector when instantiating the class itself, but not
6999 * when instantiating a child.
7000 *
7001 * <code-example path="core/di/ts/metadata_spec.ts" region="Self">
7002 * </code-example>
7003 *
7004 * @see `SkipSelf`
7005 * @see `Optional`
7006 *
7007 */
7008 (): any;
7009 new (): Self;
7010}
7011
7012/**
7013 * Set the {@link GetTestability} implementation used by the Angular testing framework.
7014 * @publicApi
7015 */
7016export declare function setTestabilityGetter(getter: GetTestability): void;
7017
7018
7019/**
7020 * Represents a basic change from a previous to a new value for a single
7021 * property on a directive instance. Passed as a value in a
7022 * {@link SimpleChanges} object to the `ngOnChanges` hook.
7023 *
7024 * @see `OnChanges`
7025 *
7026 * @publicApi
7027 */
7028export declare class SimpleChange {
7029 previousValue: any;
7030 currentValue: any;
7031 firstChange: boolean;
7032 constructor(previousValue: any, currentValue: any, firstChange: boolean);
7033 /**
7034 * Check whether the new value is the first value assigned.
7035 */
7036 isFirstChange(): boolean;
7037}
7038
7039/**
7040 * A hashtable of changes represented by {@link SimpleChange} objects stored
7041 * at the declared property name they belong to on a Directive or Component. This is
7042 * the type passed to the `ngOnChanges` hook.
7043 *
7044 * @see `OnChanges`
7045 *
7046 * @publicApi
7047 */
7048export declare interface SimpleChanges {
7049 [propName: string]: SimpleChange;
7050}
7051
7052/**
7053 * Type of the `SkipSelf` metadata.
7054 *
7055 * @publicApi
7056 */
7057export declare interface SkipSelf {
7058}
7059
7060/**
7061 * `SkipSelf` decorator and metadata.
7062 *
7063 * @Annotation
7064 * @publicApi
7065 */
7066export declare const SkipSelf: SkipSelfDecorator;
7067
7068/**
7069 * Type of the `SkipSelf` decorator / constructor function.
7070 *
7071 * @publicApi
7072 */
7073export declare interface SkipSelfDecorator {
7074 /**
7075 * Parameter decorator to be used on constructor parameters,
7076 * which tells the DI framework to start dependency resolution from the parent injector.
7077 * Resolution works upward through the injector hierarchy, so the local injector
7078 * is not checked for a provider.
7079 *
7080 * @usageNotes
7081 *
7082 * In the following example, the dependency can be resolved when
7083 * instantiating a child, but not when instantiating the class itself.
7084 *
7085 * <code-example path="core/di/ts/metadata_spec.ts" region="SkipSelf">
7086 * </code-example>
7087 *
7088 * @see [Dependency Injection guide](guide/dependency-injection-in-action#skip).
7089 * @see `Self`
7090 * @see `Optional`
7091 *
7092 */
7093 (): any;
7094 new (): SkipSelf;
7095}
7096
7097/**
7098 * Configures the `Injector` to return an instance of `useClass` for a token.
7099 * @see ["Dependency Injection Guide"](guide/dependency-injection).
7100 *
7101 * @usageNotes
7102 *
7103 * {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}
7104 *
7105 * Note that following two providers are not equal:
7106 *
7107 * {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}
7108 *
7109 * ### Multi-value example
7110 *
7111 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
7112 *
7113 * @publicApi
7114 */
7115export declare interface StaticClassProvider extends StaticClassSansProvider {
7116 /**
7117 * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
7118 */
7119 provide: any;
7120 /**
7121 * When true, injector returns an array of instances. This is useful to allow multiple
7122 * providers spread across many files to provide configuration information to a common token.
7123 */
7124 multi?: boolean;
7125}
7126
7127/**
7128 * Configures the `Injector` to return an instance of `useClass` for a token.
7129 * Base for `StaticClassProvider` decorator.
7130 *
7131 * @publicApi
7132 */
7133export declare interface StaticClassSansProvider {
7134 /**
7135 * An optional class to instantiate for the `token`. By default, the `provide`
7136 * class is instantiated.
7137 */
7138 useClass: Type<any>;
7139 /**
7140 * A list of `token`s to be resolved by the injector. The list of values is then
7141 * used as arguments to the `useClass` constructor.
7142 */
7143 deps: any[];
7144}
7145
7146/**
7147 * Describes how an `Injector` should be configured as static (that is, without reflection).
7148 * A static provider provides tokens to an injector for various types of dependencies.
7149 *
7150 * @see `Injector.create()`.
7151 * @see ["Dependency Injection Guide"](guide/dependency-injection-providers).
7152 *
7153 * @publicApi
7154 */
7155export declare type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[];
7156
7157declare const T_HOST = 6;
7158
7159/**
7160 * A combination of:
7161 * - Attribute names and values.
7162 * - Special markers acting as flags to alter attributes processing.
7163 * - Parsed ngProjectAs selectors.
7164 */
7165declare type TAttributes = (string | ɵAttributeMarker | CssSelector)[];
7166
7167/**
7168 * Constants that are associated with a view. Includes:
7169 * - Attribute arrays.
7170 * - Local definition arrays.
7171 * - Translated messages (i18n).
7172 */
7173declare type TConstants = (TAttributes | string)[];
7174
7175/**
7176 * Factory function that returns an array of consts. Consts can be represented as a function in
7177 * case any additional statements are required to define consts in the list. An example is i18n
7178 * where additional i18n calls are generated, which should be executed when consts are requested
7179 * for the first time.
7180 */
7181declare type TConstantsFactory = () => TConstants;
7182
7183/**
7184 * TConstants type that describes how the `consts` field is generated on ComponentDef: it can be
7185 * either an array or a factory function that returns that array.
7186 */
7187declare type TConstantsOrFactory = TConstants | TConstantsFactory;
7188
7189/** Static data for an LContainer */
7190declare interface TContainerNode extends TNode {
7191 /**
7192 * Index in the data[] array.
7193 *
7194 * If it's -1, this is a dynamically created container node that isn't stored in
7195 * data[] (e.g. when you inject ViewContainerRef) .
7196 */
7197 index: number;
7198 child: null;
7199 /**
7200 * Container nodes will have parents unless:
7201 *
7202 * - They are the first node of a component or embedded view
7203 * - They are dynamically created
7204 */
7205 parent: TElementNode | TElementContainerNode | null;
7206 tViews: TView | TView[] | null;
7207 projection: null;
7208 value: null;
7209}
7210
7211/**
7212 * Static data that corresponds to the instance-specific data array on an LView.
7213 *
7214 * Each node's static data is stored in tData at the same index that it's stored
7215 * in the data array. Any nodes that do not have static data store a null value in
7216 * tData to avoid a sparse array.
7217 *
7218 * Each pipe's definition is stored here at the same index as its pipe instance in
7219 * the data array.
7220 *
7221 * Each host property's name is stored here at the same index as its value in the
7222 * data array.
7223 *
7224 * Each property binding name is stored here at the same index as its value in
7225 * the data array. If the binding is an interpolation, the static string values
7226 * are stored parallel to the dynamic values. Example:
7227 *
7228 * id="prefix {{ v0 }} a {{ v1 }} b {{ v2 }} suffix"
7229 *
7230 * LView | TView.data
7231 *------------------------
7232 * v0 value | 'a'
7233 * v1 value | 'b'
7234 * v2 value | id � prefix � suffix
7235 *
7236 * Injector bloom filters are also stored here.
7237 */
7238declare type TData = (TNode | ɵPipeDef<any> | ɵDirectiveDef<any> | ɵComponentDef<any> | number | TStylingRange | TStylingKey | ProviderToken<any> | TI18n | I18nUpdateOpCodes | TIcu | null | string)[];
7239
7240/** Static data for an <ng-container> */
7241declare interface TElementContainerNode extends TNode {
7242 /** Index in the LView[] array. */
7243 index: number;
7244 child: TElementNode | TTextNode | TContainerNode | TElementContainerNode | TProjectionNode | null;
7245 parent: TElementNode | TElementContainerNode | null;
7246 tViews: null;
7247 projection: null;
7248}
7249
7250/** Static data for an element */
7251declare interface TElementNode extends TNode {
7252 /** Index in the data[] array */
7253 index: number;
7254 child: TElementNode | TTextNode | TElementContainerNode | TContainerNode | TProjectionNode | null;
7255 /**
7256 * Element nodes will have parents unless they are the first node of a component or
7257 * embedded view (which means their parent is in a different view and must be
7258 * retrieved using viewData[HOST_NODE]).
7259 */
7260 parent: TElementNode | TElementContainerNode | null;
7261 tViews: null;
7262 /**
7263 * If this is a component TNode with projection, this will be an array of projected
7264 * TNodes or native nodes (see TNode.projection for more info). If it's a regular element node
7265 * or a component without projection, it will be null.
7266 */
7267 projection: (TNode | RNode[])[] | null;
7268 /**
7269 * Stores TagName
7270 */
7271 value: string;
7272}
7273
7274/**
7275 * Represents an embedded template that can be used to instantiate embedded views.
7276 * To instantiate embedded views based on a template, use the `ViewContainerRef`
7277 * method `createEmbeddedView()`.
7278 *
7279 * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`
7280 * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view
7281 * is injected into the constructor of the directive,
7282 * using the `TemplateRef` token.
7283 *
7284 * You can also use a `Query` to find a `TemplateRef` associated with
7285 * a component or a directive.
7286 *
7287 * @see `ViewContainerRef`
7288 * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)
7289 *
7290 * @publicApi
7291 */
7292export declare abstract class TemplateRef<C> {
7293 /**
7294 * The anchor element in the parent view for this embedded view.
7295 *
7296 * The data-binding and injection contexts of embedded views created from this `TemplateRef`
7297 * inherit from the contexts of this location.
7298 *
7299 * Typically new embedded views are attached to the view container of this location, but in
7300 * advanced use-cases, the view can be attached to a different container while keeping the
7301 * data-binding and injection context from the original location.
7302 *
7303 */
7304 abstract readonly elementRef: ElementRef;
7305 /**
7306 * Instantiates an embedded view based on this template,
7307 * and attaches it to the view container.
7308 * @param context The data-binding context of the embedded view, as declared
7309 * in the `<ng-template>` usage.
7310 * @returns The new embedded view object.
7311 */
7312 abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
7313}
7314
7315/**
7316 * The Testability service provides testing hooks that can be accessed from
7317 * the browser. Each bootstrapped Angular application on the page will have
7318 * an instance of Testability.
7319 * @publicApi
7320 */
7321export declare class Testability implements PublicTestability {
7322 private _ngZone;
7323 private _pendingCount;
7324 private _isZoneStable;
7325 private _callbacks;
7326 private taskTrackingZone;
7327 constructor(_ngZone: NgZone);
7328 private _watchAngularEvents;
7329 /**
7330 * Increases the number of pending request
7331 * @deprecated pending requests are now tracked with zones.
7332 */
7333 increasePendingRequestCount(): number;
7334 /**
7335 * Decreases the number of pending request
7336 * @deprecated pending requests are now tracked with zones
7337 */
7338 decreasePendingRequestCount(): number;
7339 /**
7340 * Whether an associated application is stable
7341 */
7342 isStable(): boolean;
7343 private _runCallbacksIfReady;
7344 private getPendingTasks;
7345 private addCallback;
7346 /**
7347 * Wait for the application to be stable with a timeout. If the timeout is reached before that
7348 * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
7349 *
7350 * @param doneCb The callback to invoke when Angular is stable or the timeout expires
7351 * whichever comes first.
7352 * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
7353 * specified, whenStable() will wait forever.
7354 * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
7355 * pending macrotasks changes. If this callback returns true doneCb will not be invoked
7356 * and no further updates will be issued.
7357 */
7358 whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void;
7359 /**
7360 * Get the number of pending requests
7361 * @deprecated pending requests are now tracked with zones
7362 */
7363 getPendingRequestCount(): number;
7364 /**
7365 * Find providers by name
7366 * @param using The root element to search from
7367 * @param provider The name of binding variable
7368 * @param exactMatch Whether using exactMatch
7369 */
7370 findProviders(using: any, provider: string, exactMatch: boolean): any[];
7371 static ɵfac: i0.ɵɵFactoryDeclaration<Testability, never>;
7372 static ɵprov: i0.ɵɵInjectableDeclaration<Testability>;
7373}
7374
7375/**
7376 * A global registry of {@link Testability} instances for specific elements.
7377 * @publicApi
7378 */
7379export declare class TestabilityRegistry {
7380 constructor();
7381 /**
7382 * Registers an application with a testability hook so that it can be tracked
7383 * @param token token of application, root element
7384 * @param testability Testability hook
7385 */
7386 registerApplication(token: any, testability: Testability): void;
7387 /**
7388 * Unregisters an application.
7389 * @param token token of application, root element
7390 */
7391 unregisterApplication(token: any): void;
7392 /**
7393 * Unregisters all applications
7394 */
7395 unregisterAllApplications(): void;
7396 /**
7397 * Get a testability hook associated with the application
7398 * @param elem root element
7399 */
7400 getTestability(elem: any): Testability | null;
7401 /**
7402 * Get all registered testabilities
7403 */
7404 getAllTestabilities(): Testability[];
7405 /**
7406 * Get all registered applications(root elements)
7407 */
7408 getAllRootElements(): any[];
7409 /**
7410 * Find testability of a node in the Tree
7411 * @param elem node
7412 * @param findInAncestors whether finding testability in ancestors if testability was not found in
7413 * current node
7414 */
7415 findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability | null;
7416 static ɵfac: i0.ɵɵFactoryDeclaration<TestabilityRegistry, never>;
7417 static ɵprov: i0.ɵɵInjectableDeclaration<TestabilityRegistry>;
7418}
7419
7420/**
7421 * Store information for the i18n translation block.
7422 */
7423declare interface TI18n {
7424 /**
7425 * A set of OpCodes which will create the Text Nodes and ICU anchors for the translation blocks.
7426 *
7427 * NOTE: The ICU anchors are filled in with ICU Update OpCode.
7428 */
7429 create: I18nCreateOpCodes;
7430 /**
7431 * A set of OpCodes which will be executed on each change detection to determine if any changes to
7432 * DOM are required.
7433 */
7434 update: I18nUpdateOpCodes;
7435}
7436
7437declare interface TIcu {
7438 /**
7439 * Defines the ICU type of `select` or `plural`
7440 */
7441 type: IcuType;
7442 /**
7443 * Index in `LView` where the anchor node is stored. `<!-- ICU 0:0 -->`
7444 */
7445 anchorIdx: number;
7446 /**
7447 * Currently selected ICU case pointer.
7448 *
7449 * `lView[currentCaseLViewIndex]` stores the currently selected case. This is needed to know how
7450 * to clean up the current case when transitioning no the new case.
7451 *
7452 * If the value stored is:
7453 * `null`: No current case selected.
7454 * `<0`: A flag which means that the ICU just switched and that `icuUpdate` must be executed
7455 * regardless of the `mask`. (After the execution the flag is cleared)
7456 * `>=0` A currently selected case index.
7457 */
7458 currentCaseLViewIndex: number;
7459 /**
7460 * A list of case values which the current ICU will try to match.
7461 *
7462 * The last value is `other`
7463 */
7464 cases: any[];
7465 /**
7466 * A set of OpCodes to apply in order to build up the DOM render tree for the ICU
7467 */
7468 create: IcuCreateOpCodes[];
7469 /**
7470 * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.
7471 */
7472 remove: I18nRemoveOpCodes[];
7473 /**
7474 * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.
7475 */
7476 update: I18nUpdateOpCodes[];
7477}
7478
7479/**
7480 * Binding data (flyweight) for a particular node that is shared between all templates
7481 * of a specific type.
7482 *
7483 * If a property is:
7484 * - PropertyAliases: that property's data was generated and this is it
7485 * - Null: that property's data was already generated and nothing was found.
7486 * - Undefined: that property's data has not yet been generated
7487 *
7488 * see: https://en.wikipedia.org/wiki/Flyweight_pattern for more on the Flyweight pattern
7489 */
7490declare interface TNode {
7491 /** The type of the TNode. See TNodeType. */
7492 type: TNodeType;
7493 /**
7494 * Index of the TNode in TView.data and corresponding native element in LView.
7495 *
7496 * This is necessary to get from any TNode to its corresponding native element when
7497 * traversing the node tree.
7498 *
7499 * If index is -1, this is a dynamically created container node or embedded view node.
7500 */
7501 index: number;
7502 /**
7503 * Insert before existing DOM node index.
7504 *
7505 * When DOM nodes are being inserted, normally they are being appended as they are created.
7506 * Under i18n case, the translated text nodes are created ahead of time as part of the
7507 * `ɵɵi18nStart` instruction which means that this `TNode` can't just be appended and instead
7508 * needs to be inserted using `insertBeforeIndex` semantics.
7509 *
7510 * Additionally sometimes it is necessary to insert new text nodes as a child of this `TNode`. In
7511 * such a case the value stores an array of text nodes to insert.
7512 *
7513 * Example:
7514 * ```
7515 * <div i18n>
7516 * Hello <span>World</span>!
7517 * </div>
7518 * ```
7519 * In the above example the `ɵɵi18nStart` instruction can create `Hello `, `World` and `!` text
7520 * nodes. It can also insert `Hello ` and `!` text node as a child of `<div>`, but it can't
7521 * insert `World` because the `<span>` node has not yet been created. In such a case the
7522 * `<span>` `TNode` will have an array which will direct the `<span>` to not only insert
7523 * itself in front of `!` but also to insert the `World` (created by `ɵɵi18nStart`) into
7524 * `<span>` itself.
7525 *
7526 * Pseudo code:
7527 * ```
7528 * if (insertBeforeIndex === null) {
7529 * // append as normal
7530 * } else if (Array.isArray(insertBeforeIndex)) {
7531 * // First insert current `TNode` at correct location
7532 * const currentNode = lView[this.index];
7533 * parentNode.insertBefore(currentNode, lView[this.insertBeforeIndex[0]]);
7534 * // Now append all of the children
7535 * for(let i=1; i<this.insertBeforeIndex; i++) {
7536 * currentNode.appendChild(lView[this.insertBeforeIndex[i]]);
7537 * }
7538 * } else {
7539 * parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])
7540 * }
7541 * ```
7542 * - null: Append as normal using `parentNode.appendChild`
7543 * - `number`: Append using
7544 * `parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])`
7545 *
7546 * *Initialization*
7547 *
7548 * Because `ɵɵi18nStart` executes before nodes are created, on `TView.firstCreatePass` it is not
7549 * possible for `ɵɵi18nStart` to set the `insertBeforeIndex` value as the corresponding `TNode`
7550 * has not yet been created. For this reason the `ɵɵi18nStart` creates a `TNodeType.Placeholder`
7551 * `TNode` at that location. See `TNodeType.Placeholder` for more information.
7552 */
7553 insertBeforeIndex: InsertBeforeIndex;
7554 /**
7555 * The index of the closest injector in this node's LView.
7556 *
7557 * If the index === -1, there is no injector on this node or any ancestor node in this view.
7558 *
7559 * If the index !== -1, it is the index of this node's injector OR the index of a parent
7560 * injector in the same view. We pass the parent injector index down the node tree of a view so
7561 * it's possible to find the parent injector without walking a potentially deep node tree.
7562 * Injector indices are not set across view boundaries because there could be multiple component
7563 * hosts.
7564 *
7565 * If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent
7566 * injector.
7567 */
7568 injectorIndex: number;
7569 /**
7570 * Stores starting index of the directives.
7571 *
7572 * NOTE: The first directive is always component (if present).
7573 */
7574 directiveStart: number;
7575 /**
7576 * Stores final exclusive index of the directives.
7577 *
7578 * The area right behind the `directiveStart-directiveEnd` range is used to allocate the
7579 * `HostBindingFunction` `vars` (or null if no bindings.) Therefore `directiveEnd` is used to set
7580 * `LFrame.bindingRootIndex` before `HostBindingFunction` is executed.
7581 */
7582 directiveEnd: number;
7583 /**
7584 * Stores the last directive which had a styling instruction.
7585 *
7586 * Initial value of this is `-1` which means that no `hostBindings` styling instruction has
7587 * executed. As `hostBindings` instructions execute they set the value to the index of the
7588 * `DirectiveDef` which contained the last `hostBindings` styling instruction.
7589 *
7590 * Valid values are:
7591 * - `-1` No `hostBindings` instruction has executed.
7592 * - `directiveStart <= directiveStylingLast < directiveEnd`: Points to the `DirectiveDef` of
7593 * the last styling instruction which executed in the `hostBindings`.
7594 *
7595 * This data is needed so that styling instructions know which static styling data needs to be
7596 * collected from the `DirectiveDef.hostAttrs`. A styling instruction needs to collect all data
7597 * since last styling instruction.
7598 */
7599 directiveStylingLast: number;
7600 /**
7601 * Stores indexes of property bindings. This field is only set in the ngDevMode and holds
7602 * indexes of property bindings so TestBed can get bound property metadata for a given node.
7603 */
7604 propertyBindings: number[] | null;
7605 /**
7606 * Stores if Node isComponent, isProjected, hasContentQuery, hasClassInput and hasStyleInput
7607 * etc.
7608 */
7609 flags: TNodeFlags;
7610 /**
7611 * This number stores two values using its bits:
7612 *
7613 * - the index of the first provider on that node (first 16 bits)
7614 * - the count of view providers from the component on this node (last 16 bits)
7615 */
7616 providerIndexes: TNodeProviderIndexes;
7617 /**
7618 * The value name associated with this node.
7619 * if type:
7620 * `TNodeType.Text`: text value
7621 * `TNodeType.Element`: tag name
7622 * `TNodeType.ICUContainer`: `TIcu`
7623 */
7624 value: any;
7625 /**
7626 * Attributes associated with an element. We need to store attributes to support various
7627 * use-cases (attribute injection, content projection with selectors, directives matching).
7628 * Attributes are stored statically because reading them from the DOM would be way too slow for
7629 * content projection and queries.
7630 *
7631 * Since attrs will always be calculated first, they will never need to be marked undefined by
7632 * other instructions.
7633 *
7634 * For regular attributes a name of an attribute and its value alternate in the array.
7635 * e.g. ['role', 'checkbox']
7636 * This array can contain flags that will indicate "special attributes" (attributes with
7637 * namespaces, attributes extracted from bindings and outputs).
7638 */
7639 attrs: TAttributes | null;
7640 /**
7641 * Same as `TNode.attrs` but contains merged data across all directive host bindings.
7642 *
7643 * We need to keep `attrs` as unmerged so that it can be used for attribute selectors.
7644 * We merge attrs here so that it can be used in a performant way for initial rendering.
7645 *
7646 * The `attrs` are merged in first pass in following order:
7647 * - Component's `hostAttrs`
7648 * - Directives' `hostAttrs`
7649 * - Template `TNode.attrs` associated with the current `TNode`.
7650 */
7651 mergedAttrs: TAttributes | null;
7652 /**
7653 * A set of local names under which a given element is exported in a template and
7654 * visible to queries. An entry in this array can be created for different reasons:
7655 * - an element itself is referenced, ex.: `<div #foo>`
7656 * - a component is referenced, ex.: `<my-cmpt #foo>`
7657 * - a directive is referenced, ex.: `<my-cmpt #foo="directiveExportAs">`.
7658 *
7659 * A given element might have different local names and those names can be associated
7660 * with a directive. We store local names at even indexes while odd indexes are reserved
7661 * for directive index in a view (or `-1` if there is no associated directive).
7662 *
7663 * Some examples:
7664 * - `<div #foo>` => `["foo", -1]`
7665 * - `<my-cmpt #foo>` => `["foo", myCmptIdx]`
7666 * - `<my-cmpt #foo #bar="directiveExportAs">` => `["foo", myCmptIdx, "bar", directiveIdx]`
7667 * - `<div #foo #bar="directiveExportAs">` => `["foo", -1, "bar", directiveIdx]`
7668 */
7669 localNames: (string | number)[] | null;
7670 /** Information about input properties that need to be set once from attribute data. */
7671 initialInputs: InitialInputData | null | undefined;
7672 /**
7673 * Input data for all directives on this node. `null` means that there are no directives with
7674 * inputs on this node.
7675 */
7676 inputs: PropertyAliases | null;
7677 /**
7678 * Output data for all directives on this node. `null` means that there are no directives with
7679 * outputs on this node.
7680 */
7681 outputs: PropertyAliases | null;
7682 /**
7683 * The TView or TViews attached to this node.
7684 *
7685 * If this TNode corresponds to an LContainer with inline views, the container will
7686 * need to store separate static data for each of its view blocks (TView[]). Otherwise,
7687 * nodes in inline views with the same index as nodes in their parent views will overwrite
7688 * each other, as they are in the same template.
7689 *
7690 * Each index in this array corresponds to the static data for a certain
7691 * view. So if you had V(0) and V(1) in a container, you might have:
7692 *
7693 * [
7694 * [{tagName: 'div', attrs: ...}, null], // V(0) TView
7695 * [{tagName: 'button', attrs ...}, null] // V(1) TView
7696 *
7697 * If this TNode corresponds to an LContainer with a template (e.g. structural
7698 * directive), the template's TView will be stored here.
7699 *
7700 * If this TNode corresponds to an element, tViews will be null .
7701 */
7702 tViews: TView | TView[] | null;
7703 /**
7704 * The next sibling node. Necessary so we can propagate through the root nodes of a view
7705 * to insert them or remove them from the DOM.
7706 */
7707 next: TNode | null;
7708 /**
7709 * The next projected sibling. Since in Angular content projection works on the node-by-node
7710 * basis the act of projecting nodes might change nodes relationship at the insertion point
7711 * (target view). At the same time we need to keep initial relationship between nodes as
7712 * expressed in content view.
7713 */
7714 projectionNext: TNode | null;
7715 /**
7716 * First child of the current node.
7717 *
7718 * For component nodes, the child will always be a ContentChild (in same view).
7719 * For embedded view nodes, the child will be in their child view.
7720 */
7721 child: TNode | null;
7722 /**
7723 * Parent node (in the same view only).
7724 *
7725 * We need a reference to a node's parent so we can append the node to its parent's native
7726 * element at the appropriate time.
7727 *
7728 * If the parent would be in a different view (e.g. component host), this property will be null.
7729 * It's important that we don't try to cross component boundaries when retrieving the parent
7730 * because the parent will change (e.g. index, attrs) depending on where the component was
7731 * used (and thus shouldn't be stored on TNode). In these cases, we retrieve the parent through
7732 * LView.node instead (which will be instance-specific).
7733 *
7734 * If this is an inline view node (V), the parent will be its container.
7735 */
7736 parent: TElementNode | TContainerNode | null;
7737 /**
7738 * List of projected TNodes for a given component host element OR index into the said nodes.
7739 *
7740 * For easier discussion assume this example:
7741 * `<parent>`'s view definition:
7742 * ```
7743 * <child id="c1">content1</child>
7744 * <child id="c2"><span>content2</span></child>
7745 * ```
7746 * `<child>`'s view definition:
7747 * ```
7748 * <ng-content id="cont1"></ng-content>
7749 * ```
7750 *
7751 * If `Array.isArray(projection)` then `TNode` is a host element:
7752 * - `projection` stores the content nodes which are to be projected.
7753 * - The nodes represent categories defined by the selector: For example:
7754 * `<ng-content/><ng-content select="abc"/>` would represent the heads for `<ng-content/>`
7755 * and `<ng-content select="abc"/>` respectively.
7756 * - The nodes we store in `projection` are heads only, we used `.next` to get their
7757 * siblings.
7758 * - The nodes `.next` is sorted/rewritten as part of the projection setup.
7759 * - `projection` size is equal to the number of projections `<ng-content>`. The size of
7760 * `c1` will be `1` because `<child>` has only one `<ng-content>`.
7761 * - we store `projection` with the host (`c1`, `c2`) rather than the `<ng-content>` (`cont1`)
7762 * because the same component (`<child>`) can be used in multiple locations (`c1`, `c2`) and
7763 * as a result have different set of nodes to project.
7764 * - without `projection` it would be difficult to efficiently traverse nodes to be projected.
7765 *
7766 * If `typeof projection == 'number'` then `TNode` is a `<ng-content>` element:
7767 * - `projection` is an index of the host's `projection`Nodes.
7768 * - This would return the first head node to project:
7769 * `getHost(currentTNode).projection[currentTNode.projection]`.
7770 * - When projecting nodes the parent node retrieved may be a `<ng-content>` node, in which case
7771 * the process is recursive in nature.
7772 *
7773 * If `projection` is of type `RNode[][]` than we have a collection of native nodes passed as
7774 * projectable nodes during dynamic component creation.
7775 */
7776 projection: (TNode | RNode[])[] | number | null;
7777 /**
7778 * A collection of all `style` static values for an element (including from host).
7779 *
7780 * This field will be populated if and when:
7781 *
7782 * - There are one or more initial `style`s on an element (e.g. `<div style="width:200px;">`)
7783 * - There are one or more initial `style`s on a directive/component host
7784 * (e.g. `@Directive({host: {style: "width:200px;" } }`)
7785 */
7786 styles: string | null;
7787 /**
7788 * A collection of all `style` static values for an element excluding host sources.
7789 *
7790 * Populated when there are one or more initial `style`s on an element
7791 * (e.g. `<div style="width:200px;">`)
7792 * Must be stored separately from `tNode.styles` to facilitate setting directive
7793 * inputs that shadow the `style` property. If we used `tNode.styles` as is for shadowed inputs,
7794 * we would feed host styles back into directives as "inputs". If we used `tNode.attrs`, we
7795 * would have to concatenate the attributes on every template pass. Instead, we process once on
7796 * first create pass and store here.
7797 */
7798 stylesWithoutHost: string | null;
7799 /**
7800 * A `KeyValueArray` version of residual `styles`.
7801 *
7802 * When there are styling instructions than each instruction stores the static styling
7803 * which is of lower priority than itself. This means that there may be a higher priority
7804 * styling than the instruction.
7805 *
7806 * Imagine:
7807 * ```
7808 * <div style="color: highest;" my-dir>
7809 *
7810 * @Directive({
7811 * host: {
7812 * style: 'color: lowest; ',
7813 * '[styles.color]': 'exp' // ɵɵstyleProp('color', ctx.exp);
7814 * }
7815 * })
7816 * ```
7817 *
7818 * In the above case:
7819 * - `color: lowest` is stored with `ɵɵstyleProp('color', ctx.exp);` instruction
7820 * - `color: highest` is the residual and is stored here.
7821 *
7822 * - `undefined': not initialized.
7823 * - `null`: initialized but `styles` is `null`
7824 * - `KeyValueArray`: parsed version of `styles`.
7825 */
7826 residualStyles: KeyValueArray<any> | undefined | null;
7827 /**
7828 * A collection of all class static values for an element (including from host).
7829 *
7830 * This field will be populated if and when:
7831 *
7832 * - There are one or more initial classes on an element (e.g. `<div class="one two three">`)
7833 * - There are one or more initial classes on an directive/component host
7834 * (e.g. `@Directive({host: {class: "SOME_CLASS" } }`)
7835 */
7836 classes: string | null;
7837 /**
7838 * A collection of all class static values for an element excluding host sources.
7839 *
7840 * Populated when there are one or more initial classes on an element
7841 * (e.g. `<div class="SOME_CLASS">`)
7842 * Must be stored separately from `tNode.classes` to facilitate setting directive
7843 * inputs that shadow the `class` property. If we used `tNode.classes` as is for shadowed
7844 * inputs, we would feed host classes back into directives as "inputs". If we used
7845 * `tNode.attrs`, we would have to concatenate the attributes on every template pass. Instead,
7846 * we process once on first create pass and store here.
7847 */
7848 classesWithoutHost: string | null;
7849 /**
7850 * A `KeyValueArray` version of residual `classes`.
7851 *
7852 * Same as `TNode.residualStyles` but for classes.
7853 *
7854 * - `undefined': not initialized.
7855 * - `null`: initialized but `classes` is `null`
7856 * - `KeyValueArray`: parsed version of `classes`.
7857 */
7858 residualClasses: KeyValueArray<any> | undefined | null;
7859 /**
7860 * Stores the head/tail index of the class bindings.
7861 *
7862 * - If no bindings, the head and tail will both be 0.
7863 * - If there are template bindings, stores the head/tail of the class bindings in the template.
7864 * - If no template bindings but there are host bindings, the head value will point to the last
7865 * host binding for "class" (not the head of the linked list), tail will be 0.
7866 *
7867 * See: `style_binding_list.ts` for details.
7868 *
7869 * This is used by `insertTStylingBinding` to know where the next styling binding should be
7870 * inserted so that they can be sorted in priority order.
7871 */
7872 classBindings: TStylingRange;
7873 /**
7874 * Stores the head/tail index of the class bindings.
7875 *
7876 * - If no bindings, the head and tail will both be 0.
7877 * - If there are template bindings, stores the head/tail of the style bindings in the template.
7878 * - If no template bindings but there are host bindings, the head value will point to the last
7879 * host binding for "style" (not the head of the linked list), tail will be 0.
7880 *
7881 * See: `style_binding_list.ts` for details.
7882 *
7883 * This is used by `insertTStylingBinding` to know where the next styling binding should be
7884 * inserted so that they can be sorted in priority order.
7885 */
7886 styleBindings: TStylingRange;
7887}
7888
7889/**
7890 * Corresponds to the TNode.flags property.
7891 */
7892declare const enum TNodeFlags {
7893 /** Bit #1 - This bit is set if the node is a host for any directive (including a component) */
7894 isDirectiveHost = 1,
7895 /**
7896 * Bit #2 - This bit is set if the node is a host for a component.
7897 *
7898 * Setting this bit implies that the `isDirectiveHost` bit is set as well.
7899 * */
7900 isComponentHost = 2,
7901 /** Bit #3 - This bit is set if the node has been projected */
7902 isProjected = 4,
7903 /** Bit #4 - This bit is set if any directive on this node has content queries */
7904 hasContentQuery = 8,
7905 /** Bit #5 - This bit is set if the node has any "class" inputs */
7906 hasClassInput = 16,
7907 /** Bit #6 - This bit is set if the node has any "style" inputs */
7908 hasStyleInput = 32,
7909 /** Bit #7 This bit is set if the node has been detached by i18n */
7910 isDetached = 64,
7911 /**
7912 * Bit #8 - This bit is set if the node has directives with host bindings.
7913 *
7914 * This flags allows us to guard host-binding logic and invoke it only on nodes
7915 * that actually have directives with host bindings.
7916 */
7917 hasHostBindings = 128
7918}
7919
7920/**
7921 * Corresponds to the TNode.providerIndexes property.
7922 */
7923declare const enum TNodeProviderIndexes {
7924 /** The index of the first provider on this node is encoded on the least significant bits. */
7925 ProvidersStartIndexMask = 1048575,
7926 /**
7927 * The count of view providers from the component on this node is
7928 * encoded on the 20 most significant bits.
7929 */
7930 CptViewProvidersCountShift = 20,
7931 CptViewProvidersCountShifter = 1048576
7932}
7933
7934/**
7935 * TNodeType corresponds to the {@link TNode} `type` property.
7936 *
7937 * NOTE: type IDs are such that we use each bit to denote a type. This is done so that we can easily
7938 * check if the `TNode` is of more than one type.
7939 *
7940 * `if (tNode.type === TNodeType.Text || tNode.type === TNode.Element)`
7941 * can be written as:
7942 * `if (tNode.type & (TNodeType.Text | TNodeType.Element))`
7943 *
7944 * However any given `TNode` can only be of one type.
7945 */
7946declare const enum TNodeType {
7947 /**
7948 * The TNode contains information about a DOM element aka {@link RText}.
7949 */
7950 Text = 1,
7951 /**
7952 * The TNode contains information about a DOM element aka {@link RElement}.
7953 */
7954 Element = 2,
7955 /**
7956 * The TNode contains information about an {@link LContainer} for embedded views.
7957 */
7958 Container = 4,
7959 /**
7960 * The TNode contains information about an `<ng-container>` element {@link RNode}.
7961 */
7962 ElementContainer = 8,
7963 /**
7964 * The TNode contains information about an `<ng-content>` projection
7965 */
7966 Projection = 16,
7967 /**
7968 * The TNode contains information about an ICU comment used in `i18n`.
7969 */
7970 Icu = 32,
7971 /**
7972 * Special node type representing a placeholder for future `TNode` at this location.
7973 *
7974 * I18n translation blocks are created before the element nodes which they contain. (I18n blocks
7975 * can span over many elements.) Because i18n `TNode`s (representing text) are created first they
7976 * often may need to point to element `TNode`s which are not yet created. In such a case we create
7977 * a `Placeholder` `TNode`. This allows the i18n to structurally link the `TNode`s together
7978 * without knowing any information about the future nodes which will be at that location.
7979 *
7980 * On `firstCreatePass` When element instruction executes it will try to create a `TNode` at that
7981 * location. Seeing a `Placeholder` `TNode` already there tells the system that it should reuse
7982 * existing `TNode` (rather than create a new one) and just update the missing information.
7983 */
7984 Placeholder = 64,
7985 AnyRNode = 3,
7986 AnyContainer = 12
7987}
7988
7989/**
7990 * Type representing a set of TNodes that can have local refs (`#foo`) placed on them.
7991 */
7992declare type TNodeWithLocalRefs = TContainerNode | TElementNode | TElementContainerNode;
7993
7994/** Static data for an LProjectionNode */
7995declare interface TProjectionNode extends TNode {
7996 /** Index in the data[] array */
7997 child: null;
7998 /**
7999 * Projection nodes will have parents unless they are the first node of a component
8000 * or embedded view (which means their parent is in a different view and must be
8001 * retrieved using LView.node).
8002 */
8003 parent: TElementNode | TElementContainerNode | null;
8004 tViews: null;
8005 /** Index of the projection node. (See TNode.projection for more info.) */
8006 projection: number;
8007 value: null;
8008}
8009
8010/**
8011 * TQueries represent a collection of individual TQuery objects tracked in a given view. Most of the
8012 * methods on this interface are simple proxy methods to the corresponding functionality on TQuery.
8013 */
8014declare interface TQueries {
8015 /**
8016 * Adds a new TQuery to a collection of queries tracked in a given view.
8017 * @param tQuery
8018 */
8019 track(tQuery: TQuery): void;
8020 /**
8021 * Returns a TQuery instance for at the given index in the queries array.
8022 * @param index
8023 */
8024 getByIndex(index: number): TQuery;
8025 /**
8026 * Returns the number of queries tracked in a given view.
8027 */
8028 length: number;
8029 /**
8030 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8031 * `elementStart` on each and every TQuery.
8032 * @param tView
8033 * @param tNode
8034 */
8035 elementStart(tView: TView, tNode: TNode): void;
8036 /**
8037 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8038 * `elementEnd` on each and every TQuery.
8039 * @param tNode
8040 */
8041 elementEnd(tNode: TNode): void;
8042 /**
8043 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8044 * `template` on each and every TQuery.
8045 * @param tView
8046 * @param tNode
8047 */
8048 template(tView: TView, tNode: TNode): void;
8049 /**
8050 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8051 * `embeddedTView` on each and every TQuery.
8052 * @param tNode
8053 */
8054 embeddedTView(tNode: TNode): TQueries | null;
8055}
8056
8057/**
8058 * TQuery objects represent all the query-related data that remain the same from one view instance
8059 * to another and can be determined on the very first template pass. Most notably TQuery holds all
8060 * the matches for a given view.
8061 */
8062declare interface TQuery {
8063 /**
8064 * Query metadata extracted from query annotations.
8065 */
8066 metadata: TQueryMetadata;
8067 /**
8068 * Index of a query in a declaration view in case of queries propagated to en embedded view, -1
8069 * for queries declared in a given view. We are storing this index so we can find a parent query
8070 * to clone for an embedded view (when an embedded view is created).
8071 */
8072 indexInDeclarationView: number;
8073 /**
8074 * Matches collected on the first template pass. Each match is a pair of:
8075 * - TNode index;
8076 * - match index;
8077 *
8078 * A TNode index can be either:
8079 * - a positive number (the most common case) to indicate a matching TNode;
8080 * - a negative number to indicate that a given query is crossing a <ng-template> element and
8081 * results from views created based on TemplateRef should be inserted at this place.
8082 *
8083 * A match index is a number used to find an actual value (for a given node) when query results
8084 * are materialized. This index can have one of the following values:
8085 * - -2 - indicates that we need to read a special token (TemplateRef, ViewContainerRef etc.);
8086 * - -1 - indicates that we need to read a default value based on the node type (TemplateRef for
8087 * ng-template and ElementRef for other elements);
8088 * - a positive number - index of an injectable to be read from the element injector.
8089 */
8090 matches: number[] | null;
8091 /**
8092 * A flag indicating if a given query crosses an <ng-template> element. This flag exists for
8093 * performance reasons: we can notice that queries not crossing any <ng-template> elements will
8094 * have matches from a given view only (and adapt processing accordingly).
8095 */
8096 crossesNgTemplate: boolean;
8097 /**
8098 * A method call when a given query is crossing an element (or element container). This is where a
8099 * given TNode is matched against a query predicate.
8100 * @param tView
8101 * @param tNode
8102 */
8103 elementStart(tView: TView, tNode: TNode): void;
8104 /**
8105 * A method called when processing the elementEnd instruction - this is mostly useful to determine
8106 * if a given content query should match any nodes past this point.
8107 * @param tNode
8108 */
8109 elementEnd(tNode: TNode): void;
8110 /**
8111 * A method called when processing the template instruction. This is where a
8112 * given TContainerNode is matched against a query predicate.
8113 * @param tView
8114 * @param tNode
8115 */
8116 template(tView: TView, tNode: TNode): void;
8117 /**
8118 * A query-related method called when an embedded TView is created based on the content of a
8119 * <ng-template> element. We call this method to determine if a given query should be propagated
8120 * to the embedded view and if so - return a cloned TQuery for this embedded view.
8121 * @param tNode
8122 * @param childQueryIndex
8123 */
8124 embeddedTView(tNode: TNode, childQueryIndex: number): TQuery | null;
8125}
8126
8127/**
8128 * An object representing query metadata extracted from query annotations.
8129 */
8130declare interface TQueryMetadata {
8131 predicate: ProviderToken<unknown> | string[];
8132 read: any;
8133 flags: QueryFlags;
8134}
8135
8136/**
8137 * A function optionally passed into the `NgForOf` directive to customize how `NgForOf` uniquely
8138 * identifies items in an iterable.
8139 *
8140 * `NgForOf` needs to uniquely identify items in the iterable to correctly perform DOM updates
8141 * when items in the iterable are reordered, new items are added, or existing items are removed.
8142 *
8143 *
8144 * In all of these scenarios it is usually desirable to only update the DOM elements associated
8145 * with the items affected by the change. This behavior is important to:
8146 *
8147 * - preserve any DOM-specific UI state (like cursor position, focus, text selection) when the
8148 * iterable is modified
8149 * - enable animation of item addition, removal, and iterable reordering
8150 * - preserve the value of the `<select>` element when nested `<option>` elements are dynamically
8151 * populated using `NgForOf` and the bound iterable is updated
8152 *
8153 * A common use for custom `trackBy` functions is when the model that `NgForOf` iterates over
8154 * contains a property with a unique identifier. For example, given a model:
8155 *
8156 * ```ts
8157 * class User {
8158 * id: number;
8159 * name: string;
8160 * ...
8161 * }
8162 * ```
8163 * a custom `trackBy` function could look like the following:
8164 * ```ts
8165 * function userTrackBy(index, user) {
8166 * return user.id;
8167 * }
8168 * ```
8169 *
8170 * A custom `trackBy` function must have several properties:
8171 *
8172 * - be [idempotent](https://en.wikipedia.org/wiki/Idempotence) (be without side effects, and always
8173 * return the same value for a given input)
8174 * - return unique value for all unique inputs
8175 * - be fast
8176 *
8177 * @see [`NgForOf#ngForTrackBy`](api/common/NgForOf#ngForTrackBy)
8178 * @publicApi
8179 */
8180export declare interface TrackByFunction<T> {
8181 /**
8182 * @param index The index of the item within the iterable.
8183 * @param item The item in the iterable.
8184 */
8185 <U extends T>(index: number, item: T & U): any;
8186}
8187
8188/**
8189 * Use this token at bootstrap to provide the content of your translation file (`xtb`,
8190 * `xlf` or `xlf2`) when you want to translate your application in another language.
8191 *
8192 * See the [i18n guide](guide/i18n-common-merge) for more information.
8193 *
8194 * @usageNotes
8195 * ### Example
8196 *
8197 * ```typescript
8198 * import { TRANSLATIONS } from '@angular/core';
8199 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
8200 * import { AppModule } from './app/app.module';
8201 *
8202 * // content of your translation file
8203 * const translations = '....';
8204 *
8205 * platformBrowserDynamic().bootstrapModule(AppModule, {
8206 * providers: [{provide: TRANSLATIONS, useValue: translations }]
8207 * });
8208 * ```
8209 *
8210 * @publicApi
8211 */
8212export declare const TRANSLATIONS: InjectionToken<string>;
8213
8214/**
8215 * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,
8216 * `xlf` or `xlf2`.
8217 *
8218 * See the [i18n guide](guide/i18n-common-merge) for more information.
8219 *
8220 * @usageNotes
8221 * ### Example
8222 *
8223 * ```typescript
8224 * import { TRANSLATIONS_FORMAT } from '@angular/core';
8225 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
8226 * import { AppModule } from './app/app.module';
8227 *
8228 * platformBrowserDynamic().bootstrapModule(AppModule, {
8229 * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]
8230 * });
8231 * ```
8232 *
8233 * @publicApi
8234 */
8235export declare const TRANSLATIONS_FORMAT: InjectionToken<string>;
8236
8237declare const TRANSPLANTED_VIEWS_TO_REFRESH = 5;
8238
8239
8240/**
8241 * @fileoverview
8242 * While Angular only uses Trusted Types internally for the time being,
8243 * references to Trusted Types could leak into our core.d.ts, which would force
8244 * anyone compiling against @angular/core to provide the @types/trusted-types
8245 * package in their compilation unit.
8246 *
8247 * Until https://github.com/microsoft/TypeScript/issues/30024 is resolved, we
8248 * will keep Angular's public API surface free of references to Trusted Types.
8249 * For internal and semi-private APIs that need to reference Trusted Types, the
8250 * minimal type definitions for the Trusted Types API provided by this module
8251 * should be used instead. They are marked as "declare" to prevent them from
8252 * being renamed by compiler optimization.
8253 *
8254 * Adapted from
8255 * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/trusted-types/index.d.ts
8256 * but restricted to the API surface used within Angular.
8257 */
8258declare interface TrustedHTML {
8259 __brand__: 'TrustedHTML';
8260}
8261
8262declare interface TrustedScript {
8263 __brand__: 'TrustedScript';
8264}
8265
8266declare interface TrustedScriptURL {
8267 __brand__: 'TrustedScriptURL';
8268}
8269
8270/**
8271 * Value stored in the `TData` which is needed to re-concatenate the styling.
8272 *
8273 * See: `TStylingKeyPrimitive` and `TStylingStatic`
8274 */
8275declare type TStylingKey = TStylingKeyPrimitive | TStylingStatic;
8276
8277/**
8278 * The primitive portion (`TStylingStatic` removed) of the value stored in the `TData` which is
8279 * needed to re-concatenate the styling.
8280 *
8281 * - `string`: Stores the property name. Used with `ɵɵstyleProp`/`ɵɵclassProp` instruction.
8282 * - `null`: Represents map, so there is no name. Used with `ɵɵstyleMap`/`ɵɵclassMap`.
8283 * - `false`: Represents an ignore case. This happens when `ɵɵstyleProp`/`ɵɵclassProp` instruction
8284 * is combined with directive which shadows its input `@Input('class')`. That way the binding
8285 * should not participate in the styling resolution.
8286 */
8287declare type TStylingKeyPrimitive = string | null | false;
8288
8289/**
8290 * This is a branded number which contains previous and next index.
8291 *
8292 * When we come across styling instructions we need to store the `TStylingKey` in the correct
8293 * order so that we can re-concatenate the styling value in the desired priority.
8294 *
8295 * The insertion can happen either at the:
8296 * - end of template as in the case of coming across additional styling instruction in the template
8297 * - in front of the template in the case of coming across additional instruction in the
8298 * `hostBindings`.
8299 *
8300 * We use `TStylingRange` to store the previous and next index into the `TData` where the template
8301 * bindings can be found.
8302 *
8303 * - bit 0 is used to mark that the previous index has a duplicate for current value.
8304 * - bit 1 is used to mark that the next index has a duplicate for the current value.
8305 * - bits 2-16 are used to encode the next/tail of the template.
8306 * - bits 17-32 are used to encode the previous/head of template.
8307 *
8308 * NODE: *duplicate* false implies that it is statically known that this binding will not collide
8309 * with other bindings and therefore there is no need to check other bindings. For example the
8310 * bindings in `<div [style.color]="exp" [style.width]="exp">` will never collide and will have
8311 * their bits set accordingly. Previous duplicate means that we may need to check previous if the
8312 * current binding is `null`. Next duplicate means that we may need to check next bindings if the
8313 * current binding is not `null`.
8314 *
8315 * NOTE: `0` has special significance and represents `null` as in no additional pointer.
8316 */
8317declare interface TStylingRange {
8318 __brand__: 'TStylingRange';
8319}
8320
8321/**
8322 * Store the static values for the styling binding.
8323 *
8324 * The `TStylingStatic` is just `KeyValueArray` where key `""` (stored at location 0) contains the
8325 * `TStylingKey` (stored at location 1). In other words this wraps the `TStylingKey` such that the
8326 * `""` contains the wrapped value.
8327 *
8328 * When instructions are resolving styling they may need to look forward or backwards in the linked
8329 * list to resolve the value. For this reason we have to make sure that he linked list also contains
8330 * the static values. However the list only has space for one item per styling instruction. For this
8331 * reason we store the static values here as part of the `TStylingKey`. This means that the
8332 * resolution function when looking for a value needs to first look at the binding value, and than
8333 * at `TStylingKey` (if it exists).
8334 *
8335 * Imagine we have:
8336 *
8337 * ```
8338 * <div class="TEMPLATE" my-dir>
8339 *
8340 * @Directive({
8341 * host: {
8342 * class: 'DIR',
8343 * '[class.dynamic]': 'exp' // ɵɵclassProp('dynamic', ctx.exp);
8344 * }
8345 * })
8346 * ```
8347 *
8348 * In the above case the linked list will contain one item:
8349 *
8350 * ```
8351 * // assume binding location: 10 for `ɵɵclassProp('dynamic', ctx.exp);`
8352 * tData[10] = <TStylingStatic>[
8353 * '': 'dynamic', // This is the wrapped value of `TStylingKey`
8354 * 'DIR': true, // This is the default static value of directive binding.
8355 * ];
8356 * tData[10 + 1] = 0; // We don't have prev/next.
8357 *
8358 * lView[10] = undefined; // assume `ctx.exp` is `undefined`
8359 * lView[10 + 1] = undefined; // Just normalized `lView[10]`
8360 * ```
8361 *
8362 * So when the function is resolving styling value, it first needs to look into the linked list
8363 * (there is none) and than into the static `TStylingStatic` too see if there is a default value for
8364 * `dynamic` (there is not). Therefore it is safe to remove it.
8365 *
8366 * If setting `true` case:
8367 * ```
8368 * lView[10] = true; // assume `ctx.exp` is `true`
8369 * lView[10 + 1] = true; // Just normalized `lView[10]`
8370 * ```
8371 * So when the function is resolving styling value, it first needs to look into the linked list
8372 * (there is none) and than into `TNode.residualClass` (TNode.residualStyle) which contains
8373 * ```
8374 * tNode.residualClass = [
8375 * 'TEMPLATE': true,
8376 * ];
8377 * ```
8378 *
8379 * This means that it is safe to add class.
8380 */
8381declare interface TStylingStatic extends KeyValueArray<any> {
8382}
8383
8384/** Static data for a text node */
8385declare interface TTextNode extends TNode {
8386 /** Index in the data[] array */
8387 index: number;
8388 child: null;
8389 /**
8390 * Text nodes will have parents unless they are the first node of a component or
8391 * embedded view (which means their parent is in a different view and must be
8392 * retrieved using LView.node).
8393 */
8394 parent: TElementNode | TElementContainerNode | null;
8395 tViews: null;
8396 projection: null;
8397}
8398
8399declare const TVIEW = 1;
8400
8401/**
8402 * The static data for an LView (shared between all templates of a
8403 * given type).
8404 *
8405 * Stored on the `ComponentDef.tView`.
8406 */
8407declare interface TView {
8408 /**
8409 * Type of `TView` (`Root`|`Component`|`Embedded`).
8410 */
8411 type: TViewType;
8412 /**
8413 * This is a blueprint used to generate LView instances for this TView. Copying this
8414 * blueprint is faster than creating a new LView from scratch.
8415 */
8416 blueprint: LView;
8417 /**
8418 * The template function used to refresh the view of dynamically created views
8419 * and components. Will be null for inline views.
8420 */
8421 template: ComponentTemplate<{}> | null;
8422 /**
8423 * A function containing query-related instructions.
8424 */
8425 viewQuery: ViewQueriesFunction<{}> | null;
8426 /**
8427 * A `TNode` representing the declaration location of this `TView` (not part of this TView).
8428 */
8429 declTNode: TNode | null;
8430 /** Whether or not this template has been processed in creation mode. */
8431 firstCreatePass: boolean;
8432 /**
8433 * Whether or not this template has been processed in update mode (e.g. change detected)
8434 *
8435 * `firstUpdatePass` is used by styling to set up `TData` to contain metadata about the styling
8436 * instructions. (Mainly to build up a linked list of styling priority order.)
8437 *
8438 * Typically this function gets cleared after first execution. If exception is thrown then this
8439 * flag can remain turned un until there is first successful (no exception) pass. This means that
8440 * individual styling instructions keep track of if they have already been added to the linked
8441 * list to prevent double adding.
8442 */
8443 firstUpdatePass: boolean;
8444 /** Static data equivalent of LView.data[]. Contains TNodes, PipeDefInternal or TI18n. */
8445 data: TData;
8446 /**
8447 * The binding start index is the index at which the data array
8448 * starts to store bindings only. Saving this value ensures that we
8449 * will begin reading bindings at the correct point in the array when
8450 * we are in update mode.
8451 *
8452 * -1 means that it has not been initialized.
8453 */
8454 bindingStartIndex: number;
8455 /**
8456 * The index where the "expando" section of `LView` begins. The expando
8457 * section contains injectors, directive instances, and host binding values.
8458 * Unlike the "decls" and "vars" sections of `LView`, the length of this
8459 * section cannot be calculated at compile-time because directives are matched
8460 * at runtime to preserve locality.
8461 *
8462 * We store this start index so we know where to start checking host bindings
8463 * in `setHostBindings`.
8464 */
8465 expandoStartIndex: number;
8466 /**
8467 * Whether or not there are any static view queries tracked on this view.
8468 *
8469 * We store this so we know whether or not we should do a view query
8470 * refresh after creation mode to collect static query results.
8471 */
8472 staticViewQueries: boolean;
8473 /**
8474 * Whether or not there are any static content queries tracked on this view.
8475 *
8476 * We store this so we know whether or not we should do a content query
8477 * refresh after creation mode to collect static query results.
8478 */
8479 staticContentQueries: boolean;
8480 /**
8481 * A reference to the first child node located in the view.
8482 */
8483 firstChild: TNode | null;
8484 /**
8485 * Stores the OpCodes to be replayed during change-detection to process the `HostBindings`
8486 *
8487 * See `HostBindingOpCodes` for encoding details.
8488 */
8489 hostBindingOpCodes: HostBindingOpCodes | null;
8490 /**
8491 * Full registry of directives and components that may be found in this view.
8492 *
8493 * It's necessary to keep a copy of the full def list on the TView so it's possible
8494 * to render template functions without a host component.
8495 */
8496 directiveRegistry: DirectiveDefList | null;
8497 /**
8498 * Full registry of pipes that may be found in this view.
8499 *
8500 * The property is either an array of `PipeDefs`s or a function which returns the array of
8501 * `PipeDefs`s. The function is necessary to be able to support forward declarations.
8502 *
8503 * It's necessary to keep a copy of the full def list on the TView so it's possible
8504 * to render template functions without a host component.
8505 */
8506 pipeRegistry: PipeDefList | null;
8507 /**
8508 * Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in
8509 * creation mode.
8510 *
8511 * This array has a flat structure and contains TNode indices, directive indices (where an
8512 * instance can be found in `LView`) and hook functions. TNode index is followed by the directive
8513 * index and a hook function. If there are multiple hooks for a given TNode, the TNode index is
8514 * not repeated and the next lifecycle hook information is stored right after the previous hook
8515 * function. This is done so that at runtime the system can efficiently iterate over all of the
8516 * functions to invoke without having to make any decisions/lookups.
8517 */
8518 preOrderHooks: HookData | null;
8519 /**
8520 * Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.
8521 *
8522 * This array has the same structure as the `preOrderHooks` one.
8523 */
8524 preOrderCheckHooks: HookData | null;
8525 /**
8526 * Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed
8527 * for this view in creation mode.
8528 *
8529 * Even indices: Directive index
8530 * Odd indices: Hook function
8531 */
8532 contentHooks: HookData | null;
8533 /**
8534 * Array of ngAfterContentChecked hooks that should be executed for this view in update
8535 * mode.
8536 *
8537 * Even indices: Directive index
8538 * Odd indices: Hook function
8539 */
8540 contentCheckHooks: HookData | null;
8541 /**
8542 * Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for
8543 * this view in creation mode.
8544 *
8545 * Even indices: Directive index
8546 * Odd indices: Hook function
8547 */
8548 viewHooks: HookData | null;
8549 /**
8550 * Array of ngAfterViewChecked hooks that should be executed for this view in
8551 * update mode.
8552 *
8553 * Even indices: Directive index
8554 * Odd indices: Hook function
8555 */
8556 viewCheckHooks: HookData | null;
8557 /**
8558 * Array of ngOnDestroy hooks that should be executed when this view is destroyed.
8559 *
8560 * Even indices: Directive index
8561 * Odd indices: Hook function
8562 */
8563 destroyHooks: DestroyHookData | null;
8564 /**
8565 * When a view is destroyed, listeners need to be released and outputs need to be
8566 * unsubscribed. This cleanup array stores both listener data (in chunks of 4)
8567 * and output data (in chunks of 2) for a particular view. Combining the arrays
8568 * saves on memory (70 bytes per array) and on a few bytes of code size (for two
8569 * separate for loops).
8570 *
8571 * If it's a native DOM listener or output subscription being stored:
8572 * 1st index is: event name `name = tView.cleanup[i+0]`
8573 * 2nd index is: index of native element or a function that retrieves global target (window,
8574 * document or body) reference based on the native element:
8575 * `typeof idxOrTargetGetter === 'function'`: global target getter function
8576 * `typeof idxOrTargetGetter === 'number'`: index of native element
8577 *
8578 * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`
8579 * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`
8580 * `typeof useCaptureOrIndx == 'boolean' : useCapture boolean
8581 * `typeof useCaptureOrIndx == 'number':
8582 * `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`
8583 * `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`
8584 *
8585 * If it's an output subscription or query list destroy hook:
8586 * 1st index is: output unsubscribe function / query list destroy function
8587 * 2nd index is: index of function context in LView.cleanupInstances[]
8588 * `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`
8589 */
8590 cleanup: any[] | null;
8591 /**
8592 * A list of element indices for child components that will need to be
8593 * refreshed when the current view has finished its check. These indices have
8594 * already been adjusted for the HEADER_OFFSET.
8595 *
8596 */
8597 components: number[] | null;
8598 /**
8599 * A collection of queries tracked in a given view.
8600 */
8601 queries: TQueries | null;
8602 /**
8603 * An array of indices pointing to directives with content queries alongside with the
8604 * corresponding query index. Each entry in this array is a tuple of:
8605 * - index of the first content query index declared by a given directive;
8606 * - index of a directive.
8607 *
8608 * We are storing those indexes so we can refresh content queries as part of a view refresh
8609 * process.
8610 */
8611 contentQueries: number[] | null;
8612 /**
8613 * Set of schemas that declare elements to be allowed inside the view.
8614 */
8615 schemas: SchemaMetadata[] | null;
8616 /**
8617 * Array of constants for the view. Includes attribute arrays, local definition arrays etc.
8618 * Used for directive matching, attribute bindings, local definitions and more.
8619 */
8620 consts: TConstants | null;
8621 /**
8622 * Indicates that there was an error before we managed to complete the first create pass of the
8623 * view. This means that the view is likely corrupted and we should try to recover it.
8624 */
8625 incompleteFirstPass: boolean;
8626}
8627
8628/**
8629 * Explicitly marks `TView` as a specific type in `ngDevMode`
8630 *
8631 * It is useful to know conceptually what time of `TView` we are dealing with when
8632 * debugging an application (even if the runtime does not need it.) For this reason
8633 * we store this information in the `ngDevMode` `TView` and than use it for
8634 * better debugging experience.
8635 */
8636declare const enum TViewType {
8637 /**
8638 * Root `TView` is the used to bootstrap components into. It is used in conjunction with
8639 * `LView` which takes an existing DOM node not owned by Angular and wraps it in `TView`/`LView`
8640 * so that other components can be loaded into it.
8641 */
8642 Root = 0,
8643 /**
8644 * `TView` associated with a Component. This would be the `TView` directly associated with the
8645 * component view (as opposed an `Embedded` `TView` which would be a child of `Component` `TView`)
8646 */
8647 Component = 1,
8648 /**
8649 * `TView` associated with a template. Such as `*ngIf`, `<ng-template>` etc... A `Component`
8650 * can have zero or more `Embedede` `TView`s.
8651 */
8652 Embedded = 2
8653}
8654
8655/**
8656 * Special location which allows easy identification of type. If we have an array which was
8657 * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is
8658 * `LContainer`.
8659 */
8660declare const TYPE = 1;
8661
8662/**
8663 * @description
8664 *
8665 * Represents a type that a Component or other object is instances of.
8666 *
8667 * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by
8668 * the `MyCustomComponent` constructor function.
8669 *
8670 * @publicApi
8671 */
8672export declare const Type: FunctionConstructor;
8673
8674export declare interface Type<T> extends Function {
8675 new (...args: any[]): T;
8676}
8677
8678declare type Type_2 = Function;
8679
8680/**
8681 * An interface implemented by all Angular type decorators, which allows them to be used as
8682 * decorators as well as Angular syntax.
8683 *
8684 * ```
8685 * @ng.Component({...})
8686 * class MyClass {...}
8687 * ```
8688 *
8689 * @publicApi
8690 */
8691export declare interface TypeDecorator {
8692 /**
8693 * Invoke as decorator.
8694 */
8695 <T extends Type<any>>(type: T): T;
8696 (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
8697}
8698
8699/**
8700 * Configures the `Injector` to return an instance of `Type` when `Type' is used as the token.
8701 *
8702 * Create an instance by invoking the `new` operator and supplying additional arguments.
8703 * This form is a short form of `TypeProvider`;
8704 *
8705 * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
8706 *
8707 * @usageNotes
8708 *
8709 * {@example core/di/ts/provider_spec.ts region='TypeProvider'}
8710 *
8711 * @publicApi
8712 */
8713export declare interface TypeProvider extends Type<any> {
8714}
8715
8716/**
8717 * Configures the `Injector` to return a value for a token.
8718 * @see ["Dependency Injection Guide"](guide/dependency-injection).
8719 *
8720 * @usageNotes
8721 *
8722 * ### Example
8723 *
8724 * {@example core/di/ts/provider_spec.ts region='ValueProvider'}
8725 *
8726 * ### Multi-value example
8727 *
8728 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
8729 *
8730 * @publicApi
8731 */
8732export declare interface ValueProvider extends ValueSansProvider {
8733 /**
8734 * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
8735 */
8736 provide: any;
8737 /**
8738 * When true, injector returns an array of instances. This is useful to allow multiple
8739 * providers spread across many files to provide configuration information to a common token.
8740 */
8741 multi?: boolean;
8742}
8743
8744/**
8745 * Configures the `Injector` to return a value for a token.
8746 * Base for `ValueProvider` decorator.
8747 *
8748 * @publicApi
8749 */
8750export declare interface ValueSansProvider {
8751 /**
8752 * The value to inject.
8753 */
8754 useValue: any;
8755}
8756
8757/**
8758 * @publicApi
8759 */
8760export declare const VERSION: Version;
8761
8762
8763/**
8764 * @description Represents the version of Angular
8765 *
8766 * @publicApi
8767 */
8768export declare class Version {
8769 full: string;
8770 readonly major: string;
8771 readonly minor: string;
8772 readonly patch: string;
8773 constructor(full: string);
8774}
8775
8776declare const VIEW_REFS = 8;
8777
8778/**
8779 * Type of the ViewChild metadata.
8780 *
8781 * @publicApi
8782 */
8783export declare type ViewChild = Query;
8784
8785/**
8786 * ViewChild decorator and metadata.
8787 *
8788 * @Annotation
8789 * @publicApi
8790 */
8791export declare const ViewChild: ViewChildDecorator;
8792
8793/**
8794 * Type of the ViewChild decorator / constructor function.
8795 *
8796 * @see `ViewChild`.
8797 * @publicApi
8798 */
8799export declare interface ViewChildDecorator {
8800 /**
8801 * @description
8802 * Property decorator that configures a view query.
8803 * The change detector looks for the first element or the directive matching the selector
8804 * in the view DOM. If the view DOM changes, and a new child matches the selector,
8805 * the property is updated.
8806 *
8807 * View queries are set before the `ngAfterViewInit` callback is called.
8808 *
8809 * **Metadata Properties**:
8810 *
8811 * * **selector** - The directive type or the name used for querying.
8812 * * **read** - Used to read a different token from the queried elements.
8813 * * **static** - True to resolve query results before change detection runs,
8814 * false to resolve after change detection. Defaults to false.
8815 *
8816 *
8817 * The following selectors are supported.
8818 * * Any class with the `@Component` or `@Directive` decorator
8819 * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
8820 * with `@ViewChild('cmp')`)
8821 * * Any provider defined in the child component tree of the current component (e.g.
8822 * `@ViewChild(SomeService) someService: SomeService`)
8823 * * Any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:
8824 * any`)
8825 * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)
8826 * template;`)
8827 *
8828 * The following values are supported by `read`:
8829 * * Any class with the `@Component` or `@Directive` decorator
8830 * * Any provider defined on the injector of the component that is matched by the `selector` of
8831 * this query
8832 * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
8833 * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
8834 *
8835 * @usageNotes
8836 *
8837 * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}
8838 *
8839 * ### Example 2
8840 *
8841 * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}
8842 *
8843 * @Annotation
8844 */
8845 (selector: ProviderToken<unknown> | Function | string, opts?: {
8846 read?: any;
8847 static?: boolean;
8848 }): any;
8849 new (selector: ProviderToken<unknown> | Function | string, opts?: {
8850 read?: any;
8851 static?: boolean;
8852 }): ViewChild;
8853}
8854
8855/**
8856 * Type of the ViewChildren metadata.
8857 *
8858 * @publicApi
8859 */
8860export declare type ViewChildren = Query;
8861
8862/**
8863 * ViewChildren decorator and metadata.
8864 *
8865 * @Annotation
8866 * @publicApi
8867 */
8868export declare const ViewChildren: ViewChildrenDecorator;
8869
8870/**
8871 * Type of the ViewChildren decorator / constructor function.
8872 *
8873 * @see `ViewChildren`.
8874 *
8875 * @publicApi
8876 */
8877export declare interface ViewChildrenDecorator {
8878 /**
8879 * @description
8880 * Property decorator that configures a view query.
8881 *
8882 * Use to get the `QueryList` of elements or directives from the view DOM.
8883 * Any time a child element is added, removed, or moved, the query list will be updated,
8884 * and the changes observable of the query list will emit a new value.
8885 *
8886 * View queries are set before the `ngAfterViewInit` callback is called.
8887 *
8888 * **Metadata Properties**:
8889 *
8890 * * **selector** - The directive type or the name used for querying.
8891 * * **read** - Used to read a different token from the queried elements.
8892 * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only
8893 * if the QueryList result has changed. When `false` the `changes` observable might emit even
8894 * if the QueryList has not changed.
8895 * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and
8896 * removed in future versions of Angular.
8897 *
8898 * The following selectors are supported.
8899 * * Any class with the `@Component` or `@Directive` decorator
8900 * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
8901 * with `@ViewChildren('cmp')`)
8902 * * Any provider defined in the child component tree of the current component (e.g.
8903 * `@ViewChildren(SomeService) someService!: SomeService`)
8904 * * Any provider defined through a string token (e.g. `@ViewChildren('someToken')
8905 * someTokenVal!: any`)
8906 * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChildren(TemplateRef)
8907 * template;`)
8908 *
8909 * In addition, multiple string selectors can be separated with a comma (e.g.
8910 * `@ViewChildren('cmp1,cmp2')`)
8911 *
8912 * The following values are supported by `read`:
8913 * * Any class with the `@Component` or `@Directive` decorator
8914 * * Any provider defined on the injector of the component that is matched by the `selector` of
8915 * this query
8916 * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
8917 * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
8918 *
8919 * @usageNotes
8920 *
8921 * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}
8922 *
8923 * ### Another example
8924 *
8925 * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'}
8926 *
8927 * @Annotation
8928 */
8929 (selector: ProviderToken<unknown> | Function | string, opts?: {
8930 read?: any;
8931 emitDistinctChangesOnly?: boolean;
8932 }): any;
8933 new (selector: ProviderToken<unknown> | Function | string, opts?: {
8934 read?: any;
8935 emitDistinctChangesOnly?: boolean;
8936 }): ViewChildren;
8937}
8938
8939/**
8940 * Represents a container where one or more views can be attached to a component.
8941 *
8942 * Can contain *host views* (created by instantiating a
8943 * component with the `createComponent()` method), and *embedded views*
8944 * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
8945 *
8946 * A view container instance can contain other view containers,
8947 * creating a [view hierarchy](guide/glossary#view-tree).
8948 *
8949 * @see `ComponentRef`
8950 * @see `EmbeddedViewRef`
8951 *
8952 * @publicApi
8953 */
8954export declare abstract class ViewContainerRef {
8955 /**
8956 * Anchor element that specifies the location of this container in the containing view.
8957 * Each view container can have only one anchor element, and each anchor element
8958 * can have only a single view container.
8959 *
8960 * Root elements of views attached to this container become siblings of the anchor element in
8961 * the rendered view.
8962 *
8963 * Access the `ViewContainerRef` of an element by placing a `Directive` injected
8964 * with `ViewContainerRef` on the element, or use a `ViewChild` query.
8965 *
8966 * <!-- TODO: rename to anchorElement -->
8967 */
8968 abstract get element(): ElementRef;
8969 /**
8970 * The [dependency injector](guide/glossary#injector) for this view container.
8971 */
8972 abstract get injector(): Injector;
8973 /** @deprecated No replacement */
8974 abstract get parentInjector(): Injector;
8975 /**
8976 * Destroys all views in this container.
8977 */
8978 abstract clear(): void;
8979 /**
8980 * Retrieves a view from this container.
8981 * @param index The 0-based index of the view to retrieve.
8982 * @returns The `ViewRef` instance, or null if the index is out of range.
8983 */
8984 abstract get(index: number): ViewRef | null;
8985 /**
8986 * Reports how many views are currently attached to this container.
8987 * @returns The number of views.
8988 */
8989 abstract get length(): number;
8990 /**
8991 * Instantiates an embedded view and inserts it
8992 * into this container.
8993 * @param templateRef The HTML template that defines the view.
8994 * @param context The data-binding context of the embedded view, as declared
8995 * in the `<ng-template>` usage.
8996 * @param index The 0-based index at which to insert the new view into this container.
8997 * If not specified, appends the new view as the last entry.
8998 *
8999 * @returns The `ViewRef` instance for the newly created view.
9000 */
9001 abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
9002 /**
9003 * Instantiates a single component and inserts its host view into this container.
9004 *
9005 * @param componentType Component Type to use.
9006 * @param options An object that contains extra parameters:
9007 * * index: the index at which to insert the new component's host view into this container.
9008 * If not specified, appends the new view as the last entry.
9009 * * injector: the injector to use as the parent for the new component.
9010 * * ngModuleRef: an NgModuleRef of the component's NgModule, you should almost always provide
9011 * this to ensure that all expected providers are available for the component
9012 * instantiation.
9013 * * projectableNodes: list of DOM nodes that should be projected through
9014 * [`<ng-content>`](api/core/ng-content) of the new component instance.
9015 *
9016 * @returns The new `ComponentRef` which contains the component instance and the host view.
9017 */
9018 abstract createComponent<C>(componentType: Type<C>, options?: {
9019 index?: number;
9020 injector?: Injector;
9021 ngModuleRef?: NgModuleRef<unknown>;
9022 projectableNodes?: Node[][];
9023 }): ComponentRef<C>;
9024 /**
9025 * Instantiates a single component and inserts its host view into this container.
9026 *
9027 * @param componentFactory Component factory to use.
9028 * @param index The index at which to insert the new component's host view into this container.
9029 * If not specified, appends the new view as the last entry.
9030 * @param injector The injector to use as the parent for the new component.
9031 * @param projectableNodes List of DOM nodes that should be projected through
9032 * [`<ng-content>`](api/core/ng-content) of the new component instance.
9033 * @param ngModuleRef An instance of the NgModuleRef that represent an NgModule.
9034 * This information is used to retrieve corresponding NgModule injector.
9035 *
9036 * @returns The new `ComponentRef` which contains the component instance and the host view.
9037 *
9038 * @deprecated Angular no longer requires component factories to dynamically create components.
9039 * Use different signature of the `createComponent` method, which allows passing
9040 * Component class directly.
9041 */
9042 abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], ngModuleRef?: NgModuleRef<any>): ComponentRef<C>;
9043 /**
9044 * Inserts a view into this container.
9045 * @param viewRef The view to insert.
9046 * @param index The 0-based index at which to insert the view.
9047 * If not specified, appends the new view as the last entry.
9048 * @returns The inserted `ViewRef` instance.
9049 *
9050 */
9051 abstract insert(viewRef: ViewRef, index?: number): ViewRef;
9052 /**
9053 * Moves a view to a new location in this container.
9054 * @param viewRef The view to move.
9055 * @param index The 0-based index of the new location.
9056 * @returns The moved `ViewRef` instance.
9057 */
9058 abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;
9059 /**
9060 * Returns the index of a view within the current container.
9061 * @param viewRef The view to query.
9062 * @returns The 0-based index of the view's position in this container,
9063 * or `-1` if this container doesn't contain the view.
9064 */
9065 abstract indexOf(viewRef: ViewRef): number;
9066 /**
9067 * Destroys a view attached to this container
9068 * @param index The 0-based index of the view to destroy.
9069 * If not specified, the last view in the container is removed.
9070 */
9071 abstract remove(index?: number): void;
9072 /**
9073 * Detaches a view from this container without destroying it.
9074 * Use along with `insert()` to move a view within the current container.
9075 * @param index The 0-based index of the view to detach.
9076 * If not specified, the last view in the container is detached.
9077 */
9078 abstract detach(index?: number): ViewRef | null;
9079}
9080
9081
9082/**
9083 * Defines the CSS styles encapsulation policies for the {@link Component} decorator's
9084 * `encapsulation` option.
9085 *
9086 * See {@link Component#encapsulation encapsulation}.
9087 *
9088 * @usageNotes
9089 * ### Example
9090 *
9091 * {@example core/ts/metadata/encapsulation.ts region='longform'}
9092 *
9093 * @publicApi
9094 */
9095export declare enum ViewEncapsulation {
9096 /**
9097 * Emulates a native Shadow DOM encapsulation behavior by adding a specific attribute to the
9098 * component's host element and applying the same attribute to all the CSS selectors provided
9099 * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls}.
9100 *
9101 * This is the default option.
9102 */
9103 Emulated = 0,
9104 /**
9105 * Doesn't provide any sort of CSS style encapsulation, meaning that all the styles provided
9106 * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls} are applicable
9107 * to any HTML element of the application regardless of their host Component.
9108 */
9109 None = 2,
9110 /**
9111 * Uses the browser's native Shadow DOM API to encapsulate CSS styles, meaning that it creates
9112 * a ShadowRoot for the component's host element which is then used to encapsulate
9113 * all the Component's styling.
9114 */
9115 ShadowDom = 3
9116}
9117
9118declare enum ViewEncapsulation_2 {
9119 Emulated = 0,
9120 None = 2,
9121 ShadowDom = 3
9122}
9123
9124declare interface viewEngine_ChangeDetectorRef_interface extends ChangeDetectorRef {
9125}
9126
9127/**
9128 * Definition of what a view queries function should look like.
9129 */
9130declare type ViewQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U) => void;
9131
9132/**
9133 * Represents an Angular [view](guide/glossary#view "Definition").
9134 *
9135 * @see {@link ChangeDetectorRef#usage-notes Change detection usage}
9136 *
9137 * @publicApi
9138 */
9139export declare abstract class ViewRef extends ChangeDetectorRef {
9140 /**
9141 * Destroys this view and all of the data structures associated with it.
9142 */
9143 abstract destroy(): void;
9144 /**
9145 * Reports whether this view has been destroyed.
9146 * @returns True after the `destroy()` method has been called, false otherwise.
9147 */
9148 abstract get destroyed(): boolean;
9149 /**
9150 * A lifecycle hook that provides additional developer-defined cleanup
9151 * functionality for views.
9152 * @param callback A handler function that cleans up developer-defined data
9153 * associated with a view. Called when the `destroy()` method is invoked.
9154 */
9155 abstract onDestroy(callback: Function): any /** TODO #9100 */;
9156}
9157
9158/**
9159 * Interface for tracking root `ViewRef`s in `ApplicationRef`.
9160 *
9161 * NOTE: Importing `ApplicationRef` here directly creates circular dependency, which is why we have
9162 * a subset of the `ApplicationRef` interface `ViewRefTracker` here.
9163 */
9164declare interface ViewRefTracker {
9165 detachView(viewRef: ViewRef): void;
9166}
9167
9168/**
9169 * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to
9170 * the DOM in a browser environment.
9171 */
9172export declare function ɵ_sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): TrustedHTML | string;
9173
9174
9175export declare function ɵ_sanitizeUrl(url: string): string;
9176
9177/**
9178 * Internal token to indicate whether having multiple bootstrapped platform should be allowed (only
9179 * one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.
9180 */
9181export declare const ɵALLOW_MULTIPLE_PLATFORMS: InjectionToken<boolean>;
9182
9183export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Html): value is ɵSafeHtml;
9184
9185export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.ResourceUrl): value is ɵSafeResourceUrl;
9186
9187export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Script): value is ɵSafeScript;
9188
9189export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Style): value is ɵSafeStyle;
9190
9191export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Url): value is ɵSafeUrl;
9192
9193export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType): boolean;
9194
9195/**
9196 * Providers that generate a random `APP_ID_TOKEN`.
9197 * @publicApi
9198 */
9199export declare const ɵAPP_ID_RANDOM_PROVIDER: {
9200 provide: InjectionToken<string>;
9201 useFactory: typeof _appIdRandomProviderFactory;
9202 deps: any[];
9203};
9204
9205/**
9206 * A set of marker values to be used in the attributes arrays. These markers indicate that some
9207 * items are not regular attributes and the processing should be adapted accordingly.
9208 */
9209export declare const enum ɵAttributeMarker {
9210 /**
9211 * An implicit marker which indicates that the value in the array are of `attributeKey`,
9212 * `attributeValue` format.
9213 *
9214 * NOTE: This is implicit as it is the type when no marker is present in array. We indicate that
9215 * it should not be present at runtime by the negative number.
9216 */
9217 ImplicitAttributes = -1,
9218 /**
9219 * Marker indicates that the following 3 values in the attributes array are:
9220 * namespaceUri, attributeName, attributeValue
9221 * in that order.
9222 */
9223 NamespaceURI = 0,
9224 /**
9225 * Signals class declaration.
9226 *
9227 * Each value following `Classes` designates a class name to include on the element.
9228 * ## Example:
9229 *
9230 * Given:
9231 * ```
9232 * <div class="foo bar baz">...<d/vi>
9233 * ```
9234 *
9235 * the generated code is:
9236 * ```
9237 * var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];
9238 * ```
9239 */
9240 Classes = 1,
9241 /**
9242 * Signals style declaration.
9243 *
9244 * Each pair of values following `Styles` designates a style name and value to include on the
9245 * element.
9246 * ## Example:
9247 *
9248 * Given:
9249 * ```
9250 * <div style="width:100px; height:200px; color:red">...</div>
9251 * ```
9252 *
9253 * the generated code is:
9254 * ```
9255 * var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];
9256 * ```
9257 */
9258 Styles = 2,
9259 /**
9260 * Signals that the following attribute names were extracted from input or output bindings.
9261 *
9262 * For example, given the following HTML:
9263 *
9264 * ```
9265 * <div moo="car" [foo]="exp" (bar)="doSth()">
9266 * ```
9267 *
9268 * the generated code is:
9269 *
9270 * ```
9271 * var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];
9272 * ```
9273 */
9274 Bindings = 3,
9275 /**
9276 * Signals that the following attribute names were hoisted from an inline-template declaration.
9277 *
9278 * For example, given the following HTML:
9279 *
9280 * ```
9281 * <div *ngFor="let value of values; trackBy:trackBy" dirA [dirB]="value">
9282 * ```
9283 *
9284 * the generated code for the `template()` instruction would include:
9285 *
9286 * ```
9287 * ['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf',
9288 * 'ngForTrackBy', 'let-value']
9289 * ```
9290 *
9291 * while the generated code for the `element()` instruction inside the template function would
9292 * include:
9293 *
9294 * ```
9295 * ['dirA', '', AttributeMarker.Bindings, 'dirB']
9296 * ```
9297 */
9298 Template = 4,
9299 /**
9300 * Signals that the following attribute is `ngProjectAs` and its value is a parsed
9301 * `CssSelector`.
9302 *
9303 * For example, given the following HTML:
9304 *
9305 * ```
9306 * <h1 attr="value" ngProjectAs="[title]">
9307 * ```
9308 *
9309 * the generated code for the `element()` instruction would include:
9310 *
9311 * ```
9312 * ['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]
9313 * ```
9314 */
9315 ProjectAs = 5,
9316 /**
9317 * Signals that the following attribute will be translated by runtime i18n
9318 *
9319 * For example, given the following HTML:
9320 *
9321 * ```
9322 * <div moo="car" foo="value" i18n-foo [bar]="binding" i18n-bar>
9323 * ```
9324 *
9325 * the generated code is:
9326 *
9327 * ```
9328 * var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];
9329 */
9330 I18n = 6
9331}
9332
9333/**
9334 * Mark `html` string as trusted.
9335 *
9336 * This function wraps the trusted string in `String` and brands it in a way which makes it
9337 * recognizable to {@link htmlSanitizer} to be trusted implicitly.
9338 *
9339 * @param trustedHtml `html` string which needs to be implicitly trusted.
9340 * @returns a `html` which has been branded to be implicitly trusted.
9341 */
9342export declare function ɵbypassSanitizationTrustHtml(trustedHtml: string): ɵSafeHtml;
9343
9344/**
9345 * Mark `url` string as trusted.
9346 *
9347 * This function wraps the trusted string in `String` and brands it in a way which makes it
9348 * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.
9349 *
9350 * @param trustedResourceUrl `url` string which needs to be implicitly trusted.
9351 * @returns a `url` which has been branded to be implicitly trusted.
9352 */
9353export declare function ɵbypassSanitizationTrustResourceUrl(trustedResourceUrl: string): ɵSafeResourceUrl;
9354
9355/**
9356 * Mark `script` string as trusted.
9357 *
9358 * This function wraps the trusted string in `String` and brands it in a way which makes it
9359 * recognizable to {@link scriptSanitizer} to be trusted implicitly.
9360 *
9361 * @param trustedScript `script` string which needs to be implicitly trusted.
9362 * @returns a `script` which has been branded to be implicitly trusted.
9363 */
9364export declare function ɵbypassSanitizationTrustScript(trustedScript: string): ɵSafeScript;
9365
9366/**
9367 * Mark `style` string as trusted.
9368 *
9369 * This function wraps the trusted string in `String` and brands it in a way which makes it
9370 * recognizable to {@link styleSanitizer} to be trusted implicitly.
9371 *
9372 * @param trustedStyle `style` string which needs to be implicitly trusted.
9373 * @returns a `style` hich has been branded to be implicitly trusted.
9374 */
9375export declare function ɵbypassSanitizationTrustStyle(trustedStyle: string): ɵSafeStyle;
9376
9377/**
9378 * Mark `url` string as trusted.
9379 *
9380 * This function wraps the trusted string in `String` and brands it in a way which makes it
9381 * recognizable to {@link urlSanitizer} to be trusted implicitly.
9382 *
9383 * @param trustedUrl `url` string which needs to be implicitly trusted.
9384 * @returns a `url` which has been branded to be implicitly trusted.
9385 */
9386export declare function ɵbypassSanitizationTrustUrl(trustedUrl: string): ɵSafeUrl;
9387
9388
9389export declare const enum ɵBypassType {
9390 Url = "URL",
9391 Html = "HTML",
9392 ResourceUrl = "ResourceURL",
9393 Script = "Script",
9394 Style = "Style"
9395}
9396
9397/**
9398 * Defines the possible states of the default change detector.
9399 * @see `ChangeDetectorRef`
9400 */
9401export declare enum ɵChangeDetectorStatus {
9402 /**
9403 * A state in which, after calling `detectChanges()`, the change detector
9404 * state becomes `Checked`, and must be explicitly invoked or reactivated.
9405 */
9406 CheckOnce = 0,
9407 /**
9408 * A state in which change detection is skipped until the change detector mode
9409 * becomes `CheckOnce`.
9410 */
9411 Checked = 1,
9412 /**
9413 * A state in which change detection continues automatically until explicitly
9414 * deactivated.
9415 */
9416 CheckAlways = 2,
9417 /**
9418 * A state in which a change detector sub tree is not a part of the main tree and
9419 * should be skipped.
9420 */
9421 Detached = 3,
9422 /**
9423 * Indicates that the change detector encountered an error checking a binding
9424 * or calling a directive lifecycle method and is now in an inconsistent state. Change
9425 * detectors in this state do not detect changes.
9426 */
9427 Errored = 4,
9428 /**
9429 * Indicates that the change detector has been destroyed.
9430 */
9431 Destroyed = 5
9432}
9433
9434export declare function ɵclearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component>;
9435
9436/**
9437 * Compile an Angular component according to its decorator metadata, and patch the resulting
9438 * component def (ɵcmp) onto the component type.
9439 *
9440 * Compilation may be asynchronous (due to the need to resolve URLs for the component template or
9441 * other resources, for example). In the event that compilation is not immediate, `compileComponent`
9442 * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`
9443 * until the global queue has been resolved with a call to `resolveComponentResources`.
9444 */
9445export declare function ɵcompileComponent(type: Type<any>, metadata: Component): void;
9446
9447/**
9448 * Compile an Angular directive according to its decorator metadata, and patch the resulting
9449 * directive def onto the component type.
9450 *
9451 * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which
9452 * will resolve when compilation completes and the directive becomes usable.
9453 */
9454export declare function ɵcompileDirective(type: Type<any>, directive: Directive | null): void;
9455
9456/**
9457 * Compiles a module in JIT mode.
9458 *
9459 * This function automatically gets called when a class has a `@NgModule` decorator.
9460 */
9461export declare function ɵcompileNgModule(moduleType: Type<any>, ngModule?: NgModule): void;
9462
9463/**
9464 * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.
9465 *
9466 * It's possible to compile a module via this API which will allow duplicate declarations in its
9467 * root.
9468 */
9469export declare function ɵcompileNgModuleDefs(moduleType: ɵNgModuleType, ngModule: NgModule, allowDuplicateDeclarationsInRoot?: boolean): void;
9470
9471export declare function ɵcompileNgModuleFactory<M>(injector: Injector, options: CompilerOptions, moduleType: Type<M>): Promise<NgModuleFactory<M>>;
9472
9473export declare function ɵcompilePipe(type: Type<any>, meta: Pipe): void;
9474
9475/**
9476 * Runtime link information for Components.
9477 *
9478 * This is an internal data structure used by the render to link
9479 * components into templates.
9480 *
9481 * NOTE: Always use `defineComponent` function to create this object,
9482 * never create the object directly since the shape of this object
9483 * can change between versions.
9484 *
9485 * See: {@link defineComponent}
9486 */
9487export declare interface ɵComponentDef<T> extends ɵDirectiveDef<T> {
9488 /**
9489 * Runtime unique component ID.
9490 */
9491 readonly id: string;
9492 /**
9493 * The View template of the component.
9494 */
9495 readonly template: ComponentTemplate<T>;
9496 /** Constants associated with the component's view. */
9497 readonly consts: TConstantsOrFactory | null;
9498 /**
9499 * An array of `ngContent[selector]` values that were found in the template.
9500 */
9501 readonly ngContentSelectors?: string[];
9502 /**
9503 * A set of styles that the component needs to be present for component to render correctly.
9504 */
9505 readonly styles: string[];
9506 /**
9507 * The number of nodes, local refs, and pipes in this component template.
9508 *
9509 * Used to calculate the length of the component's LView array, so we
9510 * can pre-fill the array and set the binding start index.
9511 */
9512 readonly decls: number;
9513 /**
9514 * The number of bindings in this component template (including pure fn bindings).
9515 *
9516 * Used to calculate the length of the component's LView array, so we
9517 * can pre-fill the array and set the host binding start index.
9518 */
9519 readonly vars: number;
9520 /**
9521 * Query-related instructions for a component.
9522 */
9523 viewQuery: ViewQueriesFunction<T> | null;
9524 /**
9525 * The view encapsulation type, which determines how styles are applied to
9526 * DOM elements. One of
9527 * - `Emulated` (default): Emulate native scoping of styles.
9528 * - `Native`: Use the native encapsulation mechanism of the renderer.
9529 * - `ShadowDom`: Use modern [ShadowDOM](https://w3c.github.io/webcomponents/spec/shadow/) and
9530 * create a ShadowRoot for component's host element.
9531 * - `None`: Do not provide any template or style encapsulation.
9532 */
9533 readonly encapsulation: ViewEncapsulation;
9534 /**
9535 * Defines arbitrary developer-defined data to be stored on a renderer instance.
9536 * This is useful for renderers that delegate to other renderers.
9537 */
9538 readonly data: {
9539 [kind: string]: any;
9540 };
9541 /** Whether or not this component's ChangeDetectionStrategy is OnPush */
9542 readonly onPush: boolean;
9543 /**
9544 * Registry of directives and components that may be found in this view.
9545 *
9546 * The property is either an array of `DirectiveDef`s or a function which returns the array of
9547 * `DirectiveDef`s. The function is necessary to be able to support forward declarations.
9548 */
9549 directiveDefs: DirectiveDefListOrFactory | null;
9550 /**
9551 * Registry of pipes that may be found in this view.
9552 *
9553 * The property is either an array of `PipeDefs`s or a function which returns the array of
9554 * `PipeDefs`s. The function is necessary to be able to support forward declarations.
9555 */
9556 pipeDefs: PipeDefListOrFactory | null;
9557 /**
9558 * The set of schemas that declare elements to be allowed in the component's template.
9559 */
9560 schemas: SchemaMetadata[] | null;
9561 /**
9562 * Ivy runtime uses this place to store the computed tView for the component. This gets filled on
9563 * the first run of component.
9564 */
9565 tView: TView | null;
9566 /**
9567 * Used to store the result of `noSideEffects` function so that it is not removed by closure
9568 * compiler. The property should never be read.
9569 */
9570 readonly _?: unknown;
9571}
9572
9573/**
9574 * A subclass of `Type` which has a static `ɵcmp`:`ComponentDef` field making it
9575 * consumable for rendering.
9576 */
9577export declare interface ɵComponentType<T> extends Type<T> {
9578 ɵcmp: unknown;
9579}
9580
9581export declare class ɵConsole {
9582 log(message: string): void;
9583 warn(message: string): void;
9584 static ɵfac: i0.ɵɵFactoryDeclaration<ɵConsole, never>;
9585 static ɵprov: i0.ɵɵInjectableDeclaration<ɵConsole>;
9586}
9587
9588/**
9589 * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
9590 *
9591 * @publicApi
9592 */
9593export declare function ɵcreateInjector(defType: any, parent?: Injector | null, additionalProviders?: StaticProvider[] | null, name?: string): Injector;
9594
9595/**
9596 * A list of CssSelectors.
9597 *
9598 * A directive or component can have multiple selectors. This type is used for
9599 * directive defs so any of the selectors in the list will match that directive.
9600 *
9601 * Original: 'form, [ngForm]'
9602 * Parsed: [['form'], ['', 'ngForm', '']]
9603 */
9604export declare type ɵCssSelectorList = CssSelector[];
9605
9606/**
9607 * Index of each value in currency data (used to describe CURRENCIES_EN in currencies.ts)
9608 */
9609export declare const enum ɵCurrencyIndex {
9610 Symbol = 0,
9611 SymbolNarrow = 1,
9612 NbOfDigits = 2
9613}
9614
9615/**
9616 * The locale id that the application is using by default (for translations and ICU expressions).
9617 */
9618export declare const ɵDEFAULT_LOCALE_ID = "en-US";
9619
9620export declare const ɵdefaultIterableDiffers: IterableDiffers;
9621
9622export declare const ɵdefaultKeyValueDiffers: KeyValueDiffers;
9623
9624
9625/**
9626 * Synchronously perform change detection on a component (and possibly its sub-components).
9627 *
9628 * This function triggers change detection in a synchronous way on a component.
9629 *
9630 * @param component The component which the change detection should be performed on.
9631 */
9632export declare function ɵdetectChanges(component: {}): void;
9633
9634
9635export declare function ɵdevModeEqual(a: any, b: any): boolean;
9636
9637/**
9638 * Runtime link information for Directives.
9639 *
9640 * This is an internal data structure used by the render to link
9641 * directives into templates.
9642 *
9643 * NOTE: Always use `defineDirective` function to create this object,
9644 * never create the object directly since the shape of this object
9645 * can change between versions.
9646 *
9647 * @param Selector type metadata specifying the selector of the directive or component
9648 *
9649 * See: {@link defineDirective}
9650 */
9651export declare interface ɵDirectiveDef<T> {
9652 /**
9653 * A dictionary mapping the inputs' minified property names to their public API names, which
9654 * are their aliases if any, or their original unminified property names
9655 * (as in `@Input('alias') propertyName: any;`).
9656 */
9657 readonly inputs: {
9658 [P in keyof T]: string;
9659 };
9660 /**
9661 * @deprecated This is only here because `NgOnChanges` incorrectly uses declared name instead of
9662 * public or minified name.
9663 */
9664 readonly declaredInputs: {
9665 [P in keyof T]: string;
9666 };
9667 /**
9668 * A dictionary mapping the outputs' minified property names to their public API names, which
9669 * are their aliases if any, or their original unminified property names
9670 * (as in `@Output('alias') propertyName: any;`).
9671 */
9672 readonly outputs: {
9673 [P in keyof T]: string;
9674 };
9675 /**
9676 * Function to create and refresh content queries associated with a given directive.
9677 */
9678 contentQueries: ContentQueriesFunction<T> | null;
9679 /**
9680 * Query-related instructions for a directive. Note that while directives don't have a
9681 * view and as such view queries won't necessarily do anything, there might be
9682 * components that extend the directive.
9683 */
9684 viewQuery: ViewQueriesFunction<T> | null;
9685 /**
9686 * Refreshes host bindings on the associated directive.
9687 */
9688 readonly hostBindings: HostBindingsFunction<T> | null;
9689 /**
9690 * The number of bindings in this directive `hostBindings` (including pure fn bindings).
9691 *
9692 * Used to calculate the length of the component's LView array, so we
9693 * can pre-fill the array and set the host binding start index.
9694 */
9695 readonly hostVars: number;
9696 /**
9697 * Assign static attribute values to a host element.
9698 *
9699 * This property will assign static attribute values as well as class and style
9700 * values to a host element. Since attribute values can consist of different types of values, the
9701 * `hostAttrs` array must include the values in the following format:
9702 *
9703 * attrs = [
9704 * // static attributes (like `title`, `name`, `id`...)
9705 * attr1, value1, attr2, value,
9706 *
9707 * // a single namespace value (like `x:id`)
9708 * NAMESPACE_MARKER, namespaceUri1, name1, value1,
9709 *
9710 * // another single namespace value (like `x:name`)
9711 * NAMESPACE_MARKER, namespaceUri2, name2, value2,
9712 *
9713 * // a series of CSS classes that will be applied to the element (no spaces)
9714 * CLASSES_MARKER, class1, class2, class3,
9715 *
9716 * // a series of CSS styles (property + value) that will be applied to the element
9717 * STYLES_MARKER, prop1, value1, prop2, value2
9718 * ]
9719 *
9720 * All non-class and non-style attributes must be defined at the start of the list
9721 * first before all class and style values are set. When there is a change in value
9722 * type (like when classes and styles are introduced) a marker must be used to separate
9723 * the entries. The marker values themselves are set via entries found in the
9724 * [AttributeMarker] enum.
9725 */
9726 readonly hostAttrs: TAttributes | null;
9727 /** Token representing the directive. Used by DI. */
9728 readonly type: Type<T>;
9729 /** Function that resolves providers and publishes them into the DI system. */
9730 providersResolver: (<U extends T>(def: ɵDirectiveDef<U>, processProvidersFn?: ProcessProvidersFunction) => void) | null;
9731 /** The selectors that will be used to match nodes to this directive. */
9732 readonly selectors: ɵCssSelectorList;
9733 /**
9734 * Name under which the directive is exported (for use with local references in template)
9735 */
9736 readonly exportAs: string[] | null;
9737 /**
9738 * Factory function used to create a new directive instance. Will be null initially.
9739 * Populated when the factory is first requested by directive instantiation logic.
9740 */
9741 readonly factory: FactoryFn<T> | null;
9742 /**
9743 * The features applied to this directive
9744 */
9745 readonly features: DirectiveDefFeature[] | null;
9746 setInput: (<U extends T>(this: ɵDirectiveDef<U>, instance: U, value: any, publicName: string, privateName: string) => void) | null;
9747}
9748
9749/**
9750 * A subclass of `Type` which has a static `ɵdir`:`DirectiveDef` field making it
9751 * consumable for rendering.
9752 */
9753export declare interface ɵDirectiveType<T> extends Type<T> {
9754 ɵdir: unknown;
9755 ɵfac: unknown;
9756}
9757
9758/**
9759 * Index of each type of locale data from the extra locale data array
9760 */
9761export declare const enum ɵExtraLocaleDataIndex {
9762 ExtraDayPeriodFormats = 0,
9763 ExtraDayPeriodStandalone = 1,
9764 ExtraDayPeriodsRules = 2
9765}
9766
9767/**
9768 * Finds the locale data for a given locale.
9769 *
9770 * @param locale The locale code.
9771 * @returns The locale data.
9772 * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
9773 */
9774export declare function ɵfindLocaleData(locale: string): any;
9775
9776/**
9777 * Loops over queued module definitions, if a given module definition has all of its
9778 * declarations resolved, it dequeues that module definition and sets the scope on
9779 * its declarations.
9780 */
9781export declare function ɵflushModuleScopingQueueAsMuchAsPossible(): void;
9782
9783export declare function ɵgetDebugNodeR2(_nativeNode: any): DebugNode | null;
9784
9785/**
9786 * Retrieves directive instances associated with a given DOM node. Does not include
9787 * component instances.
9788 *
9789 * @usageNotes
9790 * Given the following DOM structure:
9791 *
9792 * ```html
9793 * <app-root>
9794 * <button my-button></button>
9795 * <my-comp></my-comp>
9796 * </app-root>
9797 * ```
9798 *
9799 * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`
9800 * directive that is associated with the DOM node.
9801 *
9802 * Calling `getDirectives` on `<my-comp>` will return an empty array.
9803 *
9804 * @param node DOM node for which to get the directives.
9805 * @returns Array of directives associated with the node.
9806 *
9807 * @publicApi
9808 * @globalApi ng
9809 */
9810export declare function ɵgetDirectives(node: Node): {}[];
9811
9812/**
9813 * Retrieves the host element of a component or directive instance.
9814 * The host element is the DOM element that matched the selector of the directive.
9815 *
9816 * @param componentOrDirective Component or directive instance for which the host
9817 * element should be retrieved.
9818 * @returns Host element of the target.
9819 *
9820 * @publicApi
9821 * @globalApi ng
9822 */
9823export declare function ɵgetHostElement(componentOrDirective: {}): Element;
9824
9825/**
9826 * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading
9827 * inherited value.
9828 *
9829 * @param type A type which may have its own (non-inherited) `ɵprov`.
9830 */
9831export declare function ɵgetInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null;
9832
9833/**
9834 * Returns the matching `LContext` data for a given DOM node, directive or component instance.
9835 *
9836 * This function will examine the provided DOM element, component, or directive instance\'s
9837 * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched
9838 * value will be that of the newly created `LContext`.
9839 *
9840 * If the monkey-patched value is the `LView` instance then the context value for that
9841 * target will be created and the monkey-patch reference will be updated. Therefore when this
9842 * function is called it may mutate the provided element\'s, component\'s or any of the associated
9843 * directive\'s monkey-patch values.
9844 *
9845 * If the monkey-patch value is not detected then the code will walk up the DOM until an element
9846 * is found which contains a monkey-patch reference. When that occurs then the provided element
9847 * will be updated with a new context (which is then returned). If the monkey-patch value is not
9848 * detected for a component/directive instance then it will throw an error (all components and
9849 * directives should be automatically monkey-patched by ivy).
9850 *
9851 * @param target Component, Directive or DOM Node.
9852 */
9853export declare function ɵgetLContext(target: any): ɵLContext | null;
9854
9855/**
9856 * Retrieves the default currency code for the given locale.
9857 *
9858 * The default is defined as the first currency which is still in use.
9859 *
9860 * @param locale The code of the locale whose currency code we want.
9861 * @returns The code of the default currency for the given locale.
9862 *
9863 */
9864export declare function ɵgetLocaleCurrencyCode(locale: string): string | null;
9865
9866/**
9867 * Retrieves the plural function used by ICU expressions to determine the plural case to use
9868 * for a given locale.
9869 * @param locale A locale code for the locale format rules to use.
9870 * @returns The plural function for the locale.
9871 * @see `NgPlural`
9872 * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
9873 */
9874export declare function ɵgetLocalePluralCase(locale: string): (value: number) => number;
9875
9876export declare function ɵgetSanitizationBypassType(value: any): ɵBypassType | null;
9877
9878export declare type ɵGetterFn = (obj: any) => any;
9879
9880
9881export declare const ɵglobal: any;
9882
9883/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */
9884export declare function ɵinjectChangeDetectorRef(flags: InjectFlags): ChangeDetectorRef;
9885
9886/**
9887 * An internal token whose presence in an injector indicates that the injector should treat itself
9888 * as a root scoped injector when processing requests for unknown tokens which may indicate
9889 * they are provided in the root scope.
9890 */
9891export declare const ɵINJECTOR_SCOPE: InjectionToken<"root" | "platform" | null>;
9892
9893export declare function ɵisBoundToModule<C>(cf: ComponentFactory<C>): boolean;
9894
9895/**
9896 * Reports whether a given strategy is currently the default for change detection.
9897 * @param changeDetectionStrategy The strategy to check.
9898 * @returns True if the given strategy is the current default, false otherwise.
9899 * @see `ChangeDetectorStatus`
9900 * @see `ChangeDetectorRef`
9901 */
9902export declare function ɵisDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy): boolean;
9903
9904export declare function ɵisListLikeIterable(obj: any): boolean;
9905
9906/**
9907 * Determine if the argument is an Observable
9908 *
9909 * Strictly this tests that the `obj` is `Subscribable`, since `Observable`
9910 * types need additional methods, such as `lift()`. But it is adequate for our
9911 * needs since within the Angular framework code we only ever need to use the
9912 * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects
9913 * into `Observable` as needed.
9914 */
9915export declare const ɵisObservable: (obj: any | Observable<any>) => obj is Observable<any>;
9916
9917/**
9918 * Determine if the argument is shaped like a Promise
9919 */
9920export declare function ɵisPromise<T = any>(obj: any): obj is Promise<T>;
9921
9922/**
9923 * Determine if the argument is a Subscribable
9924 */
9925export declare function ɵisSubscribable(obj: any | Subscribable<any>): obj is Subscribable<any>;
9926
9927export declare const ɵivyEnabled = true;
9928
9929/**
9930 * The internal view context which is specific to a given DOM element, directive or
9931 * component instance. Each value in here (besides the LView and element node details)
9932 * can be present, null or undefined. If undefined then it implies the value has not been
9933 * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
9934 *
9935 * Each value will get filled when the respective value is examined within the getContext
9936 * function. The component, element and each directive instance will share the same instance
9937 * of the context.
9938 */
9939export declare interface ɵLContext {
9940 /**
9941 * The component's parent view data.
9942 */
9943 lView: LView;
9944 /**
9945 * The index instance of the node.
9946 */
9947 nodeIndex: number;
9948 /**
9949 * The instance of the DOM node that is attached to the lNode.
9950 */
9951 native: RNode;
9952 /**
9953 * The instance of the Component node.
9954 */
9955 component: {} | null | undefined;
9956 /**
9957 * The list of active directives that exist on this element.
9958 */
9959 directives: any[] | null | undefined;
9960 /**
9961 * The map of local references (local reference name => element or directive instance) that exist
9962 * on this element.
9963 */
9964 localRefs: {
9965 [key: string]: any;
9966 } | null | undefined;
9967}
9968
9969/**
9970 * Used to enable lifecycle hooks on the root component.
9971 *
9972 * Include this feature when calling `renderComponent` if the root component
9973 * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't
9974 * be called properly.
9975 *
9976 * Example:
9977 *
9978 * ```
9979 * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});
9980 * ```
9981 */
9982export declare function ɵLifecycleHooksFeature(component: any, def: ɵComponentDef<any>): void;
9983
9984/**
9985 * Index of each type of locale data from the locale data array
9986 */
9987export declare enum ɵLocaleDataIndex {
9988 LocaleId = 0,
9989 DayPeriodsFormat = 1,
9990 DayPeriodsStandalone = 2,
9991 DaysFormat = 3,
9992 DaysStandalone = 4,
9993 MonthsFormat = 5,
9994 MonthsStandalone = 6,
9995 Eras = 7,
9996 FirstDayOfWeek = 8,
9997 WeekendRange = 9,
9998 DateFormat = 10,
9999 TimeFormat = 11,
10000 DateTimeFormat = 12,
10001 NumberSymbols = 13,
10002 NumberFormats = 14,
10003 CurrencyCode = 15,
10004 CurrencySymbol = 16,
10005 CurrencyName = 17,
10006 Currencies = 18,
10007 Directionality = 19,
10008 PluralCase = 20,
10009 ExtraData = 21
10010}
10011
10012/**
10013 * @suppress {globalThis}
10014 */
10015export declare function ɵmakeDecorator<T>(name: string, props?: (...args: any[]) => any, parentClass?: any, additionalProcessing?: (type: Type<T>) => void, typeFn?: (type: Type<T>, ...args: any[]) => void): {
10016 new (...args: any[]): any;
10017 (...args: any[]): any;
10018 (...args: any[]): (cls: any) => any;
10019};
10020
10021/**
10022 * Marks the component as dirty (needing change detection). Marking a component dirty will
10023 * schedule a change detection on it at some point in the future.
10024 *
10025 * Marking an already dirty component as dirty won't do anything. Only one outstanding change
10026 * detection can be scheduled per component tree.
10027 *
10028 * @param component Component to mark as dirty.
10029 */
10030export declare function ɵmarkDirty(component: {}): void;
10031
10032export declare type ɵMethodFn = (obj: any, args: any[]) => any;
10033
10034
10035export declare const ɵNG_COMP_DEF: string;
10036
10037export declare const ɵNG_DIR_DEF: string;
10038
10039/**
10040 * If a directive is diPublic, bloomAdd sets a property on the type with this constant as
10041 * the key and the directive's unique ID as the value. This allows us to map directives to their
10042 * bloom filter bit for DI.
10043 */
10044export declare const ɵNG_ELEMENT_ID: string;
10045
10046export declare const ɵNG_INJ_DEF: string;
10047
10048export declare const ɵNG_MOD_DEF: string;
10049
10050export declare const ɵNG_PIPE_DEF: string;
10051
10052export declare const ɵNG_PROV_DEF: string;
10053
10054/**
10055 * Runtime link information for NgModules.
10056 *
10057 * This is the internal data structure used by the runtime to assemble components, directives,
10058 * pipes, and injectors.
10059 *
10060 * NOTE: Always use `ɵɵdefineNgModule` function to create this object,
10061 * never create the object directly since the shape of this object
10062 * can change between versions.
10063 */
10064export declare interface ɵNgModuleDef<T> {
10065 /** Token representing the module. Used by DI. */
10066 type: T;
10067 /** List of components to bootstrap. */
10068 bootstrap: Type<any>[] | (() => Type<any>[]);
10069 /** List of components, directives, and pipes declared by this module. */
10070 declarations: Type<any>[] | (() => Type<any>[]);
10071 /** List of modules or `ModuleWithProviders` imported by this module. */
10072 imports: Type<any>[] | (() => Type<any>[]);
10073 /**
10074 * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
10075 * module.
10076 */
10077 exports: Type<any>[] | (() => Type<any>[]);
10078 /**
10079 * Cached value of computed `transitiveCompileScopes` for this module.
10080 *
10081 * This should never be read directly, but accessed via `transitiveScopesFor`.
10082 */
10083 transitiveCompileScopes: ɵNgModuleTransitiveScopes | null;
10084 /** The set of schemas that declare elements to be allowed in the NgModule. */
10085 schemas: SchemaMetadata[] | null;
10086 /** Unique ID for the module with which it should be registered. */
10087 id: string | null;
10088}
10089
10090export declare class ɵNgModuleFactory<T> extends NgModuleFactory<T> {
10091 moduleType: Type<T>;
10092 constructor(moduleType: Type<T>);
10093 create(parentInjector: Injector | null): NgModuleRef<T>;
10094}
10095
10096/**
10097 * Represents the expansion of an `NgModule` into its scopes.
10098 *
10099 * A scope is a set of directives and pipes that are visible in a particular context. Each
10100 * `NgModule` has two scopes. The `compilation` scope is the set of directives and pipes that will
10101 * be recognized in the templates of components declared by the module. The `exported` scope is the
10102 * set of directives and pipes exported by a module (that is, module B's exported scope gets added
10103 * to module A's compilation scope when module A imports B).
10104 */
10105export declare interface ɵNgModuleTransitiveScopes {
10106 compilation: {
10107 directives: Set<any>;
10108 pipes: Set<any>;
10109 };
10110 exported: {
10111 directives: Set<any>;
10112 pipes: Set<any>;
10113 };
10114 schemas: SchemaMetadata[] | null;
10115}
10116
10117export declare interface ɵNgModuleType<T = any> extends Type<T> {
10118 ɵmod: ɵNgModuleDef<T>;
10119}
10120
10121
10122export declare interface ɵNO_CHANGE {
10123 __brand__: 'NO_CHANGE';
10124}
10125
10126/** A special value which designates that a value has not changed. */
10127export declare const ɵNO_CHANGE: ɵNO_CHANGE;
10128
10129/**
10130 * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls
10131 * to framework to perform rendering.
10132 */
10133export declare class ɵNoopNgZone implements NgZone {
10134 readonly hasPendingMicrotasks: boolean;
10135 readonly hasPendingMacrotasks: boolean;
10136 readonly isStable: boolean;
10137 readonly onUnstable: EventEmitter<any>;
10138 readonly onMicrotaskEmpty: EventEmitter<any>;
10139 readonly onStable: EventEmitter<any>;
10140 readonly onError: EventEmitter<any>;
10141 run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any): T;
10142 runGuarded<T>(fn: (...args: any[]) => any, applyThis?: any, applyArgs?: any): T;
10143 runOutsideAngular<T>(fn: (...args: any[]) => T): T;
10144 runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any, name?: string): T;
10145}
10146
10147
10148/**
10149 * Convince closure compiler that the wrapped function has no side-effects.
10150 *
10151 * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to
10152 * allow us to execute a function but have closure compiler mark the call as no-side-effects.
10153 * It is important that the return value for the `noSideEffects` function be assigned
10154 * to something which is retained otherwise the call to `noSideEffects` will be removed by closure
10155 * compiler.
10156 */
10157export declare function ɵnoSideEffects<T>(fn: () => T): T;
10158
10159
10160export declare const ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR: {};
10161
10162/**
10163 * Patch the definition of a component with directives and pipes from the compilation scope of
10164 * a given module.
10165 */
10166export declare function ɵpatchComponentDefWithScope<C>(componentDef: ɵComponentDef<C>, transitiveScopes: ɵNgModuleTransitiveScopes): void;
10167
10168/**
10169 * Runtime link information for Pipes.
10170 *
10171 * This is an internal data structure used by the renderer to link
10172 * pipes into templates.
10173 *
10174 * NOTE: Always use `definePipe` function to create this object,
10175 * never create the object directly since the shape of this object
10176 * can change between versions.
10177 *
10178 * See: {@link definePipe}
10179 */
10180export declare interface ɵPipeDef<T> {
10181 /** Token representing the pipe. */
10182 type: Type<T>;
10183 /**
10184 * Pipe name.
10185 *
10186 * Used to resolve pipe in templates.
10187 */
10188 readonly name: string;
10189 /**
10190 * Factory function used to create a new pipe instance. Will be null initially.
10191 * Populated when the factory is first requested by pipe instantiation logic.
10192 */
10193 factory: FactoryFn<T> | null;
10194 /**
10195 * Whether or not the pipe is pure.
10196 *
10197 * Pure pipes result only depends on the pipe input and not on internal
10198 * state of the pipe.
10199 */
10200 readonly pure: boolean;
10201 onDestroy: (() => void) | null;
10202}
10203
10204
10205/**
10206 * A shared interface which contains an animation player
10207 */
10208export declare interface ɵPlayer {
10209 parent?: ɵPlayer | null;
10210 state: ɵPlayState;
10211 play(): void;
10212 pause(): void;
10213 finish(): void;
10214 destroy(): void;
10215 addEventListener(state: ɵPlayState | string, cb: (data?: any) => any): void;
10216}
10217
10218/**
10219 * Used as a reference to build a player from a styling template binding
10220 * (`[style]` and `[class]`).
10221 *
10222 * The `fn` function will be called once any styling-related changes are
10223 * evaluated on an element and is expected to return a player that will
10224 * be then run on the element.
10225 *
10226 * `[style]`, `[style.prop]`, `[class]` and `[class.name]` template bindings
10227 * all accept a `PlayerFactory` as input and this player factories.
10228 */
10229export declare interface ɵPlayerFactory {
10230 '__brand__': 'Brand for PlayerFactory that nothing will match';
10231}
10232
10233/**
10234 * Designed to be used as an injection service to capture all animation players.
10235 *
10236 * When present all animation players will be passed into the flush method below.
10237 * This feature is designed to service application-wide animation testing, live
10238 * debugging as well as custom animation choreographing tools.
10239 */
10240export declare interface ɵPlayerHandler {
10241 /**
10242 * Designed to kick off the player at the end of change detection
10243 */
10244 flushPlayers(): void;
10245 /**
10246 * @param player The player that has been scheduled to run within the application.
10247 * @param context The context as to where the player was bound to
10248 */
10249 queuePlayer(player: ɵPlayer, context: ComponentInstance | DirectiveInstance | HTMLElement): void;
10250}
10251
10252/**
10253 * The state of a given player
10254 *
10255 * Do not change the increasing nature of the numbers since the player
10256 * code may compare state by checking if a number is higher or lower than
10257 * a certain numeric value.
10258 */
10259export declare const enum ɵPlayState {
10260 Pending = 0,
10261 Running = 1,
10262 Paused = 2,
10263 Finished = 100,
10264 Destroyed = 200
10265}
10266
10267/**
10268 * Profiler function which the runtime will invoke before and after user code.
10269 */
10270export declare interface ɵProfiler {
10271 (event: ɵProfilerEvent, instance: {} | null, hookOrListener?: (e?: any) => any): void;
10272}
10273
10274
10275/**
10276 * Profiler events is an enum used by the profiler to distinguish between different calls of user
10277 * code invoked throughout the application lifecycle.
10278 */
10279export declare const enum ɵProfilerEvent {
10280 /**
10281 * Corresponds to the point in time before the runtime has called the template function of a
10282 * component with `RenderFlags.Create`.
10283 */
10284 TemplateCreateStart = 0,
10285 /**
10286 * Corresponds to the point in time after the runtime has called the template function of a
10287 * component with `RenderFlags.Create`.
10288 */
10289 TemplateCreateEnd = 1,
10290 /**
10291 * Corresponds to the point in time before the runtime has called the template function of a
10292 * component with `RenderFlags.Update`.
10293 */
10294 TemplateUpdateStart = 2,
10295 /**
10296 * Corresponds to the point in time after the runtime has called the template function of a
10297 * component with `RenderFlags.Update`.
10298 */
10299 TemplateUpdateEnd = 3,
10300 /**
10301 * Corresponds to the point in time before the runtime has called a lifecycle hook of a component
10302 * or directive.
10303 */
10304 LifecycleHookStart = 4,
10305 /**
10306 * Corresponds to the point in time after the runtime has called a lifecycle hook of a component
10307 * or directive.
10308 */
10309 LifecycleHookEnd = 5,
10310 /**
10311 * Corresponds to the point in time before the runtime has evaluated an expression associated with
10312 * an event or an output.
10313 */
10314 OutputStart = 6,
10315 /**
10316 * Corresponds to the point in time after the runtime has evaluated an expression associated with
10317 * an event or an output.
10318 */
10319 OutputEnd = 7
10320}
10321
10322/**
10323 * Publishes a collection of default debug tools onto`window.ng`.
10324 *
10325 * These functions are available globally when Angular is in development
10326 * mode and are automatically stripped away from prod mode is on.
10327 */
10328export declare function ɵpublishDefaultGlobalUtils(): void;
10329
10330/**
10331 * Publishes the given function to `window.ng` so that it can be
10332 * used from the browser console when an application is not in production.
10333 */
10334export declare function ɵpublishGlobalUtil(name: string, fn: Function): void;
10335
10336export declare class ɵReflectionCapabilities implements PlatformReflectionCapabilities {
10337 private _reflect;
10338 constructor(reflect?: any);
10339 isReflectionEnabled(): boolean;
10340 factory<T>(t: Type<T>): (args: any[]) => T;
10341 private _ownParameters;
10342 parameters(type: Type<any>): any[][];
10343 private _ownAnnotations;
10344 annotations(typeOrFunc: Type<any>): any[];
10345 private _ownPropMetadata;
10346 propMetadata(typeOrFunc: any): {
10347 [key: string]: any[];
10348 };
10349 ownPropMetadata(typeOrFunc: any): {
10350 [key: string]: any[];
10351 };
10352 hasLifecycleHook(type: any, lcProperty: string): boolean;
10353 guards(type: any): {
10354 [key: string]: any;
10355 };
10356 getter(name: string): ɵGetterFn;
10357 setter(name: string): ɵSetterFn;
10358 method(name: string): ɵMethodFn;
10359 importUri(type: any): string;
10360 resourceUri(type: any): string;
10361 resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any;
10362 resolveEnum(enumIdentifier: any, name: string): any;
10363}
10364
10365/**
10366 * Register locale data to be used internally by Angular. See the
10367 * ["I18n guide"](guide/i18n-common-format-data-locale) to know how to import additional locale
10368 * data.
10369 *
10370 * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1
10371 */
10372export declare function ɵregisterLocaleData(data: any, localeId?: string | any, extraData?: any): void;
10373
10374export declare function ɵregisterNgModuleType(ngModuleType: ɵNgModuleType): void;
10375
10376/**
10377 * Render3 implementation of {@link viewEngine_ComponentFactory}.
10378 */
10379export declare class ɵRender3ComponentFactory<T> extends ComponentFactory<T> {
10380 private componentDef;
10381 private ngModule?;
10382 selector: string;
10383 componentType: Type<any>;
10384 ngContentSelectors: string[];
10385 isBoundToModule: boolean;
10386 get inputs(): {
10387 propName: string;
10388 templateName: string;
10389 }[];
10390 get outputs(): {
10391 propName: string;
10392 templateName: string;
10393 }[];
10394 /**
10395 * @param componentDef The component definition.
10396 * @param ngModule The NgModuleRef to which the factory is bound.
10397 */
10398 constructor(componentDef: ɵComponentDef<any>, ngModule?: NgModuleRef<any> | undefined);
10399 create(injector: Injector, projectableNodes?: any[][] | undefined, rootSelectorOrNode?: any, ngModule?: NgModuleRef<any> | undefined): ComponentRef<T>;
10400}
10401
10402/**
10403 * Represents an instance of a Component created via a {@link ComponentFactory}.
10404 *
10405 * `ComponentRef` provides access to the Component Instance as well other objects related to this
10406 * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}
10407 * method.
10408 *
10409 */
10410export declare class ɵRender3ComponentRef<T> extends ComponentRef<T> {
10411 location: ElementRef;
10412 private _rootLView;
10413 private _tNode;
10414 instance: T;
10415 hostView: ɵViewRef<T>;
10416 changeDetectorRef: ChangeDetectorRef;
10417 componentType: Type<T>;
10418 constructor(componentType: Type<T>, instance: T, location: ElementRef, _rootLView: LView, _tNode: TElementNode | TContainerNode | TElementContainerNode);
10419 get injector(): Injector;
10420 destroy(): void;
10421 onDestroy(callback: () => void): void;
10422}
10423
10424export declare class ɵRender3NgModuleRef<T> extends NgModuleRef<T> implements InternalNgModuleRef<T> {
10425 _parent: Injector | null;
10426 _bootstrapComponents: Type<any>[];
10427 _r3Injector: R3Injector;
10428 injector: Injector;
10429 instance: T;
10430 destroyCbs: (() => void)[] | null;
10431 readonly componentFactoryResolver: ComponentFactoryResolver_2;
10432 constructor(ngModuleType: Type<T>, _parent: Injector | null);
10433 get(token: any, notFoundValue?: any, injectFlags?: InjectFlags): any;
10434 destroy(): void;
10435 onDestroy(callback: () => void): void;
10436}
10437
10438/**
10439 * Bootstraps a Component into an existing host element and returns an instance
10440 * of the component.
10441 *
10442 * Use this function to bootstrap a component into the DOM tree. Each invocation
10443 * of this function will create a separate tree of components, injectors and
10444 * change detection cycles and lifetimes. To dynamically insert a new component
10445 * into an existing tree such that it shares the same injection, change detection
10446 * and object lifetime, use {@link ViewContainer#createComponent}.
10447 *
10448 * @param componentType Component to bootstrap
10449 * @param options Optional parameters which control bootstrapping
10450 */
10451export declare function ɵrenderComponent<T>(componentType: ɵComponentType<T> | Type<T>, opts?: CreateComponentOptions): T;
10452
10453/**
10454 * Flags passed into template functions to determine which blocks (i.e. creation, update)
10455 * should be executed.
10456 *
10457 * Typically, a template runs both the creation block and the update block on initialization and
10458 * subsequent runs only execute the update block. However, dynamically created views require that
10459 * the creation block be executed separately from the update block (for backwards compat).
10460 */
10461export declare const enum ɵRenderFlags {
10462 Create = 1,
10463 Update = 2
10464}
10465
10466export declare function ɵresetCompiledComponents(): void;
10467
10468export declare function ɵresetJitOptions(): void;
10469
10470/**
10471 * Used to resolve resource URLs on `@Component` when used with JIT compilation.
10472 *
10473 * Example:
10474 * ```
10475 * @Component({
10476 * selector: 'my-comp',
10477 * templateUrl: 'my-comp.html', // This requires asynchronous resolution
10478 * })
10479 * class MyComponent{
10480 * }
10481 *
10482 * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process
10483 * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.
10484 *
10485 * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into
10486 * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.
10487 *
10488 * // Use browser's `fetch()` function as the default resource resolution strategy.
10489 * resolveComponentResources(fetch).then(() => {
10490 * // After resolution all URLs have been converted into `template` strings.
10491 * renderComponent(MyComponent);
10492 * });
10493 *
10494 * ```
10495 *
10496 * NOTE: In AOT the resolution happens during compilation, and so there should be no need
10497 * to call this method outside JIT mode.
10498 *
10499 * @param resourceResolver a function which is responsible for returning a `Promise` to the
10500 * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.
10501 */
10502export declare function ɵresolveComponentResources(resourceResolver: (url: string) => (Promise<string | {
10503 text(): Promise<string>;
10504}>)): Promise<void>;
10505
10506/**
10507 * Class that represents a runtime error.
10508 * Formats and outputs the error message in a consistent way.
10509 *
10510 * Example:
10511 * ```
10512 * throw new RuntimeError(
10513 * RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,
10514 * ngDevMode && 'Injector has already been destroyed.');
10515 * ```
10516 *
10517 * Note: the `message` argument contains a descriptive error message as a string in development
10518 * mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the
10519 * `message` argument becomes `false`, thus we account for it in the typings and the runtime logic.
10520 */
10521export declare class ɵRuntimeError<T extends number = RuntimeErrorCode> extends Error {
10522 code: T;
10523 constructor(code: T, message: null | false | string);
10524}
10525
10526/**
10527 * Marker interface for a value that's safe to use as HTML.
10528 *
10529 * @publicApi
10530 */
10531export declare interface ɵSafeHtml extends ɵSafeValue {
10532}
10533
10534/**
10535 * Marker interface for a value that's safe to use as a URL to load executable code from.
10536 *
10537 * @publicApi
10538 */
10539export declare interface ɵSafeResourceUrl extends ɵSafeValue {
10540}
10541
10542/**
10543 * Marker interface for a value that's safe to use as JavaScript.
10544 *
10545 * @publicApi
10546 */
10547export declare interface ɵSafeScript extends ɵSafeValue {
10548}
10549
10550/**
10551 * Marker interface for a value that's safe to use as style (CSS).
10552 *
10553 * @publicApi
10554 */
10555export declare interface ɵSafeStyle extends ɵSafeValue {
10556}
10557
10558/**
10559 * Marker interface for a value that's safe to use as a URL linking to a document.
10560 *
10561 * @publicApi
10562 */
10563export declare interface ɵSafeUrl extends ɵSafeValue {
10564}
10565
10566/**
10567 * Marker interface for a value that's safe to use in a particular context.
10568 *
10569 * @publicApi
10570 */
10571export declare interface ɵSafeValue {
10572}
10573
10574/**
10575 * Adds decorator, constructor, and property metadata to a given type via static metadata fields
10576 * on the type.
10577 *
10578 * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.
10579 *
10580 * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments
10581 * being tree-shaken away during production builds.
10582 */
10583export declare function ɵsetClassMetadata(type: Type<any>, decorators: any[] | null, ctorParameters: (() => any[]) | null, propDecorators: {
10584 [field: string]: any;
10585} | null): void;
10586
10587export declare function ɵsetCurrentInjector(injector: Injector | null | undefined): Injector | undefined | null;
10588
10589
10590/**
10591 * Tell ivy what the `document` is for this platform.
10592 *
10593 * It is only necessary to call this if the current platform is not a browser.
10594 *
10595 * @param document The object representing the global `document` in this environment.
10596 */
10597export declare function ɵsetDocument(document: Document | undefined): void;
10598
10599
10600/**
10601 * Sets the locale id that will be used for translations and ICU expressions.
10602 * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
10603 * but is now defined as a global value.
10604 *
10605 * @param localeId
10606 */
10607export declare function ɵsetLocaleId(localeId: string): void;
10608
10609
10610export declare type ɵSetterFn = (obj: any, value: any) => void;
10611
10612/** Store a value in the `data` at a given `index`. */
10613export declare function ɵstore<T>(tView: TView, lView: LView, index: number, value: T): void;
10614
10615
10616export declare function ɵstringify(token: any): string;
10617
10618/**
10619 * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.
10620 *
10621 * This operation is memoized and the result is cached on the module's definition. This function can
10622 * be called on modules with components that have not fully compiled yet, but the result should not
10623 * be used until they have.
10624 *
10625 * @param moduleType module that transitive scope should be calculated for.
10626 */
10627export declare function ɵtransitiveScopesFor<T>(moduleType: Type<T>): ɵNgModuleTransitiveScopes;
10628
10629/**
10630 * Helper function to remove all the locale data from `LOCALE_DATA`.
10631 */
10632export declare function ɵunregisterLocaleData(): void;
10633
10634export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
10635
10636export declare function ɵunwrapSafeValue<T>(value: T): T;
10637
10638export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, InternalViewRef, viewEngine_ChangeDetectorRef_interface {
10639 /**
10640 * This represents the `LView` associated with the point where `ChangeDetectorRef` was
10641 * requested.
10642 *
10643 * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
10644 */
10645 private _cdRefInjectingView?;
10646 private _appRef;
10647 private _attachedToViewContainer;
10648 get rootNodes(): any[];
10649 constructor(
10650 /**
10651 * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.
10652 *
10653 * When ViewRef is created for a dynamic component, this also represents the `LView` for the
10654 * component.
10655 *
10656 * For a "regular" ViewRef created for an embedded view, this is the `LView` for the embedded
10657 * view.
10658 *
10659 * @internal
10660 */
10661 _lView: LView,
10662 /**
10663 * This represents the `LView` associated with the point where `ChangeDetectorRef` was
10664 * requested.
10665 *
10666 * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
10667 */
10668 _cdRefInjectingView?: LView | undefined);
10669 get context(): T;
10670 set context(value: T);
10671 get destroyed(): boolean;
10672 destroy(): void;
10673 onDestroy(callback: Function): void;
10674 /**
10675 * Marks a view and all of its ancestors dirty.
10676 *
10677 * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is
10678 * checked when it needs to be re-rendered but the two normal triggers haven't marked it
10679 * dirty (i.e. inputs haven't changed and events haven't fired in the view).
10680 *
10681 * <!-- TODO: Add a link to a chapter on OnPush components -->
10682 *
10683 * @usageNotes
10684 * ### Example
10685 *
10686 * ```typescript
10687 * @Component({
10688 * selector: 'app-root',
10689 * template: `Number of ticks: {{numberOfTicks}}`
10690 * changeDetection: ChangeDetectionStrategy.OnPush,
10691 * })
10692 * class AppComponent {
10693 * numberOfTicks = 0;
10694 *
10695 * constructor(private ref: ChangeDetectorRef) {
10696 * setInterval(() => {
10697 * this.numberOfTicks++;
10698 * // the following is required, otherwise the view will not be updated
10699 * this.ref.markForCheck();
10700 * }, 1000);
10701 * }
10702 * }
10703 * ```
10704 */
10705 markForCheck(): void;
10706 /**
10707 * Detaches the view from the change detection tree.
10708 *
10709 * Detached views will not be checked during change detection runs until they are
10710 * re-attached, even if they are dirty. `detach` can be used in combination with
10711 * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
10712 * detection checks.
10713 *
10714 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
10715 * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
10716 *
10717 * @usageNotes
10718 * ### Example
10719 *
10720 * The following example defines a component with a large list of readonly data.
10721 * Imagine the data changes constantly, many times per second. For performance reasons,
10722 * we want to check and update the list every five seconds. We can do that by detaching
10723 * the component's change detector and doing a local check every five seconds.
10724 *
10725 * ```typescript
10726 * class DataProvider {
10727 * // in a real application the returned data will be different every time
10728 * get data() {
10729 * return [1,2,3,4,5];
10730 * }
10731 * }
10732 *
10733 * @Component({
10734 * selector: 'giant-list',
10735 * template: `
10736 * <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
10737 * `,
10738 * })
10739 * class GiantList {
10740 * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
10741 * ref.detach();
10742 * setInterval(() => {
10743 * this.ref.detectChanges();
10744 * }, 5000);
10745 * }
10746 * }
10747 *
10748 * @Component({
10749 * selector: 'app',
10750 * providers: [DataProvider],
10751 * template: `
10752 * <giant-list><giant-list>
10753 * `,
10754 * })
10755 * class App {
10756 * }
10757 * ```
10758 */
10759 detach(): void;
10760 /**
10761 * Re-attaches a view to the change detection tree.
10762 *
10763 * This can be used to re-attach views that were previously detached from the tree
10764 * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
10765 *
10766 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
10767 *
10768 * @usageNotes
10769 * ### Example
10770 *
10771 * The following example creates a component displaying `live` data. The component will detach
10772 * its change detector from the main change detector tree when the component's live property
10773 * is set to false.
10774 *
10775 * ```typescript
10776 * class DataProvider {
10777 * data = 1;
10778 *
10779 * constructor() {
10780 * setInterval(() => {
10781 * this.data = this.data * 2;
10782 * }, 500);
10783 * }
10784 * }
10785 *
10786 * @Component({
10787 * selector: 'live-data',
10788 * inputs: ['live'],
10789 * template: 'Data: {{dataProvider.data}}'
10790 * })
10791 * class LiveData {
10792 * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
10793 *
10794 * set live(value) {
10795 * if (value) {
10796 * this.ref.reattach();
10797 * } else {
10798 * this.ref.detach();
10799 * }
10800 * }
10801 * }
10802 *
10803 * @Component({
10804 * selector: 'app-root',
10805 * providers: [DataProvider],
10806 * template: `
10807 * Live Update: <input type="checkbox" [(ngModel)]="live">
10808 * <live-data [live]="live"><live-data>
10809 * `,
10810 * })
10811 * class AppComponent {
10812 * live = true;
10813 * }
10814 * ```
10815 */
10816 reattach(): void;
10817 /**
10818 * Checks the view and its children.
10819 *
10820 * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement
10821 * local change detection checks.
10822 *
10823 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
10824 * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
10825 *
10826 * @usageNotes
10827 * ### Example
10828 *
10829 * The following example defines a component with a large list of readonly data.
10830 * Imagine, the data changes constantly, many times per second. For performance reasons,
10831 * we want to check and update the list every five seconds.
10832 *
10833 * We can do that by detaching the component's change detector and doing a local change detection
10834 * check every five seconds.
10835 *
10836 * See {@link ChangeDetectorRef#detach detach} for more information.
10837 */
10838 detectChanges(): void;
10839 /**
10840 * Checks the change detector and its children, and throws if any changes are detected.
10841 *
10842 * This is used in development mode to verify that running change detection doesn't
10843 * introduce other changes.
10844 */
10845 checkNoChanges(): void;
10846 attachToViewContainerRef(): void;
10847 detachFromAppRef(): void;
10848 attachToAppRef(appRef: ViewRefTracker): void;
10849}
10850
10851/**
10852 * Wait on component until it is rendered.
10853 *
10854 * This function returns a `Promise` which is resolved when the component's
10855 * change detection is executed. This is determined by finding the scheduler
10856 * associated with the `component`'s render tree and waiting until the scheduler
10857 * flushes. If nothing is scheduled, the function returns a resolved promise.
10858 *
10859 * Example:
10860 * ```
10861 * await whenRendered(myComponent);
10862 * ```
10863 *
10864 * @param component Component to wait upon
10865 * @returns Promise which resolves when the component is rendered.
10866 */
10867export declare function ɵwhenRendered(component: any): Promise<null>;
10868
10869/**
10870 * Advances to an element for later binding instructions.
10871 *
10872 * Used in conjunction with instructions like {@link property} to act on elements with specified
10873 * indices, for example those created with {@link element} or {@link elementStart}.
10874 *
10875 * ```ts
10876 * (rf: RenderFlags, ctx: any) => {
10877 * if (rf & 1) {
10878 * text(0, 'Hello');
10879 * text(1, 'Goodbye')
10880 * element(2, 'div');
10881 * }
10882 * if (rf & 2) {
10883 * advance(2); // Advance twice to the <div>.
10884 * property('title', 'test');
10885 * }
10886 * }
10887 * ```
10888 * @param delta Number of elements to advance forwards by.
10889 *
10890 * @codeGenApi
10891 */
10892export declare function ɵɵadvance(delta: number): void;
10893
10894/**
10895 * Updates the value of or removes a bound attribute on an Element.
10896 *
10897 * Used in the case of `[attr.title]="value"`
10898 *
10899 * @param name name The name of the attribute.
10900 * @param value value The attribute is removed when value is `null` or `undefined`.
10901 * Otherwise the attribute value is set to the stringified value.
10902 * @param sanitizer An optional function used to sanitize the value.
10903 * @param namespace Optional namespace to use when setting the attribute.
10904 *
10905 * @codeGenApi
10906 */
10907export declare function ɵɵattribute(name: string, value: any, sanitizer?: SanitizerFn | null, namespace?: string): typeof ɵɵattribute;
10908
10909/**
10910 *
10911 * Update an interpolated attribute on an element with single bound value surrounded by text.
10912 *
10913 * Used when the value passed to a property has 1 interpolated value in it:
10914 *
10915 * ```html
10916 * <div attr.title="prefix{{v0}}suffix"></div>
10917 * ```
10918 *
10919 * Its compiled representation is::
10920 *
10921 * ```ts
10922 * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');
10923 * ```
10924 *
10925 * @param attrName The name of the attribute to update
10926 * @param prefix Static value used for concatenation only.
10927 * @param v0 Value checked for change.
10928 * @param suffix Static value used for concatenation only.
10929 * @param sanitizer An optional sanitizer function
10930 * @returns itself, so that it may be chained.
10931 * @codeGenApi
10932 */
10933export declare function ɵɵattributeInterpolate1(attrName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate1;
10934
10935/**
10936 *
10937 * Update an interpolated attribute on an element with 2 bound values surrounded by text.
10938 *
10939 * Used when the value passed to a property has 2 interpolated values in it:
10940 *
10941 * ```html
10942 * <div attr.title="prefix{{v0}}-{{v1}}suffix"></div>
10943 * ```
10944 *
10945 * Its compiled representation is::
10946 *
10947 * ```ts
10948 * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
10949 * ```
10950 *
10951 * @param attrName The name of the attribute to update
10952 * @param prefix Static value used for concatenation only.
10953 * @param v0 Value checked for change.
10954 * @param i0 Static value used for concatenation only.
10955 * @param v1 Value checked for change.
10956 * @param suffix Static value used for concatenation only.
10957 * @param sanitizer An optional sanitizer function
10958 * @returns itself, so that it may be chained.
10959 * @codeGenApi
10960 */
10961export declare function ɵɵattributeInterpolate2(attrName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate2;
10962
10963/**
10964 *
10965 * Update an interpolated attribute on an element with 3 bound values surrounded by text.
10966 *
10967 * Used when the value passed to a property has 3 interpolated values in it:
10968 *
10969 * ```html
10970 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
10971 * ```
10972 *
10973 * Its compiled representation is::
10974 *
10975 * ```ts
10976 * ɵɵattributeInterpolate3(
10977 * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
10978 * ```
10979 *
10980 * @param attrName The name of the attribute to update
10981 * @param prefix Static value used for concatenation only.
10982 * @param v0 Value checked for change.
10983 * @param i0 Static value used for concatenation only.
10984 * @param v1 Value checked for change.
10985 * @param i1 Static value used for concatenation only.
10986 * @param v2 Value checked for change.
10987 * @param suffix Static value used for concatenation only.
10988 * @param sanitizer An optional sanitizer function
10989 * @returns itself, so that it may be chained.
10990 * @codeGenApi
10991 */
10992export declare function ɵɵattributeInterpolate3(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate3;
10993
10994/**
10995 *
10996 * Update an interpolated attribute on an element with 4 bound values surrounded by text.
10997 *
10998 * Used when the value passed to a property has 4 interpolated values in it:
10999 *
11000 * ```html
11001 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
11002 * ```
11003 *
11004 * Its compiled representation is::
11005 *
11006 * ```ts
11007 * ɵɵattributeInterpolate4(
11008 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
11009 * ```
11010 *
11011 * @param attrName The name of the attribute to update
11012 * @param prefix Static value used for concatenation only.
11013 * @param v0 Value checked for change.
11014 * @param i0 Static value used for concatenation only.
11015 * @param v1 Value checked for change.
11016 * @param i1 Static value used for concatenation only.
11017 * @param v2 Value checked for change.
11018 * @param i2 Static value used for concatenation only.
11019 * @param v3 Value checked for change.
11020 * @param suffix Static value used for concatenation only.
11021 * @param sanitizer An optional sanitizer function
11022 * @returns itself, so that it may be chained.
11023 * @codeGenApi
11024 */
11025export declare function ɵɵattributeInterpolate4(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate4;
11026
11027/**
11028 *
11029 * Update an interpolated attribute on an element with 5 bound values surrounded by text.
11030 *
11031 * Used when the value passed to a property has 5 interpolated values in it:
11032 *
11033 * ```html
11034 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
11035 * ```
11036 *
11037 * Its compiled representation is::
11038 *
11039 * ```ts
11040 * ɵɵattributeInterpolate5(
11041 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
11042 * ```
11043 *
11044 * @param attrName The name of the attribute to update
11045 * @param prefix Static value used for concatenation only.
11046 * @param v0 Value checked for change.
11047 * @param i0 Static value used for concatenation only.
11048 * @param v1 Value checked for change.
11049 * @param i1 Static value used for concatenation only.
11050 * @param v2 Value checked for change.
11051 * @param i2 Static value used for concatenation only.
11052 * @param v3 Value checked for change.
11053 * @param i3 Static value used for concatenation only.
11054 * @param v4 Value checked for change.
11055 * @param suffix Static value used for concatenation only.
11056 * @param sanitizer An optional sanitizer function
11057 * @returns itself, so that it may be chained.
11058 * @codeGenApi
11059 */
11060export declare function ɵɵattributeInterpolate5(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate5;
11061
11062/**
11063 *
11064 * Update an interpolated attribute on an element with 6 bound values surrounded by text.
11065 *
11066 * Used when the value passed to a property has 6 interpolated values in it:
11067 *
11068 * ```html
11069 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
11070 * ```
11071 *
11072 * Its compiled representation is::
11073 *
11074 * ```ts
11075 * ɵɵattributeInterpolate6(
11076 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
11077 * ```
11078 *
11079 * @param attrName The name of the attribute to update
11080 * @param prefix Static value used for concatenation only.
11081 * @param v0 Value checked for change.
11082 * @param i0 Static value used for concatenation only.
11083 * @param v1 Value checked for change.
11084 * @param i1 Static value used for concatenation only.
11085 * @param v2 Value checked for change.
11086 * @param i2 Static value used for concatenation only.
11087 * @param v3 Value checked for change.
11088 * @param i3 Static value used for concatenation only.
11089 * @param v4 Value checked for change.
11090 * @param i4 Static value used for concatenation only.
11091 * @param v5 Value checked for change.
11092 * @param suffix Static value used for concatenation only.
11093 * @param sanitizer An optional sanitizer function
11094 * @returns itself, so that it may be chained.
11095 * @codeGenApi
11096 */
11097export declare function ɵɵattributeInterpolate6(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate6;
11098
11099/**
11100 *
11101 * Update an interpolated attribute on an element with 7 bound values surrounded by text.
11102 *
11103 * Used when the value passed to a property has 7 interpolated values in it:
11104 *
11105 * ```html
11106 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
11107 * ```
11108 *
11109 * Its compiled representation is::
11110 *
11111 * ```ts
11112 * ɵɵattributeInterpolate7(
11113 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
11114 * ```
11115 *
11116 * @param attrName The name of the attribute to update
11117 * @param prefix Static value used for concatenation only.
11118 * @param v0 Value checked for change.
11119 * @param i0 Static value used for concatenation only.
11120 * @param v1 Value checked for change.
11121 * @param i1 Static value used for concatenation only.
11122 * @param v2 Value checked for change.
11123 * @param i2 Static value used for concatenation only.
11124 * @param v3 Value checked for change.
11125 * @param i3 Static value used for concatenation only.
11126 * @param v4 Value checked for change.
11127 * @param i4 Static value used for concatenation only.
11128 * @param v5 Value checked for change.
11129 * @param i5 Static value used for concatenation only.
11130 * @param v6 Value checked for change.
11131 * @param suffix Static value used for concatenation only.
11132 * @param sanitizer An optional sanitizer function
11133 * @returns itself, so that it may be chained.
11134 * @codeGenApi
11135 */
11136export declare function ɵɵattributeInterpolate7(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate7;
11137
11138/**
11139 *
11140 * Update an interpolated attribute on an element with 8 bound values surrounded by text.
11141 *
11142 * Used when the value passed to a property has 8 interpolated values in it:
11143 *
11144 * ```html
11145 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
11146 * ```
11147 *
11148 * Its compiled representation is::
11149 *
11150 * ```ts
11151 * ɵɵattributeInterpolate8(
11152 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
11153 * ```
11154 *
11155 * @param attrName The name of the attribute to update
11156 * @param prefix Static value used for concatenation only.
11157 * @param v0 Value checked for change.
11158 * @param i0 Static value used for concatenation only.
11159 * @param v1 Value checked for change.
11160 * @param i1 Static value used for concatenation only.
11161 * @param v2 Value checked for change.
11162 * @param i2 Static value used for concatenation only.
11163 * @param v3 Value checked for change.
11164 * @param i3 Static value used for concatenation only.
11165 * @param v4 Value checked for change.
11166 * @param i4 Static value used for concatenation only.
11167 * @param v5 Value checked for change.
11168 * @param i5 Static value used for concatenation only.
11169 * @param v6 Value checked for change.
11170 * @param i6 Static value used for concatenation only.
11171 * @param v7 Value checked for change.
11172 * @param suffix Static value used for concatenation only.
11173 * @param sanitizer An optional sanitizer function
11174 * @returns itself, so that it may be chained.
11175 * @codeGenApi
11176 */
11177export declare function ɵɵattributeInterpolate8(attrName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate8;
11178
11179/**
11180 * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.
11181 *
11182 * Used when the number of interpolated values exceeds 8.
11183 *
11184 * ```html
11185 * <div
11186 * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
11187 * ```
11188 *
11189 * Its compiled representation is::
11190 *
11191 * ```ts
11192 * ɵɵattributeInterpolateV(
11193 * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
11194 * 'suffix']);
11195 * ```
11196 *
11197 * @param attrName The name of the attribute to update.
11198 * @param values The collection of values and the strings in-between those values, beginning with
11199 * a string prefix and ending with a string suffix.
11200 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
11201 * @param sanitizer An optional sanitizer function
11202 * @returns itself, so that it may be chained.
11203 * @codeGenApi
11204 */
11205export declare function ɵɵattributeInterpolateV(attrName: string, values: any[], sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolateV;
11206
11207/**
11208 * Update class bindings using an object literal or class-string on an element.
11209 *
11210 * This instruction is meant to apply styling via the `[class]="exp"` template bindings.
11211 * When classes are applied to the element they will then be updated with
11212 * respect to any styles/classes set via `classProp`. If any
11213 * classes are set to falsy then they will be removed from the element.
11214 *
11215 * Note that the styling instruction will not be applied until `stylingApply` is called.
11216 * Note that this will the provided classMap value to the host element if this function is called
11217 * within a host binding.
11218 *
11219 * @param classes A key/value map or string of CSS classes that will be added to the
11220 * given element. Any missing classes (that have already been applied to the element
11221 * beforehand) will be removed (unset) from the element's list of CSS classes.
11222 *
11223 * @codeGenApi
11224 */
11225export declare function ɵɵclassMap(classes: {
11226 [className: string]: boolean | undefined | null;
11227} | string | undefined | null): void;
11228
11229
11230/**
11231 *
11232 * Update an interpolated class on an element with single bound value surrounded by text.
11233 *
11234 * Used when the value passed to a property has 1 interpolated value in it:
11235 *
11236 * ```html
11237 * <div class="prefix{{v0}}suffix"></div>
11238 * ```
11239 *
11240 * Its compiled representation is:
11241 *
11242 * ```ts
11243 * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');
11244 * ```
11245 *
11246 * @param prefix Static value used for concatenation only.
11247 * @param v0 Value checked for change.
11248 * @param suffix Static value used for concatenation only.
11249 * @codeGenApi
11250 */
11251export declare function ɵɵclassMapInterpolate1(prefix: string, v0: any, suffix: string): void;
11252
11253/**
11254 *
11255 * Update an interpolated class on an element with 2 bound values surrounded by text.
11256 *
11257 * Used when the value passed to a property has 2 interpolated values in it:
11258 *
11259 * ```html
11260 * <div class="prefix{{v0}}-{{v1}}suffix"></div>
11261 * ```
11262 *
11263 * Its compiled representation is:
11264 *
11265 * ```ts
11266 * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');
11267 * ```
11268 *
11269 * @param prefix Static value used for concatenation only.
11270 * @param v0 Value checked for change.
11271 * @param i0 Static value used for concatenation only.
11272 * @param v1 Value checked for change.
11273 * @param suffix Static value used for concatenation only.
11274 * @codeGenApi
11275 */
11276export declare function ɵɵclassMapInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): void;
11277
11278/**
11279 *
11280 * Update an interpolated class on an element with 3 bound values surrounded by text.
11281 *
11282 * Used when the value passed to a property has 3 interpolated values in it:
11283 *
11284 * ```html
11285 * <div class="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
11286 * ```
11287 *
11288 * Its compiled representation is:
11289 *
11290 * ```ts
11291 * ɵɵclassMapInterpolate3(
11292 * 'prefix', v0, '-', v1, '-', v2, 'suffix');
11293 * ```
11294 *
11295 * @param prefix Static value used for concatenation only.
11296 * @param v0 Value checked for change.
11297 * @param i0 Static value used for concatenation only.
11298 * @param v1 Value checked for change.
11299 * @param i1 Static value used for concatenation only.
11300 * @param v2 Value checked for change.
11301 * @param suffix Static value used for concatenation only.
11302 * @codeGenApi
11303 */
11304export declare function ɵɵclassMapInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void;
11305
11306/**
11307 *
11308 * Update an interpolated class on an element with 4 bound values surrounded by text.
11309 *
11310 * Used when the value passed to a property has 4 interpolated values in it:
11311 *
11312 * ```html
11313 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
11314 * ```
11315 *
11316 * Its compiled representation is:
11317 *
11318 * ```ts
11319 * ɵɵclassMapInterpolate4(
11320 * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
11321 * ```
11322 *
11323 * @param prefix Static value used for concatenation only.
11324 * @param v0 Value checked for change.
11325 * @param i0 Static value used for concatenation only.
11326 * @param v1 Value checked for change.
11327 * @param i1 Static value used for concatenation only.
11328 * @param v2 Value checked for change.
11329 * @param i2 Static value used for concatenation only.
11330 * @param v3 Value checked for change.
11331 * @param suffix Static value used for concatenation only.
11332 * @codeGenApi
11333 */
11334export declare function ɵɵclassMapInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): void;
11335
11336/**
11337 *
11338 * Update an interpolated class on an element with 5 bound values surrounded by text.
11339 *
11340 * Used when the value passed to a property has 5 interpolated values in it:
11341 *
11342 * ```html
11343 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
11344 * ```
11345 *
11346 * Its compiled representation is:
11347 *
11348 * ```ts
11349 * ɵɵclassMapInterpolate5(
11350 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
11351 * ```
11352 *
11353 * @param prefix Static value used for concatenation only.
11354 * @param v0 Value checked for change.
11355 * @param i0 Static value used for concatenation only.
11356 * @param v1 Value checked for change.
11357 * @param i1 Static value used for concatenation only.
11358 * @param v2 Value checked for change.
11359 * @param i2 Static value used for concatenation only.
11360 * @param v3 Value checked for change.
11361 * @param i3 Static value used for concatenation only.
11362 * @param v4 Value checked for change.
11363 * @param suffix Static value used for concatenation only.
11364 * @codeGenApi
11365 */
11366export declare function ɵɵclassMapInterpolate5(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string): void;
11367
11368/**
11369 *
11370 * Update an interpolated class on an element with 6 bound values surrounded by text.
11371 *
11372 * Used when the value passed to a property has 6 interpolated values in it:
11373 *
11374 * ```html
11375 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
11376 * ```
11377 *
11378 * Its compiled representation is:
11379 *
11380 * ```ts
11381 * ɵɵclassMapInterpolate6(
11382 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
11383 * ```
11384 *
11385 * @param prefix Static value used for concatenation only.
11386 * @param v0 Value checked for change.
11387 * @param i0 Static value used for concatenation only.
11388 * @param v1 Value checked for change.
11389 * @param i1 Static value used for concatenation only.
11390 * @param v2 Value checked for change.
11391 * @param i2 Static value used for concatenation only.
11392 * @param v3 Value checked for change.
11393 * @param i3 Static value used for concatenation only.
11394 * @param v4 Value checked for change.
11395 * @param i4 Static value used for concatenation only.
11396 * @param v5 Value checked for change.
11397 * @param suffix Static value used for concatenation only.
11398 * @codeGenApi
11399 */
11400export declare function ɵɵclassMapInterpolate6(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): void;
11401
11402/**
11403 *
11404 * Update an interpolated class on an element with 7 bound values surrounded by text.
11405 *
11406 * Used when the value passed to a property has 7 interpolated values in it:
11407 *
11408 * ```html
11409 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
11410 * ```
11411 *
11412 * Its compiled representation is:
11413 *
11414 * ```ts
11415 * ɵɵclassMapInterpolate7(
11416 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
11417 * ```
11418 *
11419 * @param prefix Static value used for concatenation only.
11420 * @param v0 Value checked for change.
11421 * @param i0 Static value used for concatenation only.
11422 * @param v1 Value checked for change.
11423 * @param i1 Static value used for concatenation only.
11424 * @param v2 Value checked for change.
11425 * @param i2 Static value used for concatenation only.
11426 * @param v3 Value checked for change.
11427 * @param i3 Static value used for concatenation only.
11428 * @param v4 Value checked for change.
11429 * @param i4 Static value used for concatenation only.
11430 * @param v5 Value checked for change.
11431 * @param i5 Static value used for concatenation only.
11432 * @param v6 Value checked for change.
11433 * @param suffix Static value used for concatenation only.
11434 * @codeGenApi
11435 */
11436export declare function ɵɵclassMapInterpolate7(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): void;
11437
11438/**
11439 *
11440 * Update an interpolated class on an element with 8 bound values surrounded by text.
11441 *
11442 * Used when the value passed to a property has 8 interpolated values in it:
11443 *
11444 * ```html
11445 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
11446 * ```
11447 *
11448 * Its compiled representation is:
11449 *
11450 * ```ts
11451 * ɵɵclassMapInterpolate8(
11452 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
11453 * ```
11454 *
11455 * @param prefix Static value used for concatenation only.
11456 * @param v0 Value checked for change.
11457 * @param i0 Static value used for concatenation only.
11458 * @param v1 Value checked for change.
11459 * @param i1 Static value used for concatenation only.
11460 * @param v2 Value checked for change.
11461 * @param i2 Static value used for concatenation only.
11462 * @param v3 Value checked for change.
11463 * @param i3 Static value used for concatenation only.
11464 * @param v4 Value checked for change.
11465 * @param i4 Static value used for concatenation only.
11466 * @param v5 Value checked for change.
11467 * @param i5 Static value used for concatenation only.
11468 * @param v6 Value checked for change.
11469 * @param i6 Static value used for concatenation only.
11470 * @param v7 Value checked for change.
11471 * @param suffix Static value used for concatenation only.
11472 * @codeGenApi
11473 */
11474export declare function ɵɵclassMapInterpolate8(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string): void;
11475
11476/**
11477 * Update an interpolated class on an element with 9 or more bound values surrounded by text.
11478 *
11479 * Used when the number of interpolated values exceeds 8.
11480 *
11481 * ```html
11482 * <div
11483 * class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
11484 * ```
11485 *
11486 * Its compiled representation is:
11487 *
11488 * ```ts
11489 * ɵɵclassMapInterpolateV(
11490 * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
11491 * 'suffix']);
11492 * ```
11493 *.
11494 * @param values The collection of values and the strings in-between those values, beginning with
11495 * a string prefix and ending with a string suffix.
11496 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
11497 * @codeGenApi
11498 */
11499export declare function ɵɵclassMapInterpolateV(values: any[]): void;
11500
11501/**
11502 * Update a class binding on an element with the provided value.
11503 *
11504 * This instruction is meant to handle the `[class.foo]="exp"` case and,
11505 * therefore, the class binding itself must already be allocated using
11506 * `styling` within the creation block.
11507 *
11508 * @param prop A valid CSS class (only one).
11509 * @param value A true/false value which will turn the class on or off.
11510 *
11511 * Note that this will apply the provided class value to the host element if this function
11512 * is called within a host binding function.
11513 *
11514 * @codeGenApi
11515 */
11516export declare function ɵɵclassProp(className: string, value: boolean | undefined | null): typeof ɵɵclassProp;
11517
11518/**
11519 * @publicApi
11520 */
11521export declare type ɵɵComponentDeclaration<T, Selector extends String, ExportAs extends string[], InputMap extends {
11522 [key: string]: string;
11523}, OutputMap extends {
11524 [key: string]: string;
11525}, QueryFields extends string[], NgContentSelectors extends string[]> = unknown;
11526
11527/**
11528 * Registers a QueryList, associated with a content query, for later refresh (part of a view
11529 * refresh).
11530 *
11531 * @param directiveIndex Current directive index
11532 * @param predicate The type for which the query will search
11533 * @param flags Flags associated with the query
11534 * @param read What to save in the query
11535 * @returns QueryList<T>
11536 *
11537 * @codeGenApi
11538 */
11539export declare function ɵɵcontentQuery<T>(directiveIndex: number, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): void;
11540
11541/**
11542 * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a
11543 * definition.
11544 *
11545 * This exists primarily to support ngcc migration of an existing View Engine pattern, where an
11546 * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it
11547 * generates a skeleton definition on the child class, and applies this feature.
11548 *
11549 * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,
11550 * including things like the component template function.
11551 *
11552 * @param definition The definition of a child class which inherits from a parent class with its
11553 * own definition.
11554 *
11555 * @codeGenApi
11556 */
11557export declare function ɵɵCopyDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
11558
11559/**
11560 * Create a component definition object.
11561 *
11562 *
11563 * # Example
11564 * ```
11565 * class MyDirective {
11566 * // Generated by Angular Template Compiler
11567 * // [Symbol] syntax will not be supported by TypeScript until v2.7
11568 * static ɵcmp = defineComponent({
11569 * ...
11570 * });
11571 * }
11572 * ```
11573 * @codeGenApi
11574 */
11575export declare function ɵɵdefineComponent<T>(componentDefinition: {
11576 /**
11577 * Directive type, needed to configure the injector.
11578 */
11579 type: Type<T>;
11580 /** The selectors that will be used to match nodes to this component. */
11581 selectors?: ɵCssSelectorList;
11582 /**
11583 * The number of nodes, local refs, and pipes in this component template.
11584 *
11585 * Used to calculate the length of this component's LView array, so we
11586 * can pre-fill the array and set the binding start index.
11587 */
11588 decls: number;
11589 /**
11590 * The number of bindings in this component template (including pure fn bindings).
11591 *
11592 * Used to calculate the length of this component's LView array, so we
11593 * can pre-fill the array and set the host binding start index.
11594 */
11595 vars: number;
11596 /**
11597 * A map of input names.
11598 *
11599 * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
11600 *
11601 * Given:
11602 * ```
11603 * class MyComponent {
11604 * @Input()
11605 * publicInput1: string;
11606 *
11607 * @Input('publicInput2')
11608 * declaredInput2: string;
11609 * }
11610 * ```
11611 *
11612 * is described as:
11613 * ```
11614 * {
11615 * publicInput1: 'publicInput1',
11616 * declaredInput2: ['publicInput2', 'declaredInput2'],
11617 * }
11618 * ```
11619 *
11620 * Which the minifier may translate to:
11621 * ```
11622 * {
11623 * minifiedPublicInput1: 'publicInput1',
11624 * minifiedDeclaredInput2: ['publicInput2', 'declaredInput2'],
11625 * }
11626 * ```
11627 *
11628 * This allows the render to re-construct the minified, public, and declared names
11629 * of properties.
11630 *
11631 * NOTE:
11632 * - Because declared and public name are usually same we only generate the array
11633 * `['public', 'declared']` format when they differ.
11634 * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
11635 * inconsistent behavior in that it uses declared names rather than minified or public. For
11636 * this reason `NgOnChanges` will be deprecated and removed in future version and this
11637 * API will be simplified to be consistent with `output`.
11638 */
11639 inputs?: {
11640 [P in keyof T]?: string | [string, string];
11641 };
11642 /**
11643 * A map of output names.
11644 *
11645 * The format is in: `{[actualPropertyName: string]:string}`.
11646 *
11647 * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
11648 *
11649 * This allows the render to re-construct the minified and non-minified names
11650 * of properties.
11651 */
11652 outputs?: {
11653 [P in keyof T]?: string;
11654 };
11655 /**
11656 * Function executed by the parent template to allow child directive to apply host bindings.
11657 */
11658 hostBindings?: HostBindingsFunction<T>;
11659 /**
11660 * The number of bindings in this directive `hostBindings` (including pure fn bindings).
11661 *
11662 * Used to calculate the length of the component's LView array, so we
11663 * can pre-fill the array and set the host binding start index.
11664 */
11665 hostVars?: number;
11666 /**
11667 * Assign static attribute values to a host element.
11668 *
11669 * This property will assign static attribute values as well as class and style
11670 * values to a host element. Since attribute values can consist of different types of values, the
11671 * `hostAttrs` array must include the values in the following format:
11672 *
11673 * attrs = [
11674 * // static attributes (like `title`, `name`, `id`...)
11675 * attr1, value1, attr2, value,
11676 *
11677 * // a single namespace value (like `x:id`)
11678 * NAMESPACE_MARKER, namespaceUri1, name1, value1,
11679 *
11680 * // another single namespace value (like `x:name`)
11681 * NAMESPACE_MARKER, namespaceUri2, name2, value2,
11682 *
11683 * // a series of CSS classes that will be applied to the element (no spaces)
11684 * CLASSES_MARKER, class1, class2, class3,
11685 *
11686 * // a series of CSS styles (property + value) that will be applied to the element
11687 * STYLES_MARKER, prop1, value1, prop2, value2
11688 * ]
11689 *
11690 * All non-class and non-style attributes must be defined at the start of the list
11691 * first before all class and style values are set. When there is a change in value
11692 * type (like when classes and styles are introduced) a marker must be used to separate
11693 * the entries. The marker values themselves are set via entries found in the
11694 * [AttributeMarker] enum.
11695 */
11696 hostAttrs?: TAttributes;
11697 /**
11698 * Function to create instances of content queries associated with a given directive.
11699 */
11700 contentQueries?: ContentQueriesFunction<T>;
11701 /**
11702 * Defines the name that can be used in the template to assign this directive to a variable.
11703 *
11704 * See: {@link Directive.exportAs}
11705 */
11706 exportAs?: string[];
11707 /**
11708 * Template function use for rendering DOM.
11709 *
11710 * This function has following structure.
11711 *
11712 * ```
11713 * function Template<T>(ctx:T, creationMode: boolean) {
11714 * if (creationMode) {
11715 * // Contains creation mode instructions.
11716 * }
11717 * // Contains binding update instructions
11718 * }
11719 * ```
11720 *
11721 * Common instructions are:
11722 * Creation mode instructions:
11723 * - `elementStart`, `elementEnd`
11724 * - `text`
11725 * - `container`
11726 * - `listener`
11727 *
11728 * Binding update instructions:
11729 * - `bind`
11730 * - `elementAttribute`
11731 * - `elementProperty`
11732 * - `elementClass`
11733 * - `elementStyle`
11734 *
11735 */
11736 template: ComponentTemplate<T>;
11737 /**
11738 * Constants for the nodes in the component's view.
11739 * Includes attribute arrays, local definition arrays etc.
11740 */
11741 consts?: TConstantsOrFactory;
11742 /**
11743 * An array of `ngContent[selector]` values that were found in the template.
11744 */
11745 ngContentSelectors?: string[];
11746 /**
11747 * Additional set of instructions specific to view query processing. This could be seen as a
11748 * set of instruction to be inserted into the template function.
11749 *
11750 * Query-related instructions need to be pulled out to a specific function as a timing of
11751 * execution is different as compared to all other instructions (after change detection hooks but
11752 * before view hooks).
11753 */
11754 viewQuery?: ViewQueriesFunction<T> | null;
11755 /**
11756 * A list of optional features to apply.
11757 *
11758 * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}
11759 */
11760 features?: ComponentDefFeature[];
11761 /**
11762 * Defines template and style encapsulation options available for Component's {@link Component}.
11763 */
11764 encapsulation?: ViewEncapsulation;
11765 /**
11766 * Defines arbitrary developer-defined data to be stored on a renderer instance.
11767 * This is useful for renderers that delegate to other renderers.
11768 *
11769 * see: animation
11770 */
11771 data?: {
11772 [kind: string]: any;
11773 };
11774 /**
11775 * A set of styles that the component needs to be present for component to render correctly.
11776 */
11777 styles?: string[];
11778 /**
11779 * The strategy that the default change detector uses to detect changes.
11780 * When set, takes effect the next time change detection is triggered.
11781 */
11782 changeDetection?: ChangeDetectionStrategy;
11783 /**
11784 * Registry of directives and components that may be found in this component's view.
11785 *
11786 * The property is either an array of `DirectiveDef`s or a function which returns the array of
11787 * `DirectiveDef`s. The function is necessary to be able to support forward declarations.
11788 */
11789 directives?: DirectiveTypesOrFactory | null;
11790 /**
11791 * Registry of pipes that may be found in this component's view.
11792 *
11793 * The property is either an array of `PipeDefs`s or a function which returns the array of
11794 * `PipeDefs`s. The function is necessary to be able to support forward declarations.
11795 */
11796 pipes?: PipeTypesOrFactory | null;
11797 /**
11798 * The set of schemas that declare elements to be allowed in the component's template.
11799 */
11800 schemas?: SchemaMetadata[] | null;
11801}): unknown;
11802
11803/**
11804 * Create a directive definition object.
11805 *
11806 * # Example
11807 * ```ts
11808 * class MyDirective {
11809 * // Generated by Angular Template Compiler
11810 * // [Symbol] syntax will not be supported by TypeScript until v2.7
11811 * static ɵdir = ɵɵdefineDirective({
11812 * ...
11813 * });
11814 * }
11815 * ```
11816 *
11817 * @codeGenApi
11818 */
11819export declare const ɵɵdefineDirective: <T>(directiveDefinition: {
11820 /**
11821 * Directive type, needed to configure the injector.
11822 */
11823 type: Type<T>;
11824 /** The selectors that will be used to match nodes to this directive. */
11825 selectors?: ɵCssSelectorList | undefined;
11826 /**
11827 * A map of input names.
11828 *
11829 * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
11830 *
11831 * Given:
11832 * ```
11833 * class MyComponent {
11834 * @Input()
11835 * publicInput1: string;
11836 *
11837 * @Input('publicInput2')
11838 * declaredInput2: string;
11839 * }
11840 * ```
11841 *
11842 * is described as:
11843 * ```
11844 * {
11845 * publicInput1: 'publicInput1',
11846 * declaredInput2: ['declaredInput2', 'publicInput2'],
11847 * }
11848 * ```
11849 *
11850 * Which the minifier may translate to:
11851 * ```
11852 * {
11853 * minifiedPublicInput1: 'publicInput1',
11854 * minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],
11855 * }
11856 * ```
11857 *
11858 * This allows the render to re-construct the minified, public, and declared names
11859 * of properties.
11860 *
11861 * NOTE:
11862 * - Because declared and public name are usually same we only generate the array
11863 * `['declared', 'public']` format when they differ.
11864 * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
11865 * inconsistent behavior in that it uses declared names rather than minified or public. For
11866 * this reason `NgOnChanges` will be deprecated and removed in future version and this
11867 * API will be simplified to be consistent with `output`.
11868 */
11869 inputs?: { [P in keyof T]?: string | [string, string] | undefined; } | undefined;
11870 /**
11871 * A map of output names.
11872 *
11873 * The format is in: `{[actualPropertyName: string]:string}`.
11874 *
11875 * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
11876 *
11877 * This allows the render to re-construct the minified and non-minified names
11878 * of properties.
11879 */
11880 outputs?: { [P_1 in keyof T]?: string | undefined; } | undefined;
11881 /**
11882 * A list of optional features to apply.
11883 *
11884 * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}
11885 */
11886 features?: DirectiveDefFeature[] | undefined;
11887 /**
11888 * Function executed by the parent template to allow child directive to apply host bindings.
11889 */
11890 hostBindings?: HostBindingsFunction<T> | undefined;
11891 /**
11892 * The number of bindings in this directive `hostBindings` (including pure fn bindings).
11893 *
11894 * Used to calculate the length of the component's LView array, so we
11895 * can pre-fill the array and set the host binding start index.
11896 */
11897 hostVars?: number | undefined;
11898 /**
11899 * Assign static attribute values to a host element.
11900 *
11901 * This property will assign static attribute values as well as class and style
11902 * values to a host element. Since attribute values can consist of different types of values,
11903 * the `hostAttrs` array must include the values in the following format:
11904 *
11905 * attrs = [
11906 * // static attributes (like `title`, `name`, `id`...)
11907 * attr1, value1, attr2, value,
11908 *
11909 * // a single namespace value (like `x:id`)
11910 * NAMESPACE_MARKER, namespaceUri1, name1, value1,
11911 *
11912 * // another single namespace value (like `x:name`)
11913 * NAMESPACE_MARKER, namespaceUri2, name2, value2,
11914 *
11915 * // a series of CSS classes that will be applied to the element (no spaces)
11916 * CLASSES_MARKER, class1, class2, class3,
11917 *
11918 * // a series of CSS styles (property + value) that will be applied to the element
11919 * STYLES_MARKER, prop1, value1, prop2, value2
11920 * ]
11921 *
11922 * All non-class and non-style attributes must be defined at the start of the list
11923 * first before all class and style values are set. When there is a change in value
11924 * type (like when classes and styles are introduced) a marker must be used to separate
11925 * the entries. The marker values themselves are set via entries found in the
11926 * [AttributeMarker] enum.
11927 */
11928 hostAttrs?: TAttributes | undefined;
11929 /**
11930 * Function to create instances of content queries associated with a given directive.
11931 */
11932 contentQueries?: ContentQueriesFunction<T> | undefined;
11933 /**
11934 * Additional set of instructions specific to view query processing. This could be seen as a
11935 * set of instructions to be inserted into the template function.
11936 */
11937 viewQuery?: ViewQueriesFunction<T> | null | undefined;
11938 /**
11939 * Defines the name that can be used in the template to assign this directive to a variable.
11940 *
11941 * See: {@link Directive.exportAs}
11942 */
11943 exportAs?: string[] | undefined;
11944}) => never;
11945
11946/**
11947 * Construct an injectable definition which defines how a token will be constructed by the DI
11948 * system, and in which injectors (if any) it will be available.
11949 *
11950 * This should be assigned to a static `ɵprov` field on a type, which will then be an
11951 * `InjectableType`.
11952 *
11953 * Options:
11954 * * `providedIn` determines which injectors will include the injectable, by either associating it
11955 * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be
11956 * provided in the `'root'` injector, which will be the application-level injector in most apps.
11957 * * `factory` gives the zero argument function which will create an instance of the injectable.
11958 * The factory can call `inject` to access the `Injector` and request injection of dependencies.
11959 *
11960 * @codeGenApi
11961 * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
11962 */
11963export declare function ɵɵdefineInjectable<T>(opts: {
11964 token: unknown;
11965 providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
11966 factory: () => T;
11967}): unknown;
11968
11969/**
11970 * Construct an `InjectorDef` which configures an injector.
11971 *
11972 * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an
11973 * `InjectorType`.
11974 *
11975 * Options:
11976 *
11977 * * `providers`: an optional array of providers to add to the injector. Each provider must
11978 * either have a factory or point to a type which has a `ɵprov` static property (the
11979 * type must be an `InjectableType`).
11980 * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s
11981 * whose providers will also be added to the injector. Locally provided types will override
11982 * providers from imports.
11983 *
11984 * @codeGenApi
11985 */
11986export declare function ɵɵdefineInjector(options: {
11987 providers?: any[];
11988 imports?: any[];
11989}): unknown;
11990
11991/**
11992 * @codeGenApi
11993 */
11994export declare function ɵɵdefineNgModule<T>(def: {
11995 /** Token representing the module. Used by DI. */
11996 type: T;
11997 /** List of components to bootstrap. */
11998 bootstrap?: Type<any>[] | (() => Type<any>[]);
11999 /** List of components, directives, and pipes declared by this module. */
12000 declarations?: Type<any>[] | (() => Type<any>[]);
12001 /** List of modules or `ModuleWithProviders` imported by this module. */
12002 imports?: Type<any>[] | (() => Type<any>[]);
12003 /**
12004 * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
12005 * module.
12006 */
12007 exports?: Type<any>[] | (() => Type<any>[]);
12008 /** The set of schemas that declare elements to be allowed in the NgModule. */
12009 schemas?: SchemaMetadata[] | null;
12010 /** Unique ID for the module that is used with `getModuleFactory`. */
12011 id?: string | null;
12012}): unknown;
12013
12014/**
12015 * Create a pipe definition object.
12016 *
12017 * # Example
12018 * ```
12019 * class MyPipe implements PipeTransform {
12020 * // Generated by Angular Template Compiler
12021 * static ɵpipe = definePipe({
12022 * ...
12023 * });
12024 * }
12025 * ```
12026 * @param pipeDef Pipe definition generated by the compiler
12027 *
12028 * @codeGenApi
12029 */
12030export declare function ɵɵdefinePipe<T>(pipeDef: {
12031 /** Name of the pipe. Used for matching pipes in template to pipe defs. */
12032 name: string;
12033 /** Pipe class reference. Needed to extract pipe lifecycle hooks. */
12034 type: Type<T>;
12035 /** Whether the pipe is pure. */
12036 pure?: boolean;
12037}): unknown;
12038
12039
12040/**
12041 * @publicApi
12042 */
12043export declare type ɵɵDirectiveDeclaration<T, Selector extends string, ExportAs extends string[], InputMap extends {
12044 [key: string]: string;
12045}, OutputMap extends {
12046 [key: string]: string;
12047}, QueryFields extends string[]> = unknown;
12048
12049/**
12050 * Returns the value associated to the given token from the injectors.
12051 *
12052 * `directiveInject` is intended to be used for directive, component and pipe factories.
12053 * All other injection use `inject` which does not walk the node injector tree.
12054 *
12055 * Usage example (in factory function):
12056 *
12057 * ```ts
12058 * class SomeDirective {
12059 * constructor(directive: DirectiveA) {}
12060 *
12061 * static ɵdir = ɵɵdefineDirective({
12062 * type: SomeDirective,
12063 * factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))
12064 * });
12065 * }
12066 * ```
12067 * @param token the type or token to inject
12068 * @param flags Injection flags
12069 * @returns the value from the injector or `null` when not found
12070 *
12071 * @codeGenApi
12072 */
12073export declare function ɵɵdirectiveInject<T>(token: ProviderToken<T>): T;
12074
12075export declare function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags: InjectFlags): T;
12076
12077/**
12078 * Disables directive matching on element.
12079 *
12080 * * Example:
12081 * ```
12082 * <my-comp my-directive>
12083 * Should match component / directive.
12084 * </my-comp>
12085 * <div ngNonBindable>
12086 * <!-- ɵɵdisableBindings() -->
12087 * <my-comp my-directive>
12088 * Should not match component / directive because we are in ngNonBindable.
12089 * </my-comp>
12090 * <!-- ɵɵenableBindings() -->
12091 * </div>
12092 * ```
12093 *
12094 * @codeGenApi
12095 */
12096export declare function ɵɵdisableBindings(): void;
12097
12098/**
12099 * Creates an empty element using {@link elementStart} and {@link elementEnd}
12100 *
12101 * @param index Index of the element in the data array
12102 * @param name Name of the DOM Node
12103 * @param attrsIndex Index of the element's attributes in the `consts` array.
12104 * @param localRefsIndex Index of the element's local references in the `consts` array.
12105 * @returns This function returns itself so that it may be chained.
12106 *
12107 * @codeGenApi
12108 */
12109export declare function ɵɵelement(index: number, name: string, attrsIndex?: number | null, localRefsIndex?: number): typeof ɵɵelement;
12110
12111/**
12112 * Creates an empty logical container using {@link elementContainerStart}
12113 * and {@link elementContainerEnd}
12114 *
12115 * @param index Index of the element in the LView array
12116 * @param attrsIndex Index of the container attributes in the `consts` array.
12117 * @param localRefsIndex Index of the container's local references in the `consts` array.
12118 * @returns This function returns itself so that it may be chained.
12119 *
12120 * @codeGenApi
12121 */
12122export declare function ɵɵelementContainer(index: number, attrsIndex?: number | null, localRefsIndex?: number): typeof ɵɵelementContainer;
12123
12124/**
12125 * Mark the end of the <ng-container>.
12126 * @returns This function returns itself so that it may be chained.
12127 *
12128 * @codeGenApi
12129 */
12130export declare function ɵɵelementContainerEnd(): typeof ɵɵelementContainerEnd;
12131
12132/**
12133 * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.
12134 * The instruction must later be followed by `elementContainerEnd()` call.
12135 *
12136 * @param index Index of the element in the LView array
12137 * @param attrsIndex Index of the container attributes in the `consts` array.
12138 * @param localRefsIndex Index of the container's local references in the `consts` array.
12139 * @returns This function returns itself so that it may be chained.
12140 *
12141 * Even if this instruction accepts a set of attributes no actual attribute values are propagated to
12142 * the DOM (as a comment node can't have attributes). Attributes are here only for directive
12143 * matching purposes and setting initial inputs of directives.
12144 *
12145 * @codeGenApi
12146 */
12147export declare function ɵɵelementContainerStart(index: number, attrsIndex?: number | null, localRefsIndex?: number): typeof ɵɵelementContainerStart;
12148
12149/**
12150 * Mark the end of the element.
12151 * @returns This function returns itself so that it may be chained.
12152 *
12153 * @codeGenApi
12154 */
12155export declare function ɵɵelementEnd(): typeof ɵɵelementEnd;
12156
12157
12158/**
12159 * Create DOM element. The instruction must later be followed by `elementEnd()` call.
12160 *
12161 * @param index Index of the element in the LView array
12162 * @param name Name of the DOM Node
12163 * @param attrsIndex Index of the element's attributes in the `consts` array.
12164 * @param localRefsIndex Index of the element's local references in the `consts` array.
12165 * @returns This function returns itself so that it may be chained.
12166 *
12167 * Attributes and localRefs are passed as an array of strings where elements with an even index
12168 * hold an attribute name and elements with an odd index hold an attribute value, ex.:
12169 * ['id', 'warning5', 'class', 'alert']
12170 *
12171 * @codeGenApi
12172 */
12173export declare function ɵɵelementStart(index: number, name: string, attrsIndex?: number | null, localRefsIndex?: number): typeof ɵɵelementStart;
12174
12175/**
12176 * Enables directive matching on elements.
12177 *
12178 * * Example:
12179 * ```
12180 * <my-comp my-directive>
12181 * Should match component / directive.
12182 * </my-comp>
12183 * <div ngNonBindable>
12184 * <!-- ɵɵdisableBindings() -->
12185 * <my-comp my-directive>
12186 * Should not match component / directive because we are in ngNonBindable.
12187 * </my-comp>
12188 * <!-- ɵɵenableBindings() -->
12189 * </div>
12190 * ```
12191 *
12192 * @codeGenApi
12193 */
12194export declare function ɵɵenableBindings(): void;
12195
12196/**
12197 * @publicApi
12198 */
12199export declare type ɵɵFactoryDeclaration<T, CtorDependencies extends CtorDependency[]> = unknown;
12200
12201export declare enum ɵɵFactoryTarget {
12202 Directive = 0,
12203 Component = 1,
12204 Injectable = 2,
12205 Pipe = 3,
12206 NgModule = 4
12207}
12208
12209/**
12210 * Returns the current OpaqueViewState instance.
12211 *
12212 * Used in conjunction with the restoreView() instruction to save a snapshot
12213 * of the current view and restore it when listeners are invoked. This allows
12214 * walking the declaration view tree in listeners to get vars from parent views.
12215 *
12216 * @codeGenApi
12217 */
12218export declare function ɵɵgetCurrentView(): OpaqueViewState;
12219
12220/**
12221 * @codeGenApi
12222 */
12223export declare function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T;
12224
12225/**
12226 * Update a property on a host element. Only applies to native node properties, not inputs.
12227 *
12228 * Operates on the element selected by index via the {@link select} instruction.
12229 *
12230 * @param propName Name of property. Because it is going to DOM, this is not subject to
12231 * renaming as part of minification.
12232 * @param value New value to write.
12233 * @param sanitizer An optional function used to sanitize the value.
12234 * @returns This function returns itself so that it may be chained
12235 * (e.g. `property('name', ctx.name)('title', ctx.title)`)
12236 *
12237 * @codeGenApi
12238 */
12239export declare function ɵɵhostProperty<T>(propName: string, value: T, sanitizer?: SanitizerFn | null): typeof ɵɵhostProperty;
12240
12241/**
12242 *
12243 * Use this instruction to create a translation block that doesn't contain any placeholder.
12244 * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.
12245 *
12246 * The translation `message` is the value which is locale specific. The translation string may
12247 * contain placeholders which associate inner elements and sub-templates within the translation.
12248 *
12249 * The translation `message` placeholders are:
12250 * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
12251 * interpolated into. The placeholder `index` points to the expression binding index. An optional
12252 * `block` that matches the sub-template in which it was declared.
12253 * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning
12254 * and end of DOM element that were embedded in the original translation block. The placeholder
12255 * `index` points to the element index in the template instructions set. An optional `block` that
12256 * matches the sub-template in which it was declared.
12257 * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
12258 * split up and translated separately in each angular template function. The `index` points to the
12259 * `template` instruction index. A `block` that matches the sub-template in which it was declared.
12260 *
12261 * @param index A unique index of the translation in the static block.
12262 * @param messageIndex An index of the translation message from the `def.consts` array.
12263 * @param subTemplateIndex Optional sub-template index in the `message`.
12264 *
12265 * @codeGenApi
12266 */
12267export declare function ɵɵi18n(index: number, messageIndex: number, subTemplateIndex?: number): void;
12268
12269/**
12270 * Updates a translation block or an i18n attribute when the bindings have changed.
12271 *
12272 * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}
12273 * (i18n attribute) on which it should update the content.
12274 *
12275 * @codeGenApi
12276 */
12277export declare function ɵɵi18nApply(index: number): void;
12278
12279/**
12280 * Marks a list of attributes as translatable.
12281 *
12282 * @param index A unique index in the static block
12283 * @param values
12284 *
12285 * @codeGenApi
12286 */
12287export declare function ɵɵi18nAttributes(index: number, attrsIndex: number): void;
12288
12289/**
12290 * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes
12291 * into the render tree, moves the placeholder nodes and removes the deleted nodes.
12292 *
12293 * @codeGenApi
12294 */
12295export declare function ɵɵi18nEnd(): void;
12296
12297/**
12298 * Stores the values of the bindings during each update cycle in order to determine if we need to
12299 * update the translated nodes.
12300 *
12301 * @param value The binding's value
12302 * @returns This function returns itself so that it may be chained
12303 * (e.g. `i18nExp(ctx.name)(ctx.title)`)
12304 *
12305 * @codeGenApi
12306 */
12307export declare function ɵɵi18nExp<T>(value: T): typeof ɵɵi18nExp;
12308
12309/**
12310 * Handles message string post-processing for internationalization.
12311 *
12312 * Handles message string post-processing by transforming it from intermediate
12313 * format (that might contain some markers that we need to replace) to the final
12314 * form, consumable by i18nStart instruction. Post processing steps include:
12315 *
12316 * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])
12317 * 2. Replace all ICU vars (like "VAR_PLURAL")
12318 * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}
12319 * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)
12320 * in case multiple ICUs have the same placeholder name
12321 *
12322 * @param message Raw translation string for post processing
12323 * @param replacements Set of replacements that should be applied
12324 *
12325 * @returns Transformed string that can be consumed by i18nStart instruction
12326 *
12327 * @codeGenApi
12328 */
12329export declare function ɵɵi18nPostprocess(message: string, replacements?: {
12330 [key: string]: (string | string[]);
12331}): string;
12332
12333/**
12334 * Marks a block of text as translatable.
12335 *
12336 * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.
12337 * The translation `message` is the value which is locale specific. The translation string may
12338 * contain placeholders which associate inner elements and sub-templates within the translation.
12339 *
12340 * The translation `message` placeholders are:
12341 * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
12342 * interpolated into. The placeholder `index` points to the expression binding index. An optional
12343 * `block` that matches the sub-template in which it was declared.
12344 * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning
12345 * and end of DOM element that were embedded in the original translation block. The placeholder
12346 * `index` points to the element index in the template instructions set. An optional `block` that
12347 * matches the sub-template in which it was declared.
12348 * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
12349 * split up and translated separately in each angular template function. The `index` points to the
12350 * `template` instruction index. A `block` that matches the sub-template in which it was declared.
12351 *
12352 * @param index A unique index of the translation in the static block.
12353 * @param messageIndex An index of the translation message from the `def.consts` array.
12354 * @param subTemplateIndex Optional sub-template index in the `message`.
12355 *
12356 * @codeGenApi
12357 */
12358export declare function ɵɵi18nStart(index: number, messageIndex: number, subTemplateIndex?: number): void;
12359
12360/**
12361 * Merges the definition from a super class to a sub class.
12362 * @param definition The definition that is a SubClass of another directive of component
12363 *
12364 * @codeGenApi
12365 */
12366export declare function ɵɵInheritDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
12367
12368/**
12369 * Generated instruction: Injects a token from the currently active injector.
12370 *
12371 * Must be used in the context of a factory function such as one defined for an
12372 * `InjectionToken`. Throws an error if not called from such a context.
12373 *
12374 * (Additional documentation moved to `inject`, as it is the public API, and an alias for this
12375 * instruction)
12376 *
12377 * @see inject
12378 * @codeGenApi
12379 * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
12380 */
12381export declare function ɵɵinject<T>(token: ProviderToken<T>): T;
12382
12383export declare function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
12384
12385/**
12386 * Information about how a type or `InjectionToken` interfaces with the DI system.
12387 *
12388 * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly
12389 * requesting injection of other types if necessary.
12390 *
12391 * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular
12392 * `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates
12393 * that the injectable does not belong to any scope.
12394 *
12395 * @codeGenApi
12396 * @publicApi The ViewEngine compiler emits code with this type for injectables. This code is
12397 * deployed to npm, and should be treated as public api.
12398
12399 */
12400export declare interface ɵɵInjectableDeclaration<T> {
12401 /**
12402 * Specifies that the given type belongs to a particular injector:
12403 * - `InjectorType` such as `NgModule`,
12404 * - `'root'` the root injector
12405 * - `'any'` all injectors.
12406 * - `null`, does not belong to any injector. Must be explicitly listed in the injector
12407 * `providers`.
12408 */
12409 providedIn: InjectorType<any> | 'root' | 'platform' | 'any' | null;
12410 /**
12411 * The token to which this definition belongs.
12412 *
12413 * Note that this may not be the same as the type that the `factory` will create.
12414 */
12415 token: unknown;
12416 /**
12417 * Factory method to execute to create an instance of the injectable.
12418 */
12419 factory: (t?: Type<any>) => T;
12420 /**
12421 * In a case of no explicit injector, a location where the instance of the injectable is stored.
12422 */
12423 value: T | undefined;
12424}
12425
12426/**
12427 * Facade for the attribute injection from DI.
12428 *
12429 * @codeGenApi
12430 */
12431export declare function ɵɵinjectAttribute(attrNameToInject: string): string | null;
12432
12433/**
12434 * @publicApi
12435 */
12436export declare type ɵɵInjectorDeclaration<T> = unknown;
12437
12438/**
12439 * Information about the providers to be included in an `Injector` as well as how the given type
12440 * which carries the information should be created by the DI system.
12441 *
12442 * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested
12443 * structure of providers with a defined priority (identically to how `NgModule`s also have
12444 * an import/dependency structure).
12445 *
12446 * NOTE: This is a private type and should not be exported
12447 *
12448 * @codeGenApi
12449 */
12450export declare interface ɵɵInjectorDef<T> {
12451 providers: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[];
12452 imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];
12453}
12454
12455/**
12456 * Throws an error indicating that a factory function could not be generated by the compiler for a
12457 * particular class.
12458 *
12459 * This instruction allows the actual error message to be optimized away when ngDevMode is turned
12460 * off, saving bytes of generated code while still providing a good experience in dev mode.
12461 *
12462 * The name of the class is not mentioned here, but will be in the generated factory function name
12463 * and thus in the stack trace.
12464 *
12465 * @codeGenApi
12466 */
12467export declare function ɵɵinvalidFactory(): never;
12468
12469/**
12470 * Throws an error indicating that a factory function could not be generated by the compiler for a
12471 * particular class.
12472 *
12473 * This instruction allows the actual error message to be optimized away when ngDevMode is turned
12474 * off, saving bytes of generated code while still providing a good experience in dev mode.
12475 *
12476 * The name of the class is not mentioned here, but will be in the generated factory function name
12477 * and thus in the stack trace.
12478 *
12479 * @codeGenApi
12480 */
12481export declare function ɵɵinvalidFactoryDep(index: number): never;
12482
12483/**
12484 * Adds an event listener to the current node.
12485 *
12486 * If an output exists on one of the node's directives, it also subscribes to the output
12487 * and saves the subscription for later cleanup.
12488 *
12489 * @param eventName Name of the event
12490 * @param listenerFn The function to be called when event emits
12491 * @param useCapture Whether or not to use capture in event listener
12492 * @param eventTargetResolver Function that returns global target information in case this listener
12493 * should be attached to a global object like window, document or body
12494 *
12495 * @codeGenApi
12496 */
12497export declare function ɵɵlistener(eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean, eventTargetResolver?: GlobalTargetResolver): typeof ɵɵlistener;
12498
12499/**
12500 * Loads a QueryList corresponding to the current view or content query.
12501 *
12502 * @codeGenApi
12503 */
12504export declare function ɵɵloadQuery<T>(): QueryList<T>;
12505
12506/**
12507 * Sets the namespace used to create elements to `null`, which forces element creation to use
12508 * `createElement` rather than `createElementNS`.
12509 *
12510 * @codeGenApi
12511 */
12512export declare function ɵɵnamespaceHTML(): void;
12513
12514/**
12515 * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.
12516 *
12517 * @codeGenApi
12518 */
12519export declare function ɵɵnamespaceMathML(): void;
12520
12521/**
12522 * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.
12523 *
12524 * @codeGenApi
12525 */
12526export declare function ɵɵnamespaceSVG(): void;
12527
12528/**
12529 * Retrieves a context at the level specified and saves it as the global, contextViewData.
12530 * Will get the next level up if level is not specified.
12531 *
12532 * This is used to save contexts of parent views so they can be bound in embedded views, or
12533 * in conjunction with reference() to bind a ref from a parent view.
12534 *
12535 * @param level The relative level of the view from which to grab context compared to contextVewData
12536 * @returns context
12537 *
12538 * @codeGenApi
12539 */
12540export declare function ɵɵnextContext<T = any>(level?: number): T;
12541
12542/**
12543 * Evaluates the class metadata declaration.
12544 *
12545 * @codeGenApi
12546 */
12547export declare function ɵɵngDeclareClassMetadata(decl: {
12548 type: Type<any>;
12549 decorators: any[];
12550 ctorParameters?: () => any[];
12551 propDecorators?: {
12552 [field: string]: any;
12553 };
12554}): void;
12555
12556/**
12557 * Compiles a partial component declaration object into a full component definition object.
12558 *
12559 * @codeGenApi
12560 */
12561export declare function ɵɵngDeclareComponent(decl: R3DeclareComponentFacade): unknown;
12562
12563/**
12564 * Compiles a partial directive declaration object into a full directive definition object.
12565 *
12566 * @codeGenApi
12567 */
12568export declare function ɵɵngDeclareDirective(decl: R3DeclareDirectiveFacade): unknown;
12569
12570/**
12571 * Compiles a partial pipe declaration object into a full pipe definition object.
12572 *
12573 * @codeGenApi
12574 */
12575export declare function ɵɵngDeclareFactory(decl: R3DeclareFactoryFacade): unknown;
12576
12577/**
12578 * Compiles a partial injectable declaration object into a full injectable definition object.
12579 *
12580 * @codeGenApi
12581 */
12582export declare function ɵɵngDeclareInjectable(decl: R3DeclareInjectableFacade): unknown;
12583
12584/**
12585 * Compiles a partial injector declaration object into a full injector definition object.
12586 *
12587 * @codeGenApi
12588 */
12589export declare function ɵɵngDeclareInjector(decl: R3DeclareInjectorFacade): unknown;
12590
12591/**
12592 * Compiles a partial NgModule declaration object into a full NgModule definition object.
12593 *
12594 * @codeGenApi
12595 */
12596export declare function ɵɵngDeclareNgModule(decl: R3DeclareNgModuleFacade): unknown;
12597
12598/**
12599 * Compiles a partial pipe declaration object into a full pipe definition object.
12600 *
12601 * @codeGenApi
12602 */
12603export declare function ɵɵngDeclarePipe(decl: R3DeclarePipeFacade): unknown;
12604
12605/**
12606 * @publicApi
12607 */
12608export declare type ɵɵNgModuleDeclaration<T, Declarations, Imports, Exports> = unknown;
12609
12610/**
12611 * The NgOnChangesFeature decorates a component with support for the ngOnChanges
12612 * lifecycle hook, so it should be included in any component that implements
12613 * that hook.
12614 *
12615 * If the component or directive uses inheritance, the NgOnChangesFeature MUST
12616 * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise
12617 * inherited properties will not be propagated to the ngOnChanges lifecycle
12618 * hook.
12619 *
12620 * Example usage:
12621 *
12622 * ```
12623 * static ɵcmp = defineComponent({
12624 * ...
12625 * inputs: {name: 'publicName'},
12626 * features: [NgOnChangesFeature]
12627 * });
12628 * ```
12629 *
12630 * @codeGenApi
12631 */
12632export declare function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature;
12633
12634
12635/**
12636 * Create a pipe.
12637 *
12638 * @param index Pipe index where the pipe will be stored.
12639 * @param pipeName The name of the pipe
12640 * @returns T the instance of the pipe.
12641 *
12642 * @codeGenApi
12643 */
12644export declare function ɵɵpipe(index: number, pipeName: string): any;
12645
12646/**
12647 * Invokes a pipe with 1 arguments.
12648 *
12649 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
12650 * the pipe only when an input to the pipe changes.
12651 *
12652 * @param index Pipe index where the pipe was stored on creation.
12653 * @param slotOffset the offset in the reserved slot space
12654 * @param v1 1st argument to {@link PipeTransform#transform}.
12655 *
12656 * @codeGenApi
12657 */
12658export declare function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any;
12659
12660/**
12661 * Invokes a pipe with 2 arguments.
12662 *
12663 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
12664 * the pipe only when an input to the pipe changes.
12665 *
12666 * @param index Pipe index where the pipe was stored on creation.
12667 * @param slotOffset the offset in the reserved slot space
12668 * @param v1 1st argument to {@link PipeTransform#transform}.
12669 * @param v2 2nd argument to {@link PipeTransform#transform}.
12670 *
12671 * @codeGenApi
12672 */
12673export declare function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any;
12674
12675/**
12676 * Invokes a pipe with 3 arguments.
12677 *
12678 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
12679 * the pipe only when an input to the pipe changes.
12680 *
12681 * @param index Pipe index where the pipe was stored on creation.
12682 * @param slotOffset the offset in the reserved slot space
12683 * @param v1 1st argument to {@link PipeTransform#transform}.
12684 * @param v2 2nd argument to {@link PipeTransform#transform}.
12685 * @param v3 4rd argument to {@link PipeTransform#transform}.
12686 *
12687 * @codeGenApi
12688 */
12689export declare function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any;
12690
12691/**
12692 * Invokes a pipe with 4 arguments.
12693 *
12694 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
12695 * the pipe only when an input to the pipe changes.
12696 *
12697 * @param index Pipe index where the pipe was stored on creation.
12698 * @param slotOffset the offset in the reserved slot space
12699 * @param v1 1st argument to {@link PipeTransform#transform}.
12700 * @param v2 2nd argument to {@link PipeTransform#transform}.
12701 * @param v3 3rd argument to {@link PipeTransform#transform}.
12702 * @param v4 4th argument to {@link PipeTransform#transform}.
12703 *
12704 * @codeGenApi
12705 */
12706export declare function ɵɵpipeBind4(index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any;
12707
12708/**
12709 * Invokes a pipe with variable number of arguments.
12710 *
12711 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
12712 * the pipe only when an input to the pipe changes.
12713 *
12714 * @param index Pipe index where the pipe was stored on creation.
12715 * @param slotOffset the offset in the reserved slot space
12716 * @param values Array of arguments to pass to {@link PipeTransform#transform} method.
12717 *
12718 * @codeGenApi
12719 */
12720export declare function ɵɵpipeBindV(index: number, slotOffset: number, values: [any, ...any[]]): any;
12721
12722/**
12723 * @publicApi
12724 */
12725export declare type ɵɵPipeDeclaration<T, Name extends string> = unknown;
12726
12727/**
12728 * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call
12729 * to the projectionDef instruction.
12730 *
12731 * @param nodeIndex
12732 * @param selectorIndex:
12733 * - 0 when the selector is `*` (or unspecified as this is the default value),
12734 * - 1 based index of the selector from the {@link projectionDef}
12735 *
12736 * @codeGenApi
12737 */
12738export declare function ɵɵprojection(nodeIndex: number, selectorIndex?: number, attrs?: TAttributes): void;
12739
12740/**
12741 * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
12742 * It takes all the selectors from the entire component's template and decides where
12743 * each projected node belongs (it re-distributes nodes among "buckets" where each "bucket" is
12744 * backed by a selector).
12745 *
12746 * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,
12747 * un-parsed form.
12748 *
12749 * The parsed form is needed for efficient matching of a node against a given CSS selector.
12750 * The un-parsed, textual form is needed for support of the ngProjectAs attribute.
12751 *
12752 * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more
12753 * drawbacks:
12754 * - having only a textual form would require runtime parsing of CSS selectors;
12755 * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a
12756 * template author).
12757 *
12758 * @param projectionSlots? A collection of projection slots. A projection slot can be based
12759 * on a parsed CSS selectors or set to the wildcard selector ("*") in order to match
12760 * all nodes which do not match any selector. If not specified, a single wildcard
12761 * selector projection slot will be defined.
12762 *
12763 * @codeGenApi
12764 */
12765export declare function ɵɵprojectionDef(projectionSlots?: ProjectionSlots): void;
12766
12767/**
12768 * Update a property on a selected element.
12769 *
12770 * Operates on the element selected by index via the {@link select} instruction.
12771 *
12772 * If the property name also exists as an input property on one of the element's directives,
12773 * the component property will be set instead of the element property. This check must
12774 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled
12775 *
12776 * @param propName Name of property. Because it is going to DOM, this is not subject to
12777 * renaming as part of minification.
12778 * @param value New value to write.
12779 * @param sanitizer An optional function used to sanitize the value.
12780 * @returns This function returns itself so that it may be chained
12781 * (e.g. `property('name', ctx.name)('title', ctx.title)`)
12782 *
12783 * @codeGenApi
12784 */
12785export declare function ɵɵproperty<T>(propName: string, value: T, sanitizer?: SanitizerFn | null): typeof ɵɵproperty;
12786
12787/**
12788 *
12789 * Update an interpolated property on an element with a lone bound value
12790 *
12791 * Used when the value passed to a property has 1 interpolated value in it, an no additional text
12792 * surrounds that interpolated value:
12793 *
12794 * ```html
12795 * <div title="{{v0}}"></div>
12796 * ```
12797 *
12798 * Its compiled representation is::
12799 *
12800 * ```ts
12801 * ɵɵpropertyInterpolate('title', v0);
12802 * ```
12803 *
12804 * If the property name also exists as an input property on one of the element's directives,
12805 * the component property will be set instead of the element property. This check must
12806 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
12807 *
12808 * @param propName The name of the property to update
12809 * @param prefix Static value used for concatenation only.
12810 * @param v0 Value checked for change.
12811 * @param suffix Static value used for concatenation only.
12812 * @param sanitizer An optional sanitizer function
12813 * @returns itself, so that it may be chained.
12814 * @codeGenApi
12815 */
12816export declare function ɵɵpropertyInterpolate(propName: string, v0: any, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate;
12817
12818/**
12819 *
12820 * Update an interpolated property on an element with single bound value surrounded by text.
12821 *
12822 * Used when the value passed to a property has 1 interpolated value in it:
12823 *
12824 * ```html
12825 * <div title="prefix{{v0}}suffix"></div>
12826 * ```
12827 *
12828 * Its compiled representation is::
12829 *
12830 * ```ts
12831 * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');
12832 * ```
12833 *
12834 * If the property name also exists as an input property on one of the element's directives,
12835 * the component property will be set instead of the element property. This check must
12836 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
12837 *
12838 * @param propName The name of the property to update
12839 * @param prefix Static value used for concatenation only.
12840 * @param v0 Value checked for change.
12841 * @param suffix Static value used for concatenation only.
12842 * @param sanitizer An optional sanitizer function
12843 * @returns itself, so that it may be chained.
12844 * @codeGenApi
12845 */
12846export declare function ɵɵpropertyInterpolate1(propName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate1;
12847
12848/**
12849 *
12850 * Update an interpolated property on an element with 2 bound values surrounded by text.
12851 *
12852 * Used when the value passed to a property has 2 interpolated values in it:
12853 *
12854 * ```html
12855 * <div title="prefix{{v0}}-{{v1}}suffix"></div>
12856 * ```
12857 *
12858 * Its compiled representation is::
12859 *
12860 * ```ts
12861 * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
12862 * ```
12863 *
12864 * If the property name also exists as an input property on one of the element's directives,
12865 * the component property will be set instead of the element property. This check must
12866 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
12867 *
12868 * @param propName The name of the property to update
12869 * @param prefix Static value used for concatenation only.
12870 * @param v0 Value checked for change.
12871 * @param i0 Static value used for concatenation only.
12872 * @param v1 Value checked for change.
12873 * @param suffix Static value used for concatenation only.
12874 * @param sanitizer An optional sanitizer function
12875 * @returns itself, so that it may be chained.
12876 * @codeGenApi
12877 */
12878export declare function ɵɵpropertyInterpolate2(propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate2;
12879
12880/**
12881 *
12882 * Update an interpolated property on an element with 3 bound values surrounded by text.
12883 *
12884 * Used when the value passed to a property has 3 interpolated values in it:
12885 *
12886 * ```html
12887 * <div title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
12888 * ```
12889 *
12890 * Its compiled representation is::
12891 *
12892 * ```ts
12893 * ɵɵpropertyInterpolate3(
12894 * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
12895 * ```
12896 *
12897 * If the property name also exists as an input property on one of the element's directives,
12898 * the component property will be set instead of the element property. This check must
12899 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
12900 *
12901 * @param propName The name of the property to update
12902 * @param prefix Static value used for concatenation only.
12903 * @param v0 Value checked for change.
12904 * @param i0 Static value used for concatenation only.
12905 * @param v1 Value checked for change.
12906 * @param i1 Static value used for concatenation only.
12907 * @param v2 Value checked for change.
12908 * @param suffix Static value used for concatenation only.
12909 * @param sanitizer An optional sanitizer function
12910 * @returns itself, so that it may be chained.
12911 * @codeGenApi
12912 */
12913export declare function ɵɵpropertyInterpolate3(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate3;
12914
12915/**
12916 *
12917 * Update an interpolated property on an element with 4 bound values surrounded by text.
12918 *
12919 * Used when the value passed to a property has 4 interpolated values in it:
12920 *
12921 * ```html
12922 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
12923 * ```
12924 *
12925 * Its compiled representation is::
12926 *
12927 * ```ts
12928 * ɵɵpropertyInterpolate4(
12929 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
12930 * ```
12931 *
12932 * If the property name also exists as an input property on one of the element's directives,
12933 * the component property will be set instead of the element property. This check must
12934 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
12935 *
12936 * @param propName The name of the property to update
12937 * @param prefix Static value used for concatenation only.
12938 * @param v0 Value checked for change.
12939 * @param i0 Static value used for concatenation only.
12940 * @param v1 Value checked for change.
12941 * @param i1 Static value used for concatenation only.
12942 * @param v2 Value checked for change.
12943 * @param i2 Static value used for concatenation only.
12944 * @param v3 Value checked for change.
12945 * @param suffix Static value used for concatenation only.
12946 * @param sanitizer An optional sanitizer function
12947 * @returns itself, so that it may be chained.
12948 * @codeGenApi
12949 */
12950export declare function ɵɵpropertyInterpolate4(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate4;
12951
12952/**
12953 *
12954 * Update an interpolated property on an element with 5 bound values surrounded by text.
12955 *
12956 * Used when the value passed to a property has 5 interpolated values in it:
12957 *
12958 * ```html
12959 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
12960 * ```
12961 *
12962 * Its compiled representation is::
12963 *
12964 * ```ts
12965 * ɵɵpropertyInterpolate5(
12966 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
12967 * ```
12968 *
12969 * If the property name also exists as an input property on one of the element's directives,
12970 * the component property will be set instead of the element property. This check must
12971 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
12972 *
12973 * @param propName The name of the property to update
12974 * @param prefix Static value used for concatenation only.
12975 * @param v0 Value checked for change.
12976 * @param i0 Static value used for concatenation only.
12977 * @param v1 Value checked for change.
12978 * @param i1 Static value used for concatenation only.
12979 * @param v2 Value checked for change.
12980 * @param i2 Static value used for concatenation only.
12981 * @param v3 Value checked for change.
12982 * @param i3 Static value used for concatenation only.
12983 * @param v4 Value checked for change.
12984 * @param suffix Static value used for concatenation only.
12985 * @param sanitizer An optional sanitizer function
12986 * @returns itself, so that it may be chained.
12987 * @codeGenApi
12988 */
12989export declare function ɵɵpropertyInterpolate5(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate5;
12990
12991/**
12992 *
12993 * Update an interpolated property on an element with 6 bound values surrounded by text.
12994 *
12995 * Used when the value passed to a property has 6 interpolated values in it:
12996 *
12997 * ```html
12998 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
12999 * ```
13000 *
13001 * Its compiled representation is::
13002 *
13003 * ```ts
13004 * ɵɵpropertyInterpolate6(
13005 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
13006 * ```
13007 *
13008 * If the property name also exists as an input property on one of the element's directives,
13009 * the component property will be set instead of the element property. This check must
13010 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13011 *
13012 * @param propName The name of the property to update
13013 * @param prefix Static value used for concatenation only.
13014 * @param v0 Value checked for change.
13015 * @param i0 Static value used for concatenation only.
13016 * @param v1 Value checked for change.
13017 * @param i1 Static value used for concatenation only.
13018 * @param v2 Value checked for change.
13019 * @param i2 Static value used for concatenation only.
13020 * @param v3 Value checked for change.
13021 * @param i3 Static value used for concatenation only.
13022 * @param v4 Value checked for change.
13023 * @param i4 Static value used for concatenation only.
13024 * @param v5 Value checked for change.
13025 * @param suffix Static value used for concatenation only.
13026 * @param sanitizer An optional sanitizer function
13027 * @returns itself, so that it may be chained.
13028 * @codeGenApi
13029 */
13030export declare function ɵɵpropertyInterpolate6(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate6;
13031
13032/**
13033 *
13034 * Update an interpolated property on an element with 7 bound values surrounded by text.
13035 *
13036 * Used when the value passed to a property has 7 interpolated values in it:
13037 *
13038 * ```html
13039 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
13040 * ```
13041 *
13042 * Its compiled representation is::
13043 *
13044 * ```ts
13045 * ɵɵpropertyInterpolate7(
13046 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
13047 * ```
13048 *
13049 * If the property name also exists as an input property on one of the element's directives,
13050 * the component property will be set instead of the element property. This check must
13051 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13052 *
13053 * @param propName The name of the property to update
13054 * @param prefix Static value used for concatenation only.
13055 * @param v0 Value checked for change.
13056 * @param i0 Static value used for concatenation only.
13057 * @param v1 Value checked for change.
13058 * @param i1 Static value used for concatenation only.
13059 * @param v2 Value checked for change.
13060 * @param i2 Static value used for concatenation only.
13061 * @param v3 Value checked for change.
13062 * @param i3 Static value used for concatenation only.
13063 * @param v4 Value checked for change.
13064 * @param i4 Static value used for concatenation only.
13065 * @param v5 Value checked for change.
13066 * @param i5 Static value used for concatenation only.
13067 * @param v6 Value checked for change.
13068 * @param suffix Static value used for concatenation only.
13069 * @param sanitizer An optional sanitizer function
13070 * @returns itself, so that it may be chained.
13071 * @codeGenApi
13072 */
13073export declare function ɵɵpropertyInterpolate7(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate7;
13074
13075/**
13076 *
13077 * Update an interpolated property on an element with 8 bound values surrounded by text.
13078 *
13079 * Used when the value passed to a property has 8 interpolated values in it:
13080 *
13081 * ```html
13082 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
13083 * ```
13084 *
13085 * Its compiled representation is::
13086 *
13087 * ```ts
13088 * ɵɵpropertyInterpolate8(
13089 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
13090 * ```
13091 *
13092 * If the property name also exists as an input property on one of the element's directives,
13093 * the component property will be set instead of the element property. This check must
13094 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13095 *
13096 * @param propName The name of the property to update
13097 * @param prefix Static value used for concatenation only.
13098 * @param v0 Value checked for change.
13099 * @param i0 Static value used for concatenation only.
13100 * @param v1 Value checked for change.
13101 * @param i1 Static value used for concatenation only.
13102 * @param v2 Value checked for change.
13103 * @param i2 Static value used for concatenation only.
13104 * @param v3 Value checked for change.
13105 * @param i3 Static value used for concatenation only.
13106 * @param v4 Value checked for change.
13107 * @param i4 Static value used for concatenation only.
13108 * @param v5 Value checked for change.
13109 * @param i5 Static value used for concatenation only.
13110 * @param v6 Value checked for change.
13111 * @param i6 Static value used for concatenation only.
13112 * @param v7 Value checked for change.
13113 * @param suffix Static value used for concatenation only.
13114 * @param sanitizer An optional sanitizer function
13115 * @returns itself, so that it may be chained.
13116 * @codeGenApi
13117 */
13118export declare function ɵɵpropertyInterpolate8(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate8;
13119
13120/**
13121 * Update an interpolated property on an element with 9 or more bound values surrounded by text.
13122 *
13123 * Used when the number of interpolated values exceeds 8.
13124 *
13125 * ```html
13126 * <div
13127 * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
13128 * ```
13129 *
13130 * Its compiled representation is::
13131 *
13132 * ```ts
13133 * ɵɵpropertyInterpolateV(
13134 * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
13135 * 'suffix']);
13136 * ```
13137 *
13138 * If the property name also exists as an input property on one of the element's directives,
13139 * the component property will be set instead of the element property. This check must
13140 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13141 *
13142 * @param propName The name of the property to update.
13143 * @param values The collection of values and the strings inbetween those values, beginning with a
13144 * string prefix and ending with a string suffix.
13145 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
13146 * @param sanitizer An optional sanitizer function
13147 * @returns itself, so that it may be chained.
13148 * @codeGenApi
13149 */
13150export declare function ɵɵpropertyInterpolateV(propName: string, values: any[], sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolateV;
13151
13152/**
13153 * This feature resolves the providers of a directive (or component),
13154 * and publish them into the DI system, making it visible to others for injection.
13155 *
13156 * For example:
13157 * ```ts
13158 * class ComponentWithProviders {
13159 * constructor(private greeter: GreeterDE) {}
13160 *
13161 * static ɵcmp = defineComponent({
13162 * type: ComponentWithProviders,
13163 * selectors: [['component-with-providers']],
13164 * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),
13165 * decls: 1,
13166 * vars: 1,
13167 * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {
13168 * if (fs & RenderFlags.Create) {
13169 * ɵɵtext(0);
13170 * }
13171 * if (fs & RenderFlags.Update) {
13172 * ɵɵtextInterpolate(ctx.greeter.greet());
13173 * }
13174 * },
13175 * features: [ɵɵProvidersFeature([GreeterDE])]
13176 * });
13177 * }
13178 * ```
13179 *
13180 * @param definition
13181 *
13182 * @codeGenApi
13183 */
13184export declare function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders?: Provider[]): (definition: ɵDirectiveDef<T>) => void;
13185
13186/**
13187 * Bindings for pure functions are stored after regular bindings.
13188 *
13189 * |-------decls------|---------vars---------| |----- hostVars (dir1) ------|
13190 * ------------------------------------------------------------------------------------------
13191 * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |
13192 * ------------------------------------------------------------------------------------------
13193 * ^ ^
13194 * TView.bindingStartIndex TView.expandoStartIndex
13195 *
13196 * Pure function instructions are given an offset from the binding root. Adding the offset to the
13197 * binding root gives the first index where the bindings are stored. In component views, the binding
13198 * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +
13199 * any directive instances + any hostVars in directives evaluated before it.
13200 *
13201 * See VIEW_DATA.md for more information about host binding resolution.
13202 */
13203/**
13204 * If the value hasn't been saved, calls the pure function to store and return the
13205 * value. If it has been saved, returns the saved value.
13206 *
13207 * @param slotOffset the offset from binding root to the reserved slot
13208 * @param pureFn Function that returns a value
13209 * @param thisArg Optional calling context of pureFn
13210 * @returns value
13211 *
13212 * @codeGenApi
13213 */
13214export declare function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T;
13215
13216/**
13217 * If the value of the provided exp has changed, calls the pure function to return
13218 * an updated value. Or if the value has not changed, returns cached value.
13219 *
13220 * @param slotOffset the offset from binding root to the reserved slot
13221 * @param pureFn Function that returns an updated value
13222 * @param exp Updated expression value
13223 * @param thisArg Optional calling context of pureFn
13224 * @returns Updated or cached value
13225 *
13226 * @codeGenApi
13227 */
13228export declare function ɵɵpureFunction1(slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any;
13229
13230/**
13231 * If the value of any provided exp has changed, calls the pure function to return
13232 * an updated value. Or if no values have changed, returns cached value.
13233 *
13234 * @param slotOffset the offset from binding root to the reserved slot
13235 * @param pureFn
13236 * @param exp1
13237 * @param exp2
13238 * @param thisArg Optional calling context of pureFn
13239 * @returns Updated or cached value
13240 *
13241 * @codeGenApi
13242 */
13243export declare function ɵɵpureFunction2(slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any, thisArg?: any): any;
13244
13245/**
13246 * If the value of any provided exp has changed, calls the pure function to return
13247 * an updated value. Or if no values have changed, returns cached value.
13248 *
13249 * @param slotOffset the offset from binding root to the reserved slot
13250 * @param pureFn
13251 * @param exp1
13252 * @param exp2
13253 * @param exp3
13254 * @param thisArg Optional calling context of pureFn
13255 * @returns Updated or cached value
13256 *
13257 * @codeGenApi
13258 */
13259export declare function ɵɵpureFunction3(slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any, thisArg?: any): any;
13260
13261/**
13262 * If the value of any provided exp has changed, calls the pure function to return
13263 * an updated value. Or if no values have changed, returns cached value.
13264 *
13265 * @param slotOffset the offset from binding root to the reserved slot
13266 * @param pureFn
13267 * @param exp1
13268 * @param exp2
13269 * @param exp3
13270 * @param exp4
13271 * @param thisArg Optional calling context of pureFn
13272 * @returns Updated or cached value
13273 *
13274 * @codeGenApi
13275 */
13276export declare function ɵɵpureFunction4(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, thisArg?: any): any;
13277
13278/**
13279 * If the value of any provided exp has changed, calls the pure function to return
13280 * an updated value. Or if no values have changed, returns cached value.
13281 *
13282 * @param slotOffset the offset from binding root to the reserved slot
13283 * @param pureFn
13284 * @param exp1
13285 * @param exp2
13286 * @param exp3
13287 * @param exp4
13288 * @param exp5
13289 * @param thisArg Optional calling context of pureFn
13290 * @returns Updated or cached value
13291 *
13292 * @codeGenApi
13293 */
13294export declare function ɵɵpureFunction5(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, thisArg?: any): any;
13295
13296/**
13297 * If the value of any provided exp has changed, calls the pure function to return
13298 * an updated value. Or if no values have changed, returns cached value.
13299 *
13300 * @param slotOffset the offset from binding root to the reserved slot
13301 * @param pureFn
13302 * @param exp1
13303 * @param exp2
13304 * @param exp3
13305 * @param exp4
13306 * @param exp5
13307 * @param exp6
13308 * @param thisArg Optional calling context of pureFn
13309 * @returns Updated or cached value
13310 *
13311 * @codeGenApi
13312 */
13313export declare function ɵɵpureFunction6(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, thisArg?: any): any;
13314
13315/**
13316 * If the value of any provided exp has changed, calls the pure function to return
13317 * an updated value. Or if no values have changed, returns cached value.
13318 *
13319 * @param slotOffset the offset from binding root to the reserved slot
13320 * @param pureFn
13321 * @param exp1
13322 * @param exp2
13323 * @param exp3
13324 * @param exp4
13325 * @param exp5
13326 * @param exp6
13327 * @param exp7
13328 * @param thisArg Optional calling context of pureFn
13329 * @returns Updated or cached value
13330 *
13331 * @codeGenApi
13332 */
13333export declare function ɵɵpureFunction7(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, thisArg?: any): any;
13334
13335/**
13336 * If the value of any provided exp has changed, calls the pure function to return
13337 * an updated value. Or if no values have changed, returns cached value.
13338 *
13339 * @param slotOffset the offset from binding root to the reserved slot
13340 * @param pureFn
13341 * @param exp1
13342 * @param exp2
13343 * @param exp3
13344 * @param exp4
13345 * @param exp5
13346 * @param exp6
13347 * @param exp7
13348 * @param exp8
13349 * @param thisArg Optional calling context of pureFn
13350 * @returns Updated or cached value
13351 *
13352 * @codeGenApi
13353 */
13354export declare function ɵɵpureFunction8(slotOffset: number, pureFn: (v1: any, v2: any, v3: any, v4: any, v5: any, v6: any, v7: any, v8: any) => any, exp1: any, exp2: any, exp3: any, exp4: any, exp5: any, exp6: any, exp7: any, exp8: any, thisArg?: any): any;
13355
13356/**
13357 * pureFunction instruction that can support any number of bindings.
13358 *
13359 * If the value of any provided exp has changed, calls the pure function to return
13360 * an updated value. Or if no values have changed, returns cached value.
13361 *
13362 * @param slotOffset the offset from binding root to the reserved slot
13363 * @param pureFn A pure function that takes binding values and builds an object or array
13364 * containing those values.
13365 * @param exps An array of binding values
13366 * @param thisArg Optional calling context of pureFn
13367 * @returns Updated or cached value
13368 *
13369 * @codeGenApi
13370 */
13371export declare function ɵɵpureFunctionV(slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any;
13372
13373/**
13374 * Refreshes a query by combining matches from all active views and removing matches from deleted
13375 * views.
13376 *
13377 * @returns `true` if a query got dirty during change detection or if this is a static query
13378 * resolving in creation mode, `false` otherwise.
13379 *
13380 * @codeGenApi
13381 */
13382export declare function ɵɵqueryRefresh(queryList: QueryList<any>): boolean;
13383
13384/**
13385 * Retrieves a local reference from the current contextViewData.
13386 *
13387 * If the reference to retrieve is in a parent view, this instruction is used in conjunction
13388 * with a nextContext() call, which walks up the tree and updates the contextViewData instance.
13389 *
13390 * @param index The index of the local ref in contextViewData.
13391 *
13392 * @codeGenApi
13393 */
13394export declare function ɵɵreference<T>(index: number): T;
13395
13396/**
13397 *
13398 * @codeGenApi
13399 */
13400export declare function ɵɵresolveBody(element: RElement & {
13401 ownerDocument: Document;
13402}): HTMLElement;
13403
13404/**
13405 *
13406 * @codeGenApi
13407 */
13408export declare function ɵɵresolveDocument(element: RElement & {
13409 ownerDocument: Document;
13410}): Document;
13411
13412/**
13413 *
13414 * @codeGenApi
13415 */
13416export declare function ɵɵresolveWindow(element: RElement & {
13417 ownerDocument: Document;
13418}): (Window & typeof globalThis) | null;
13419
13420/**
13421 * Restores `contextViewData` to the given OpaqueViewState instance.
13422 *
13423 * Used in conjunction with the getCurrentView() instruction to save a snapshot
13424 * of the current view and restore it when listeners are invoked. This allows
13425 * walking the declaration view tree in listeners to get vars from parent views.
13426 *
13427 * @param viewToRestore The OpaqueViewState instance to restore.
13428 * @returns Context of the restored OpaqueViewState instance.
13429 *
13430 * @codeGenApi
13431 */
13432export declare function ɵɵrestoreView<T = any>(viewToRestore: OpaqueViewState): T;
13433
13434/**
13435 * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing
13436 * dangerous content.
13437 *
13438 * This method parses the `html` and locates potentially dangerous content (such as urls and
13439 * javascript) and removes it.
13440 *
13441 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.
13442 *
13443 * @param unsafeHtml untrusted `html`, typically from the user.
13444 * @returns `html` string which is safe to display to user, because all of the dangerous javascript
13445 * and urls have been removed.
13446 *
13447 * @codeGenApi
13448 */
13449export declare function ɵɵsanitizeHtml(unsafeHtml: any): TrustedHTML | string;
13450
13451/**
13452 * A `url` sanitizer which only lets trusted `url`s through.
13453 *
13454 * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.
13455 *
13456 * @param unsafeResourceUrl untrusted `url`, typically from the user.
13457 * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
13458 * only trusted `url`s have been allowed to pass.
13459 *
13460 * @codeGenApi
13461 */
13462export declare function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): TrustedScriptURL | string;
13463
13464/**
13465 * A `script` sanitizer which only lets trusted javascript through.
13466 *
13467 * This passes only `script`s marked trusted by calling {@link
13468 * bypassSanitizationTrustScript}.
13469 *
13470 * @param unsafeScript untrusted `script`, typically from the user.
13471 * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,
13472 * because only trusted `scripts` have been allowed to pass.
13473 *
13474 * @codeGenApi
13475 */
13476export declare function ɵɵsanitizeScript(unsafeScript: any): TrustedScript | string;
13477
13478/**
13479 * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing
13480 * dangerous content.
13481 *
13482 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.
13483 *
13484 * @param unsafeStyle untrusted `style`, typically from the user.
13485 * @returns `style` string which is safe to bind to the `style` properties.
13486 *
13487 * @codeGenApi
13488 */
13489export declare function ɵɵsanitizeStyle(unsafeStyle: any): string;
13490
13491/**
13492 * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing
13493 * dangerous
13494 * content.
13495 *
13496 * This method parses the `url` and locates potentially dangerous content (such as javascript) and
13497 * removes it.
13498 *
13499 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.
13500 *
13501 * @param unsafeUrl untrusted `url`, typically from the user.
13502 * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
13503 * all of the dangerous javascript has been removed.
13504 *
13505 * @codeGenApi
13506 */
13507export declare function ɵɵsanitizeUrl(unsafeUrl: any): string;
13508
13509/**
13510 * Sanitizes URL, selecting sanitizer function based on tag and property names.
13511 *
13512 * This function is used in case we can't define security context at compile time, when only prop
13513 * name is available. This happens when we generate host bindings for Directives/Components. The
13514 * host element is unknown at compile time, so we defer calculation of specific sanitizer to
13515 * runtime.
13516 *
13517 * @param unsafeUrl untrusted `url`, typically from the user.
13518 * @param tag target element tag name.
13519 * @param prop name of the property that contains the value.
13520 * @returns `url` string which is safe to bind.
13521 *
13522 * @codeGenApi
13523 */
13524export declare function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any;
13525
13526/**
13527 * Generated next to NgModules to monkey-patch directive and pipe references onto a component's
13528 * definition, when generating a direct reference in the component file would otherwise create an
13529 * import cycle.
13530 *
13531 * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.
13532 *
13533 * @codeGenApi
13534 */
13535export declare function ɵɵsetComponentScope(type: ɵComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void;
13536
13537/**
13538 * Adds the module metadata that is necessary to compute the module's transitive scope to an
13539 * existing module definition.
13540 *
13541 * Scope metadata of modules is not used in production builds, so calls to this function can be
13542 * marked pure to tree-shake it from the bundle, allowing for all referenced declarations
13543 * to become eligible for tree-shaking as well.
13544 *
13545 * @codeGenApi
13546 */
13547export declare function ɵɵsetNgModuleScope(type: any, scope: {
13548 /** List of components, directives, and pipes declared by this module. */
13549 declarations?: Type<any>[] | (() => Type<any>[]);
13550 /** List of modules or `ModuleWithProviders` imported by this module. */
13551 imports?: Type<any>[] | (() => Type<any>[]);
13552 /**
13553 * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
13554 * module.
13555 */
13556 exports?: Type<any>[] | (() => Type<any>[]);
13557}): unknown;
13558
13559/**
13560 * Update style bindings using an object literal on an element.
13561 *
13562 * This instruction is meant to apply styling via the `[style]="exp"` template bindings.
13563 * When styles are applied to the element they will then be updated with respect to
13564 * any styles/classes set via `styleProp`. If any styles are set to falsy
13565 * then they will be removed from the element.
13566 *
13567 * Note that the styling instruction will not be applied until `stylingApply` is called.
13568 *
13569 * @param styles A key/value style map of the styles that will be applied to the given element.
13570 * Any missing styles (that have already been applied to the element beforehand) will be
13571 * removed (unset) from the element's styling.
13572 *
13573 * Note that this will apply the provided styleMap value to the host element if this function
13574 * is called within a host binding.
13575 *
13576 * @codeGenApi
13577 */
13578export declare function ɵɵstyleMap(styles: {
13579 [styleName: string]: any;
13580} | string | undefined | null): void;
13581
13582
13583/**
13584 *
13585 * Update an interpolated style on an element with single bound value surrounded by text.
13586 *
13587 * Used when the value passed to a property has 1 interpolated value in it:
13588 *
13589 * ```html
13590 * <div style="key: {{v0}}suffix"></div>
13591 * ```
13592 *
13593 * Its compiled representation is:
13594 *
13595 * ```ts
13596 * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');
13597 * ```
13598 *
13599 * @param prefix Static value used for concatenation only.
13600 * @param v0 Value checked for change.
13601 * @param suffix Static value used for concatenation only.
13602 * @codeGenApi
13603 */
13604export declare function ɵɵstyleMapInterpolate1(prefix: string, v0: any, suffix: string): void;
13605
13606/**
13607 *
13608 * Update an interpolated style on an element with 2 bound values surrounded by text.
13609 *
13610 * Used when the value passed to a property has 2 interpolated values in it:
13611 *
13612 * ```html
13613 * <div style="key: {{v0}}; key1: {{v1}}suffix"></div>
13614 * ```
13615 *
13616 * Its compiled representation is:
13617 *
13618 * ```ts
13619 * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');
13620 * ```
13621 *
13622 * @param prefix Static value used for concatenation only.
13623 * @param v0 Value checked for change.
13624 * @param i0 Static value used for concatenation only.
13625 * @param v1 Value checked for change.
13626 * @param suffix Static value used for concatenation only.
13627 * @codeGenApi
13628 */
13629export declare function ɵɵstyleMapInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): void;
13630
13631/**
13632 *
13633 * Update an interpolated style on an element with 3 bound values surrounded by text.
13634 *
13635 * Used when the value passed to a property has 3 interpolated values in it:
13636 *
13637 * ```html
13638 * <div style="key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix"></div>
13639 * ```
13640 *
13641 * Its compiled representation is:
13642 *
13643 * ```ts
13644 * ɵɵstyleMapInterpolate3(
13645 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');
13646 * ```
13647 *
13648 * @param prefix Static value used for concatenation only.
13649 * @param v0 Value checked for change.
13650 * @param i0 Static value used for concatenation only.
13651 * @param v1 Value checked for change.
13652 * @param i1 Static value used for concatenation only.
13653 * @param v2 Value checked for change.
13654 * @param suffix Static value used for concatenation only.
13655 * @codeGenApi
13656 */
13657export declare function ɵɵstyleMapInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void;
13658
13659/**
13660 *
13661 * Update an interpolated style on an element with 4 bound values surrounded by text.
13662 *
13663 * Used when the value passed to a property has 4 interpolated values in it:
13664 *
13665 * ```html
13666 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix"></div>
13667 * ```
13668 *
13669 * Its compiled representation is:
13670 *
13671 * ```ts
13672 * ɵɵstyleMapInterpolate4(
13673 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');
13674 * ```
13675 *
13676 * @param prefix Static value used for concatenation only.
13677 * @param v0 Value checked for change.
13678 * @param i0 Static value used for concatenation only.
13679 * @param v1 Value checked for change.
13680 * @param i1 Static value used for concatenation only.
13681 * @param v2 Value checked for change.
13682 * @param i2 Static value used for concatenation only.
13683 * @param v3 Value checked for change.
13684 * @param suffix Static value used for concatenation only.
13685 * @codeGenApi
13686 */
13687export declare function ɵɵstyleMapInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): void;
13688
13689/**
13690 *
13691 * Update an interpolated style on an element with 5 bound values surrounded by text.
13692 *
13693 * Used when the value passed to a property has 5 interpolated values in it:
13694 *
13695 * ```html
13696 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix"></div>
13697 * ```
13698 *
13699 * Its compiled representation is:
13700 *
13701 * ```ts
13702 * ɵɵstyleMapInterpolate5(
13703 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');
13704 * ```
13705 *
13706 * @param prefix Static value used for concatenation only.
13707 * @param v0 Value checked for change.
13708 * @param i0 Static value used for concatenation only.
13709 * @param v1 Value checked for change.
13710 * @param i1 Static value used for concatenation only.
13711 * @param v2 Value checked for change.
13712 * @param i2 Static value used for concatenation only.
13713 * @param v3 Value checked for change.
13714 * @param i3 Static value used for concatenation only.
13715 * @param v4 Value checked for change.
13716 * @param suffix Static value used for concatenation only.
13717 * @codeGenApi
13718 */
13719export declare function ɵɵstyleMapInterpolate5(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string): void;
13720
13721/**
13722 *
13723 * Update an interpolated style on an element with 6 bound values surrounded by text.
13724 *
13725 * Used when the value passed to a property has 6 interpolated values in it:
13726 *
13727 * ```html
13728 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};
13729 * key5: {{v5}}suffix"></div>
13730 * ```
13731 *
13732 * Its compiled representation is:
13733 *
13734 * ```ts
13735 * ɵɵstyleMapInterpolate6(
13736 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
13737 * 'suffix');
13738 * ```
13739 *
13740 * @param prefix Static value used for concatenation only.
13741 * @param v0 Value checked for change.
13742 * @param i0 Static value used for concatenation only.
13743 * @param v1 Value checked for change.
13744 * @param i1 Static value used for concatenation only.
13745 * @param v2 Value checked for change.
13746 * @param i2 Static value used for concatenation only.
13747 * @param v3 Value checked for change.
13748 * @param i3 Static value used for concatenation only.
13749 * @param v4 Value checked for change.
13750 * @param i4 Static value used for concatenation only.
13751 * @param v5 Value checked for change.
13752 * @param suffix Static value used for concatenation only.
13753 * @codeGenApi
13754 */
13755export declare function ɵɵstyleMapInterpolate6(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): void;
13756
13757/**
13758 *
13759 * Update an interpolated style on an element with 7 bound values surrounded by text.
13760 *
13761 * Used when the value passed to a property has 7 interpolated values in it:
13762 *
13763 * ```html
13764 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
13765 * key6: {{v6}}suffix"></div>
13766 * ```
13767 *
13768 * Its compiled representation is:
13769 *
13770 * ```ts
13771 * ɵɵstyleMapInterpolate7(
13772 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
13773 * '; key6: ', v6, 'suffix');
13774 * ```
13775 *
13776 * @param prefix Static value used for concatenation only.
13777 * @param v0 Value checked for change.
13778 * @param i0 Static value used for concatenation only.
13779 * @param v1 Value checked for change.
13780 * @param i1 Static value used for concatenation only.
13781 * @param v2 Value checked for change.
13782 * @param i2 Static value used for concatenation only.
13783 * @param v3 Value checked for change.
13784 * @param i3 Static value used for concatenation only.
13785 * @param v4 Value checked for change.
13786 * @param i4 Static value used for concatenation only.
13787 * @param v5 Value checked for change.
13788 * @param i5 Static value used for concatenation only.
13789 * @param v6 Value checked for change.
13790 * @param suffix Static value used for concatenation only.
13791 * @codeGenApi
13792 */
13793export declare function ɵɵstyleMapInterpolate7(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): void;
13794
13795/**
13796 *
13797 * Update an interpolated style on an element with 8 bound values surrounded by text.
13798 *
13799 * Used when the value passed to a property has 8 interpolated values in it:
13800 *
13801 * ```html
13802 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
13803 * key6: {{v6}}; key7: {{v7}}suffix"></div>
13804 * ```
13805 *
13806 * Its compiled representation is:
13807 *
13808 * ```ts
13809 * ɵɵstyleMapInterpolate8(
13810 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
13811 * '; key6: ', v6, '; key7: ', v7, 'suffix');
13812 * ```
13813 *
13814 * @param prefix Static value used for concatenation only.
13815 * @param v0 Value checked for change.
13816 * @param i0 Static value used for concatenation only.
13817 * @param v1 Value checked for change.
13818 * @param i1 Static value used for concatenation only.
13819 * @param v2 Value checked for change.
13820 * @param i2 Static value used for concatenation only.
13821 * @param v3 Value checked for change.
13822 * @param i3 Static value used for concatenation only.
13823 * @param v4 Value checked for change.
13824 * @param i4 Static value used for concatenation only.
13825 * @param v5 Value checked for change.
13826 * @param i5 Static value used for concatenation only.
13827 * @param v6 Value checked for change.
13828 * @param i6 Static value used for concatenation only.
13829 * @param v7 Value checked for change.
13830 * @param suffix Static value used for concatenation only.
13831 * @codeGenApi
13832 */
13833export declare function ɵɵstyleMapInterpolate8(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string): void;
13834
13835/**
13836 * Update an interpolated style on an element with 9 or more bound values surrounded by text.
13837 *
13838 * Used when the number of interpolated values exceeds 8.
13839 *
13840 * ```html
13841 * <div
13842 * class="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
13843 * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix"></div>
13844 * ```
13845 *
13846 * Its compiled representation is:
13847 *
13848 * ```ts
13849 * ɵɵstyleMapInterpolateV(
13850 * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
13851 * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);
13852 * ```
13853 *.
13854 * @param values The collection of values and the strings in-between those values, beginning with
13855 * a string prefix and ending with a string suffix.
13856 * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)
13857 * @codeGenApi
13858 */
13859export declare function ɵɵstyleMapInterpolateV(values: any[]): void;
13860
13861/**
13862 * Update a style binding on an element with the provided value.
13863 *
13864 * If the style value is falsy then it will be removed from the element
13865 * (or assigned a different value depending if there are any styles placed
13866 * on the element with `styleMap` or any static styles that are
13867 * present from when the element was created with `styling`).
13868 *
13869 * Note that the styling element is updated as part of `stylingApply`.
13870 *
13871 * @param prop A valid CSS property.
13872 * @param value New value to write (`null` or an empty string to remove).
13873 * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.
13874 *
13875 * Note that this will apply the provided style value to the host element if this function is called
13876 * within a host binding function.
13877 *
13878 * @codeGenApi
13879 */
13880export declare function ɵɵstyleProp(prop: string, value: string | number | ɵSafeValue | undefined | null, suffix?: string | null): typeof ɵɵstyleProp;
13881
13882
13883/**
13884 *
13885 * Update an interpolated style property on an element with single bound value surrounded by text.
13886 *
13887 * Used when the value passed to a property has 1 interpolated value in it:
13888 *
13889 * ```html
13890 * <div style.color="prefix{{v0}}suffix"></div>
13891 * ```
13892 *
13893 * Its compiled representation is:
13894 *
13895 * ```ts
13896 * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');
13897 * ```
13898 *
13899 * @param styleIndex Index of style to update. This index value refers to the
13900 * index of the style in the style bindings array that was passed into
13901 * `styling`.
13902 * @param prefix Static value used for concatenation only.
13903 * @param v0 Value checked for change.
13904 * @param suffix Static value used for concatenation only.
13905 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
13906 * @returns itself, so that it may be chained.
13907 * @codeGenApi
13908 */
13909export declare function ɵɵstylePropInterpolate1(prop: string, prefix: string, v0: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate1;
13910
13911/**
13912 *
13913 * Update an interpolated style property on an element with 2 bound values surrounded by text.
13914 *
13915 * Used when the value passed to a property has 2 interpolated values in it:
13916 *
13917 * ```html
13918 * <div style.color="prefix{{v0}}-{{v1}}suffix"></div>
13919 * ```
13920 *
13921 * Its compiled representation is:
13922 *
13923 * ```ts
13924 * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');
13925 * ```
13926 *
13927 * @param styleIndex Index of style to update. This index value refers to the
13928 * index of the style in the style bindings array that was passed into
13929 * `styling`.
13930 * @param prefix Static value used for concatenation only.
13931 * @param v0 Value checked for change.
13932 * @param i0 Static value used for concatenation only.
13933 * @param v1 Value checked for change.
13934 * @param suffix Static value used for concatenation only.
13935 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
13936 * @returns itself, so that it may be chained.
13937 * @codeGenApi
13938 */
13939export declare function ɵɵstylePropInterpolate2(prop: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate2;
13940
13941/**
13942 *
13943 * Update an interpolated style property on an element with 3 bound values surrounded by text.
13944 *
13945 * Used when the value passed to a property has 3 interpolated values in it:
13946 *
13947 * ```html
13948 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
13949 * ```
13950 *
13951 * Its compiled representation is:
13952 *
13953 * ```ts
13954 * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');
13955 * ```
13956 *
13957 * @param styleIndex Index of style to update. This index value refers to the
13958 * index of the style in the style bindings array that was passed into
13959 * `styling`.
13960 * @param prefix Static value used for concatenation only.
13961 * @param v0 Value checked for change.
13962 * @param i0 Static value used for concatenation only.
13963 * @param v1 Value checked for change.
13964 * @param i1 Static value used for concatenation only.
13965 * @param v2 Value checked for change.
13966 * @param suffix Static value used for concatenation only.
13967 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
13968 * @returns itself, so that it may be chained.
13969 * @codeGenApi
13970 */
13971export declare function ɵɵstylePropInterpolate3(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate3;
13972
13973/**
13974 *
13975 * Update an interpolated style property on an element with 4 bound values surrounded by text.
13976 *
13977 * Used when the value passed to a property has 4 interpolated values in it:
13978 *
13979 * ```html
13980 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
13981 * ```
13982 *
13983 * Its compiled representation is:
13984 *
13985 * ```ts
13986 * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
13987 * ```
13988 *
13989 * @param styleIndex Index of style to update. This index value refers to the
13990 * index of the style in the style bindings array that was passed into
13991 * `styling`.
13992 * @param prefix Static value used for concatenation only.
13993 * @param v0 Value checked for change.
13994 * @param i0 Static value used for concatenation only.
13995 * @param v1 Value checked for change.
13996 * @param i1 Static value used for concatenation only.
13997 * @param v2 Value checked for change.
13998 * @param i2 Static value used for concatenation only.
13999 * @param v3 Value checked for change.
14000 * @param suffix Static value used for concatenation only.
14001 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14002 * @returns itself, so that it may be chained.
14003 * @codeGenApi
14004 */
14005export declare function ɵɵstylePropInterpolate4(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate4;
14006
14007/**
14008 *
14009 * Update an interpolated style property on an element with 5 bound values surrounded by text.
14010 *
14011 * Used when the value passed to a property has 5 interpolated values in it:
14012 *
14013 * ```html
14014 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
14015 * ```
14016 *
14017 * Its compiled representation is:
14018 *
14019 * ```ts
14020 * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
14021 * ```
14022 *
14023 * @param styleIndex Index of style to update. This index value refers to the
14024 * index of the style in the style bindings array that was passed into
14025 * `styling`.
14026 * @param prefix Static value used for concatenation only.
14027 * @param v0 Value checked for change.
14028 * @param i0 Static value used for concatenation only.
14029 * @param v1 Value checked for change.
14030 * @param i1 Static value used for concatenation only.
14031 * @param v2 Value checked for change.
14032 * @param i2 Static value used for concatenation only.
14033 * @param v3 Value checked for change.
14034 * @param i3 Static value used for concatenation only.
14035 * @param v4 Value checked for change.
14036 * @param suffix Static value used for concatenation only.
14037 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14038 * @returns itself, so that it may be chained.
14039 * @codeGenApi
14040 */
14041export declare function ɵɵstylePropInterpolate5(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate5;
14042
14043/**
14044 *
14045 * Update an interpolated style property on an element with 6 bound values surrounded by text.
14046 *
14047 * Used when the value passed to a property has 6 interpolated values in it:
14048 *
14049 * ```html
14050 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
14051 * ```
14052 *
14053 * Its compiled representation is:
14054 *
14055 * ```ts
14056 * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
14057 * ```
14058 *
14059 * @param styleIndex Index of style to update. This index value refers to the
14060 * index of the style in the style bindings array that was passed into
14061 * `styling`.
14062 * @param prefix Static value used for concatenation only.
14063 * @param v0 Value checked for change.
14064 * @param i0 Static value used for concatenation only.
14065 * @param v1 Value checked for change.
14066 * @param i1 Static value used for concatenation only.
14067 * @param v2 Value checked for change.
14068 * @param i2 Static value used for concatenation only.
14069 * @param v3 Value checked for change.
14070 * @param i3 Static value used for concatenation only.
14071 * @param v4 Value checked for change.
14072 * @param i4 Static value used for concatenation only.
14073 * @param v5 Value checked for change.
14074 * @param suffix Static value used for concatenation only.
14075 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14076 * @returns itself, so that it may be chained.
14077 * @codeGenApi
14078 */
14079export declare function ɵɵstylePropInterpolate6(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate6;
14080
14081/**
14082 *
14083 * Update an interpolated style property on an element with 7 bound values surrounded by text.
14084 *
14085 * Used when the value passed to a property has 7 interpolated values in it:
14086 *
14087 * ```html
14088 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
14089 * ```
14090 *
14091 * Its compiled representation is:
14092 *
14093 * ```ts
14094 * ɵɵstylePropInterpolate7(
14095 * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
14096 * ```
14097 *
14098 * @param styleIndex Index of style to update. This index value refers to the
14099 * index of the style in the style bindings array that was passed into
14100 * `styling`.
14101 * @param prefix Static value used for concatenation only.
14102 * @param v0 Value checked for change.
14103 * @param i0 Static value used for concatenation only.
14104 * @param v1 Value checked for change.
14105 * @param i1 Static value used for concatenation only.
14106 * @param v2 Value checked for change.
14107 * @param i2 Static value used for concatenation only.
14108 * @param v3 Value checked for change.
14109 * @param i3 Static value used for concatenation only.
14110 * @param v4 Value checked for change.
14111 * @param i4 Static value used for concatenation only.
14112 * @param v5 Value checked for change.
14113 * @param i5 Static value used for concatenation only.
14114 * @param v6 Value checked for change.
14115 * @param suffix Static value used for concatenation only.
14116 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14117 * @returns itself, so that it may be chained.
14118 * @codeGenApi
14119 */
14120export declare function ɵɵstylePropInterpolate7(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate7;
14121
14122/**
14123 *
14124 * Update an interpolated style property on an element with 8 bound values surrounded by text.
14125 *
14126 * Used when the value passed to a property has 8 interpolated values in it:
14127 *
14128 * ```html
14129 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
14130 * ```
14131 *
14132 * Its compiled representation is:
14133 *
14134 * ```ts
14135 * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,
14136 * '-', v7, 'suffix');
14137 * ```
14138 *
14139 * @param styleIndex Index of style to update. This index value refers to the
14140 * index of the style in the style bindings array that was passed into
14141 * `styling`.
14142 * @param prefix Static value used for concatenation only.
14143 * @param v0 Value checked for change.
14144 * @param i0 Static value used for concatenation only.
14145 * @param v1 Value checked for change.
14146 * @param i1 Static value used for concatenation only.
14147 * @param v2 Value checked for change.
14148 * @param i2 Static value used for concatenation only.
14149 * @param v3 Value checked for change.
14150 * @param i3 Static value used for concatenation only.
14151 * @param v4 Value checked for change.
14152 * @param i4 Static value used for concatenation only.
14153 * @param v5 Value checked for change.
14154 * @param i5 Static value used for concatenation only.
14155 * @param v6 Value checked for change.
14156 * @param i6 Static value used for concatenation only.
14157 * @param v7 Value checked for change.
14158 * @param suffix Static value used for concatenation only.
14159 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14160 * @returns itself, so that it may be chained.
14161 * @codeGenApi
14162 */
14163export declare function ɵɵstylePropInterpolate8(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate8;
14164
14165/**
14166 * Update an interpolated style property on an element with 9 or more bound values surrounded by
14167 * text.
14168 *
14169 * Used when the number of interpolated values exceeds 8.
14170 *
14171 * ```html
14172 * <div
14173 * style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix">
14174 * </div>
14175 * ```
14176 *
14177 * Its compiled representation is:
14178 *
14179 * ```ts
14180 * ɵɵstylePropInterpolateV(
14181 * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
14182 * 'suffix']);
14183 * ```
14184 *
14185 * @param styleIndex Index of style to update. This index value refers to the
14186 * index of the style in the style bindings array that was passed into
14187 * `styling`..
14188 * @param values The collection of values and the strings in-between those values, beginning with
14189 * a string prefix and ending with a string suffix.
14190 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
14191 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14192 * @returns itself, so that it may be chained.
14193 * @codeGenApi
14194 */
14195export declare function ɵɵstylePropInterpolateV(prop: string, values: any[], valueSuffix?: string | null): typeof ɵɵstylePropInterpolateV;
14196
14197/**
14198 * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.
14199 *
14200 * This instruction is for compatibility purposes and is designed to ensure that a
14201 * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered
14202 * in the component's renderer. Normally all host listeners are evaluated with the
14203 * parent component's renderer, but, in the case of animation @triggers, they need
14204 * to be evaluated with the sub component's renderer (because that's where the
14205 * animation triggers are defined).
14206 *
14207 * Do not use this instruction as a replacement for `listener`. This instruction
14208 * only exists to ensure compatibility with the ViewEngine's host binding behavior.
14209 *
14210 * @param eventName Name of the event
14211 * @param listenerFn The function to be called when event emits
14212 * @param useCapture Whether or not to use capture in event listener
14213 * @param eventTargetResolver Function that returns global target information in case this listener
14214 * should be attached to a global object like window, document or body
14215 *
14216 * @codeGenApi
14217 */
14218export declare function ɵɵsyntheticHostListener(eventName: string, listenerFn: (e?: any) => any): typeof ɵɵsyntheticHostListener;
14219
14220/**
14221 * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.
14222 *
14223 * This instruction is for compatibility purposes and is designed to ensure that a
14224 * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in
14225 * the component's renderer. Normally all host bindings are evaluated with the parent
14226 * component's renderer, but, in the case of animation @triggers, they need to be
14227 * evaluated with the sub component's renderer (because that's where the animation
14228 * triggers are defined).
14229 *
14230 * Do not use this instruction as a replacement for `elementProperty`. This instruction
14231 * only exists to ensure compatibility with the ViewEngine's host binding behavior.
14232 *
14233 * @param index The index of the element to update in the data array
14234 * @param propName Name of property. Because it is going to DOM, this is not subject to
14235 * renaming as part of minification.
14236 * @param value New value to write.
14237 * @param sanitizer An optional function used to sanitize the value.
14238 *
14239 * @codeGenApi
14240 */
14241export declare function ɵɵsyntheticHostProperty<T>(propName: string, value: T | ɵNO_CHANGE, sanitizer?: SanitizerFn | null): typeof ɵɵsyntheticHostProperty;
14242
14243/**
14244 * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
14245 *
14246 * <ng-template #foo>
14247 * <div></div>
14248 * </ng-template>
14249 *
14250 * @param index The index of the container in the data array
14251 * @param templateFn Inline template
14252 * @param decls The number of nodes, local refs, and pipes for this template
14253 * @param vars The number of bindings for this template
14254 * @param tagName The name of the container element, if applicable
14255 * @param attrsIndex Index of template attributes in the `consts` array.
14256 * @param localRefs Index of the local references in the `consts` array.
14257 * @param localRefExtractor A function which extracts local-refs values from the template.
14258 * Defaults to the current element associated with the local-ref.
14259 *
14260 * @codeGenApi
14261 */
14262export declare function ɵɵtemplate(index: number, templateFn: ComponentTemplate<any> | null, decls: number, vars: number, tagName?: string | null, attrsIndex?: number | null, localRefsIndex?: number | null, localRefExtractor?: LocalRefExtractor): void;
14263
14264/**
14265 * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the
14266 * `<ng-template>` element.
14267 *
14268 * @codeGenApi
14269 */
14270export declare function ɵɵtemplateRefExtractor(tNode: TNode, lView: LView): TemplateRef<any> | null;
14271
14272/**
14273 * Create static text node
14274 *
14275 * @param index Index of the node in the data array
14276 * @param value Static string value to write.
14277 *
14278 * @codeGenApi
14279 */
14280export declare function ɵɵtext(index: number, value?: string): void;
14281
14282/**
14283 *
14284 * Update text content with a lone bound value
14285 *
14286 * Used when a text node has 1 interpolated value in it, an no additional text
14287 * surrounds that interpolated value:
14288 *
14289 * ```html
14290 * <div>{{v0}}</div>
14291 * ```
14292 *
14293 * Its compiled representation is:
14294 *
14295 * ```ts
14296 * ɵɵtextInterpolate(v0);
14297 * ```
14298 * @returns itself, so that it may be chained.
14299 * @see textInterpolateV
14300 * @codeGenApi
14301 */
14302export declare function ɵɵtextInterpolate(v0: any): typeof ɵɵtextInterpolate;
14303
14304/**
14305 *
14306 * Update text content with single bound value surrounded by other text.
14307 *
14308 * Used when a text node has 1 interpolated value in it:
14309 *
14310 * ```html
14311 * <div>prefix{{v0}}suffix</div>
14312 * ```
14313 *
14314 * Its compiled representation is:
14315 *
14316 * ```ts
14317 * ɵɵtextInterpolate1('prefix', v0, 'suffix');
14318 * ```
14319 * @returns itself, so that it may be chained.
14320 * @see textInterpolateV
14321 * @codeGenApi
14322 */
14323export declare function ɵɵtextInterpolate1(prefix: string, v0: any, suffix: string): typeof ɵɵtextInterpolate1;
14324
14325/**
14326 *
14327 * Update text content with 2 bound values surrounded by other text.
14328 *
14329 * Used when a text node has 2 interpolated values in it:
14330 *
14331 * ```html
14332 * <div>prefix{{v0}}-{{v1}}suffix</div>
14333 * ```
14334 *
14335 * Its compiled representation is:
14336 *
14337 * ```ts
14338 * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');
14339 * ```
14340 * @returns itself, so that it may be chained.
14341 * @see textInterpolateV
14342 * @codeGenApi
14343 */
14344export declare function ɵɵtextInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): typeof ɵɵtextInterpolate2;
14345
14346/**
14347 *
14348 * Update text content with 3 bound values surrounded by other text.
14349 *
14350 * Used when a text node has 3 interpolated values in it:
14351 *
14352 * ```html
14353 * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>
14354 * ```
14355 *
14356 * Its compiled representation is:
14357 *
14358 * ```ts
14359 * ɵɵtextInterpolate3(
14360 * 'prefix', v0, '-', v1, '-', v2, 'suffix');
14361 * ```
14362 * @returns itself, so that it may be chained.
14363 * @see textInterpolateV
14364 * @codeGenApi
14365 */
14366export declare function ɵɵtextInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): typeof ɵɵtextInterpolate3;
14367
14368/**
14369 *
14370 * Update text content with 4 bound values surrounded by other text.
14371 *
14372 * Used when a text node has 4 interpolated values in it:
14373 *
14374 * ```html
14375 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>
14376 * ```
14377 *
14378 * Its compiled representation is:
14379 *
14380 * ```ts
14381 * ɵɵtextInterpolate4(
14382 * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
14383 * ```
14384 * @returns itself, so that it may be chained.
14385 * @see ɵɵtextInterpolateV
14386 * @codeGenApi
14387 */
14388export declare function ɵɵtextInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): typeof ɵɵtextInterpolate4;
14389
14390/**
14391 *
14392 * Update text content with 5 bound values surrounded by other text.
14393 *
14394 * Used when a text node has 5 interpolated values in it:
14395 *
14396 * ```html
14397 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>
14398 * ```
14399 *
14400 * Its compiled representation is:
14401 *
14402 * ```ts
14403 * ɵɵtextInterpolate5(
14404 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
14405 * ```
14406 * @returns itself, so that it may be chained.
14407 * @see textInterpolateV
14408 * @codeGenApi
14409 */
14410export declare function ɵɵtextInterpolate5(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, suffix: string): typeof ɵɵtextInterpolate5;
14411
14412/**
14413 *
14414 * Update text content with 6 bound values surrounded by other text.
14415 *
14416 * Used when a text node has 6 interpolated values in it:
14417 *
14418 * ```html
14419 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>
14420 * ```
14421 *
14422 * Its compiled representation is:
14423 *
14424 * ```ts
14425 * ɵɵtextInterpolate6(
14426 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
14427 * ```
14428 *
14429 * @param i4 Static value used for concatenation only.
14430 * @param v5 Value checked for change. @returns itself, so that it may be chained.
14431 * @see textInterpolateV
14432 * @codeGenApi
14433 */
14434export declare function ɵɵtextInterpolate6(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, suffix: string): typeof ɵɵtextInterpolate6;
14435
14436/**
14437 *
14438 * Update text content with 7 bound values surrounded by other text.
14439 *
14440 * Used when a text node has 7 interpolated values in it:
14441 *
14442 * ```html
14443 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>
14444 * ```
14445 *
14446 * Its compiled representation is:
14447 *
14448 * ```ts
14449 * ɵɵtextInterpolate7(
14450 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
14451 * ```
14452 * @returns itself, so that it may be chained.
14453 * @see textInterpolateV
14454 * @codeGenApi
14455 */
14456export declare function ɵɵtextInterpolate7(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, suffix: string): typeof ɵɵtextInterpolate7;
14457
14458/**
14459 *
14460 * Update text content with 8 bound values surrounded by other text.
14461 *
14462 * Used when a text node has 8 interpolated values in it:
14463 *
14464 * ```html
14465 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>
14466 * ```
14467 *
14468 * Its compiled representation is:
14469 *
14470 * ```ts
14471 * ɵɵtextInterpolate8(
14472 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
14473 * ```
14474 * @returns itself, so that it may be chained.
14475 * @see textInterpolateV
14476 * @codeGenApi
14477 */
14478export declare function ɵɵtextInterpolate8(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, i3: string, v4: any, i4: string, v5: any, i5: string, v6: any, i6: string, v7: any, suffix: string): typeof ɵɵtextInterpolate8;
14479
14480/**
14481 * Update text content with 9 or more bound values other surrounded by text.
14482 *
14483 * Used when the number of interpolated values exceeds 8.
14484 *
14485 * ```html
14486 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>
14487 * ```
14488 *
14489 * Its compiled representation is:
14490 *
14491 * ```ts
14492 * ɵɵtextInterpolateV(
14493 * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
14494 * 'suffix']);
14495 * ```
14496 *.
14497 * @param values The collection of values and the strings in between those values, beginning with
14498 * a string prefix and ending with a string suffix.
14499 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
14500 *
14501 * @returns itself, so that it may be chained.
14502 * @codeGenApi
14503 */
14504export declare function ɵɵtextInterpolateV(values: any[]): typeof ɵɵtextInterpolateV;
14505
14506/**
14507 * A template tag function for promoting the associated constant literal to a
14508 * TrustedHTML. Interpolation is explicitly not allowed.
14509 *
14510 * @param html constant template literal containing trusted HTML.
14511 * @returns TrustedHTML wrapping `html`.
14512 *
14513 * @security This is a security-sensitive function and should only be used to
14514 * convert constant values of attributes and properties found in
14515 * application-provided Angular templates to TrustedHTML.
14516 *
14517 * @codeGenApi
14518 */
14519export declare function ɵɵtrustConstantHtml(html: TemplateStringsArray): TrustedHTML | string;
14520
14521/**
14522 * A template tag function for promoting the associated constant literal to a
14523 * TrustedScriptURL. Interpolation is explicitly not allowed.
14524 *
14525 * @param url constant template literal containing a trusted script URL.
14526 * @returns TrustedScriptURL wrapping `url`.
14527 *
14528 * @security This is a security-sensitive function and should only be used to
14529 * convert constant values of attributes and properties found in
14530 * application-provided Angular templates to TrustedScriptURL.
14531 *
14532 * @codeGenApi
14533 */
14534export declare function ɵɵtrustConstantResourceUrl(url: TemplateStringsArray): TrustedScriptURL | string;
14535
14536/**
14537 * Creates new QueryList, stores the reference in LView and returns QueryList.
14538 *
14539 * @param predicate The type for which the query will search
14540 * @param flags Flags associated with the query
14541 * @param read What to save in the query
14542 *
14543 * @codeGenApi
14544 */
14545export declare function ɵɵviewQuery<T>(predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): void;
14546
14547export { }
14548
\No newline at end of file