UNPKG

546 kBTypeScriptView Raw
1/**
2 * @license Angular v13.0.0-rc.0
3 * (c) 2010-2021 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 * Configures the root injector for an app with
287 * providers of `@angular/core` dependencies that `ApplicationRef` needs
288 * to bootstrap components.
289 *
290 * Re-exported by `BrowserModule`, which is included automatically in the root
291 * `AppModule` when you create a new app with the CLI `new` command.
292 *
293 * @publicApi
294 */
295export declare class ApplicationModule {
296 constructor(appRef: ApplicationRef);
297 static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationModule, never>;
298 static ɵmod: i0.ɵɵNgModuleDeclaration<ApplicationModule, never, never, never>;
299 static ɵinj: i0.ɵɵInjectorDeclaration<ApplicationModule>;
300}
301
302/**
303 * A reference to an Angular application running on a page.
304 *
305 * @usageNotes
306 *
307 * {@a is-stable-examples}
308 * ### isStable examples and caveats
309 *
310 * Note two important points about `isStable`, demonstrated in the examples below:
311 * - the application will never be stable if you start any kind
312 * of recurrent asynchronous task when the application starts
313 * (for example for a polling process, started with a `setInterval`, a `setTimeout`
314 * or using RxJS operators like `interval`);
315 * - the `isStable` Observable runs outside of the Angular zone.
316 *
317 * Let's imagine that you start a recurrent task
318 * (here incrementing a counter, using RxJS `interval`),
319 * and at the same time subscribe to `isStable`.
320 *
321 * ```
322 * constructor(appRef: ApplicationRef) {
323 * appRef.isStable.pipe(
324 * filter(stable => stable)
325 * ).subscribe(() => console.log('App is stable now');
326 * interval(1000).subscribe(counter => console.log(counter));
327 * }
328 * ```
329 * In this example, `isStable` will never emit `true`,
330 * and the trace "App is stable now" will never get logged.
331 *
332 * If you want to execute something when the app is stable,
333 * you have to wait for the application to be stable
334 * before starting your polling process.
335 *
336 * ```
337 * constructor(appRef: ApplicationRef) {
338 * appRef.isStable.pipe(
339 * first(stable => stable),
340 * tap(stable => console.log('App is stable now')),
341 * switchMap(() => interval(1000))
342 * ).subscribe(counter => console.log(counter));
343 * }
344 * ```
345 * In this example, the trace "App is stable now" will be logged
346 * and then the counter starts incrementing every second.
347 *
348 * Note also that this Observable runs outside of the Angular zone,
349 * which means that the code in the subscription
350 * to this Observable will not trigger the change detection.
351 *
352 * Let's imagine that instead of logging the counter value,
353 * you update a field of your component
354 * and display it in its template.
355 *
356 * ```
357 * constructor(appRef: ApplicationRef) {
358 * appRef.isStable.pipe(
359 * first(stable => stable),
360 * switchMap(() => interval(1000))
361 * ).subscribe(counter => this.value = counter);
362 * }
363 * ```
364 * As the `isStable` Observable runs outside the zone,
365 * the `value` field will be updated properly,
366 * but the template will not be refreshed!
367 *
368 * You'll have to manually trigger the change detection to update the template.
369 *
370 * ```
371 * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {
372 * appRef.isStable.pipe(
373 * first(stable => stable),
374 * switchMap(() => interval(1000))
375 * ).subscribe(counter => {
376 * this.value = counter;
377 * cd.detectChanges();
378 * });
379 * }
380 * ```
381 *
382 * Or make the subscription callback run inside the zone.
383 *
384 * ```
385 * constructor(appRef: ApplicationRef, zone: NgZone) {
386 * appRef.isStable.pipe(
387 * first(stable => stable),
388 * switchMap(() => interval(1000))
389 * ).subscribe(counter => zone.run(() => this.value = counter));
390 * }
391 * ```
392 *
393 * @publicApi
394 */
395export declare class ApplicationRef {
396 private _zone;
397 private _injector;
398 private _exceptionHandler;
399 private _componentFactoryResolver;
400 private _initStatus;
401 private _views;
402 private _runningTick;
403 private _stable;
404 private _onMicrotaskEmptySubscription;
405 /**
406 * Get a list of component types registered to this application.
407 * This list is populated even before the component is created.
408 */
409 readonly componentTypes: Type<any>[];
410 /**
411 * Get a list of components registered to this application.
412 */
413 readonly components: ComponentRef<any>[];
414 /**
415 * Returns an Observable that indicates when the application is stable or unstable.
416 *
417 * @see [Usage notes](#is-stable-examples) for examples and caveats when using this API.
418 */
419 readonly isStable: Observable<boolean>;
420 /**
421 * Bootstrap a component onto the element identified by its selector or, optionally, to a
422 * specified element.
423 *
424 * @usageNotes
425 * ### Bootstrap process
426 *
427 * When bootstrapping a component, Angular mounts it onto a target DOM element
428 * and kicks off automatic change detection. The target DOM element can be
429 * provided using the `rootSelectorOrNode` argument.
430 *
431 * If the target DOM element is not provided, Angular tries to find one on a page
432 * using the `selector` of the component that is being bootstrapped
433 * (first matched element is used).
434 *
435 * ### Example
436 *
437 * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
438 * but it requires us to know the component while writing the application code.
439 *
440 * Imagine a situation where we have to wait for an API call to decide about the component to
441 * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
442 * dynamically bootstrap a component.
443 *
444 * {@example core/ts/platform/platform.ts region='componentSelector'}
445 *
446 * Optionally, a component can be mounted onto a DOM element that does not match the
447 * selector of the bootstrapped component.
448 *
449 * In the following example, we are providing a CSS selector to match the target element.
450 *
451 * {@example core/ts/platform/platform.ts region='cssSelector'}
452 *
453 * While in this example, we are providing reference to a DOM node.
454 *
455 * {@example core/ts/platform/platform.ts region='domNode'}
456 */
457 bootstrap<C>(component: Type<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
458 /**
459 * Bootstrap a component onto the element identified by its selector or, optionally, to a
460 * specified element.
461 *
462 * @usageNotes
463 * ### Bootstrap process
464 *
465 * When bootstrapping a component, Angular mounts it onto a target DOM element
466 * and kicks off automatic change detection. The target DOM element can be
467 * provided using the `rootSelectorOrNode` argument.
468 *
469 * If the target DOM element is not provided, Angular tries to find one on a page
470 * using the `selector` of the component that is being bootstrapped
471 * (first matched element is used).
472 *
473 * ### Example
474 *
475 * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
476 * but it requires us to know the component while writing the application code.
477 *
478 * Imagine a situation where we have to wait for an API call to decide about the component to
479 * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
480 * dynamically bootstrap a component.
481 *
482 * {@example core/ts/platform/platform.ts region='componentSelector'}
483 *
484 * Optionally, a component can be mounted onto a DOM element that does not match the
485 * selector of the bootstrapped component.
486 *
487 * In the following example, we are providing a CSS selector to match the target element.
488 *
489 * {@example core/ts/platform/platform.ts region='cssSelector'}
490 *
491 * While in this example, we are providing reference to a DOM node.
492 *
493 * {@example core/ts/platform/platform.ts region='domNode'}
494 *
495 * @deprecated Passing Component factories as the `Application.bootstrap` function argument is
496 * deprecated. Pass Component Types instead.
497 */
498 bootstrap<C>(componentFactory: ComponentFactory<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
499 /**
500 * Invoke this method to explicitly process change detection and its side-effects.
501 *
502 * In development mode, `tick()` also performs a second change detection cycle to ensure that no
503 * further changes are detected. If additional changes are picked up during this second cycle,
504 * bindings in the app have side-effects that cannot be resolved in a single change detection
505 * pass.
506 * In this case, Angular throws an error, since an Angular application can only have one change
507 * detection pass during which all change detection must complete.
508 */
509 tick(): void;
510 /**
511 * Attaches a view so that it will be dirty checked.
512 * The view will be automatically detached when it is destroyed.
513 * This will throw if the view is already attached to a ViewContainer.
514 */
515 attachView(viewRef: ViewRef): void;
516 /**
517 * Detaches a view from dirty checking again.
518 */
519 detachView(viewRef: ViewRef): void;
520 private _loadComponent;
521 /**
522 * Returns the number of attached views.
523 */
524 get viewCount(): number;
525 static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationRef, never>;
526 static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationRef>;
527}
528
529/**
530 * @publicApi
531 */
532export declare function asNativeElements(debugEls: DebugElement[]): any;
533
534/**
535 * Checks that there is currently a platform that contains the given token as a provider.
536 *
537 * @publicApi
538 */
539export declare function assertPlatform(requiredToken: any): PlatformRef;
540
541/**
542 * Type of the Attribute metadata.
543 *
544 * @publicApi
545 */
546export declare interface Attribute {
547 /**
548 * The name of the attribute whose value can be injected.
549 */
550 attributeName: string;
551}
552
553/**
554 * Attribute decorator and metadata.
555 *
556 * @Annotation
557 * @publicApi
558 */
559export declare const Attribute: AttributeDecorator;
560
561
562/**
563 * Type of the Attribute decorator / constructor function.
564 *
565 * @publicApi
566 */
567export declare interface AttributeDecorator {
568 /**
569 * Parameter decorator for a directive constructor that designates
570 * a host-element attribute whose value is injected as a constant string literal.
571 *
572 * @usageNotes
573 *
574 * Suppose we have an `<input>` element and want to know its `type`.
575 *
576 * ```html
577 * <input type="text">
578 * ```
579 *
580 * The following example uses the decorator to inject the string literal `text` in a directive.
581 *
582 * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}
583 *
584 * The following example uses the decorator in a component constructor.
585 *
586 * {@example core/ts/metadata/metadata.ts region='attributeFactory'}
587 *
588 */
589 (name: string): any;
590 new (name: string): Attribute;
591}
592
593declare interface BindingDef {
594 flags: ɵBindingFlags;
595 ns: string | null;
596 name: string | null;
597 nonMinifiedName: string | null;
598 securityContext: SecurityContext | null;
599 suffix: string | null;
600}
601
602/**
603 * Provides additional options to the bootstraping process.
604 *
605 *
606 */
607declare interface BootstrapOptions {
608 /**
609 * Optionally specify which `NgZone` should be used.
610 *
611 * - Provide your own `NgZone` instance.
612 * - `zone.js` - Use default `NgZone` which requires `Zone.js`.
613 * - `noop` - Use `NoopNgZone` which does nothing.
614 */
615 ngZone?: NgZone | 'zone.js' | 'noop';
616 /**
617 * Optionally specify coalescing event change detections or not.
618 * Consider the following case.
619 *
620 * <div (click)="doSomething()">
621 * <button (click)="doSomethingElse()"></button>
622 * </div>
623 *
624 * When button is clicked, because of the event bubbling, both
625 * event handlers will be called and 2 change detections will be
626 * triggered. We can colesce such kind of events to only trigger
627 * change detection only once.
628 *
629 * By default, this option will be false. So the events will not be
630 * coalesced and the change detection will be triggered multiple times.
631 * And if this option be set to true, the change detection will be
632 * triggered async by scheduling a animation frame. So in the case above,
633 * the change detection will only be triggered once.
634 */
635 ngZoneEventCoalescing?: boolean;
636 /**
637 * Optionally specify if `NgZone#run()` method invocations should be coalesced
638 * into a single change detection.
639 *
640 * Consider the following case.
641 *
642 * for (let i = 0; i < 10; i ++) {
643 * ngZone.run(() => {
644 * // do something
645 * });
646 * }
647 *
648 * This case triggers the change detection multiple times.
649 * With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.
650 * In addition, the change detection executes in requestAnimation.
651 *
652 */
653 ngZoneRunCoalescing?: boolean;
654}
655
656
657/**
658 * The strategy that the default change detector uses to detect changes.
659 * When set, takes effect the next time change detection is triggered.
660 *
661 * @see {@link ChangeDetectorRef#usage-notes Change detection usage}
662 *
663 * @publicApi
664 */
665export declare enum ChangeDetectionStrategy {
666 /**
667 * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated
668 * until reactivated by setting the strategy to `Default` (`CheckAlways`).
669 * Change detection can still be explicitly invoked.
670 * This strategy applies to all child directives and cannot be overridden.
671 */
672 OnPush = 0,
673 /**
674 * Use the default `CheckAlways` strategy, in which change detection is automatic until
675 * explicitly deactivated.
676 */
677 Default = 1
678}
679
680declare type ChangeDetectionStrategy_2 = number;
681
682/**
683 * Base class that provides change detection functionality.
684 * A change-detection tree collects all views that are to be checked for changes.
685 * Use the methods to add and remove views from the tree, initiate change-detection,
686 * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.
687 *
688 * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks)
689 * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection)
690 *
691 * @usageNotes
692 *
693 * The following examples demonstrate how to modify default change-detection behavior
694 * to perform explicit detection when needed.
695 *
696 * ### Use `markForCheck()` with `CheckOnce` strategy
697 *
698 * The following example sets the `OnPush` change-detection strategy for a component
699 * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check
700 * after an interval. See [live demo](https://plnkr.co/edit/GC512b?p=preview).
701 *
702 * <code-example path="core/ts/change_detect/change-detection.ts"
703 * region="mark-for-check"></code-example>
704 *
705 * ### Detach change detector to limit how often check occurs
706 *
707 * The following example defines a component with a large list of read-only data
708 * that is expected to change constantly, many times per second.
709 * To improve performance, we want to check and update the list
710 * less often than the changes actually occur. To do that, we detach
711 * the component's change detector and perform an explicit local check every five seconds.
712 *
713 * <code-example path="core/ts/change_detect/change-detection.ts" region="detach"></code-example>
714 *
715 *
716 * ### Reattaching a detached component
717 *
718 * The following example creates a component displaying live data.
719 * The component detaches its change detector from the main change detector tree
720 * when the `live` property is set to false, and reattaches it when the property
721 * becomes true.
722 *
723 * <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example>
724 *
725 * @publicApi
726 */
727export declare abstract class ChangeDetectorRef {
728 /**
729 * When a view uses the {@link ChangeDetectionStrategy#OnPush OnPush} (checkOnce)
730 * change detection strategy, explicitly marks the view as changed so that
731 * it can be checked again.
732 *
733 * Components are normally marked as dirty (in need of rerendering) when inputs
734 * have changed or events have fired in the view. Call this method to ensure that
735 * a component is checked even if these triggers have not occured.
736 *
737 * <!-- TODO: Add a link to a chapter on OnPush components -->
738 *
739 */
740 abstract markForCheck(): void;
741 /**
742 * Detaches this view from the change-detection tree.
743 * A detached view is not checked until it is reattached.
744 * Use in combination with `detectChanges()` to implement local change detection checks.
745 *
746 * Detached views are not checked during change detection runs until they are
747 * re-attached, even if they are marked as dirty.
748 *
749 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
750 * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
751 *
752 */
753 abstract detach(): void;
754 /**
755 * Checks this view and its children. Use in combination with {@link ChangeDetectorRef#detach
756 * detach}
757 * to implement local change detection checks.
758 *
759 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
760 * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
761 *
762 */
763 abstract detectChanges(): void;
764 /**
765 * Checks the change detector and its children, and throws if any changes are detected.
766 *
767 * Use in development mode to verify that running change detection doesn't introduce
768 * other changes.
769 */
770 abstract checkNoChanges(): void;
771 /**
772 * Re-attaches the previously detached view to the change detection tree.
773 * Views are attached to the tree by default.
774 *
775 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
776 *
777 */
778 abstract reattach(): void;
779}
780
781declare const CHILD_HEAD = 13;
782
783declare const CHILD_TAIL = 14;
784
785/**
786 * Configures the `Injector` to return an instance of `useClass` for a token.
787 * @see ["Dependency Injection Guide"](guide/dependency-injection).
788 *
789 * @usageNotes
790 *
791 * {@example core/di/ts/provider_spec.ts region='ClassProvider'}
792 *
793 * Note that following two providers are not equal:
794 *
795 * {@example core/di/ts/provider_spec.ts region='ClassProviderDifference'}
796 *
797 * ### Multi-value example
798 *
799 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
800 *
801 * @publicApi
802 */
803export declare interface ClassProvider extends ClassSansProvider {
804 /**
805 * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
806 */
807 provide: any;
808 /**
809 * When true, injector returns an array of instances. This is useful to allow multiple
810 * providers spread across many files to provide configuration information to a common token.
811 */
812 multi?: boolean;
813}
814
815/**
816 * Configures the `Injector` to return a value by invoking a `useClass` function.
817 * Base for `ClassProvider` decorator.
818 *
819 * @see ["Dependency Injection Guide"](guide/dependency-injection).
820 *
821 * @publicApi
822 */
823export declare interface ClassSansProvider {
824 /**
825 * Class to instantiate for the `token`.
826 */
827 useClass: Type<any>;
828}
829
830declare const CLEANUP = 7;
831
832/**
833 * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting
834 * injectable def (`ɵprov`) onto the injectable type.
835 */
836declare function compileInjectable(type: Type<any>, meta?: Injectable): void;
837
838/**
839 * Low-level service for running the angular compiler during runtime
840 * to create {@link ComponentFactory}s, which
841 * can later be used to create and render a Component instance.
842 *
843 * Each `@NgModule` provides an own `Compiler` to its injector,
844 * that will use the directives/pipes of the ng module for compilation
845 * of components.
846 *
847 * @publicApi
848 *
849 * @deprecated
850 * Ivy JIT mode doesn't require accessing this symbol.
851 * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for
852 * additional context.
853 */
854export declare class Compiler {
855 /**
856 * Compiles the given NgModule and all of its components. All templates of the components listed
857 * in `entryComponents` have to be inlined.
858 */
859 compileModuleSync: <T>(moduleType: Type<T>) => NgModuleFactory<T>;
860 /**
861 * Compiles the given NgModule and all of its components
862 */
863 compileModuleAsync: <T>(moduleType: Type<T>) => Promise<NgModuleFactory<T>>;
864 /**
865 * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
866 */
867 compileModuleAndAllComponentsSync: <T>(moduleType: Type<T>) => ModuleWithComponentFactories<T>;
868 /**
869 * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
870 */
871 compileModuleAndAllComponentsAsync: <T>(moduleType: Type<T>) => Promise<ModuleWithComponentFactories<T>>;
872 /**
873 * Clears all caches.
874 */
875 clearCache(): void;
876 /**
877 * Clears the cache for the given component/ngModule.
878 */
879 clearCacheFor(type: Type<any>): void;
880 /**
881 * Returns the id for a given NgModule, if one is defined and known to the compiler.
882 */
883 getModuleId(moduleType: Type<any>): string | undefined;
884 static ɵfac: i0.ɵɵFactoryDeclaration<Compiler, never>;
885 static ɵprov: i0.ɵɵInjectableDeclaration<Compiler>;
886}
887
888/**
889 * Token to provide CompilerOptions in the platform injector.
890 *
891 * @publicApi
892 */
893export declare const COMPILER_OPTIONS: InjectionToken<CompilerOptions[]>;
894
895/**
896 * A factory for creating a Compiler
897 *
898 * @publicApi
899 *
900 * @deprecated
901 * Ivy JIT mode doesn't require accessing this symbol.
902 * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for
903 * additional context.
904 */
905export declare abstract class CompilerFactory {
906 abstract createCompiler(options?: CompilerOptions[]): Compiler;
907}
908
909/**
910 * Options for creating a compiler
911 *
912 * @publicApi
913 */
914export declare type CompilerOptions = {
915 useJit?: boolean;
916 defaultEncapsulation?: ViewEncapsulation;
917 providers?: StaticProvider[];
918 missingTranslation?: MissingTranslationStrategy;
919 preserveWhitespaces?: boolean;
920};
921
922/**
923 * Supplies configuration metadata for an Angular component.
924 *
925 * @publicApi
926 */
927export declare interface Component extends Directive {
928 /**
929 * The change-detection strategy to use for this component.
930 *
931 * When a component is instantiated, Angular creates a change detector,
932 * which is responsible for propagating the component's bindings.
933 * The strategy is one of:
934 * - `ChangeDetectionStrategy#OnPush` sets the strategy to `CheckOnce` (on demand).
935 * - `ChangeDetectionStrategy#Default` sets the strategy to `CheckAlways`.
936 */
937 changeDetection?: ChangeDetectionStrategy;
938 /**
939 * Defines the set of injectable objects that are visible to its view DOM children.
940 * See [example](#injecting-a-class-with-a-view-provider).
941 *
942 */
943 viewProviders?: Provider[];
944 /**
945 * The module ID of the module that contains the component.
946 * The component must be able to resolve relative URLs for templates and styles.
947 * SystemJS exposes the `__moduleName` variable within each module.
948 * In CommonJS, this can be set to `module.id`.
949 *
950 */
951 moduleId?: string;
952 /**
953 * The relative path or absolute URL of a template file for an Angular component.
954 * If provided, do not supply an inline template using `template`.
955 *
956 */
957 templateUrl?: string;
958 /**
959 * An inline template for an Angular component. If provided,
960 * do not supply a template file using `templateUrl`.
961 *
962 */
963 template?: string;
964 /**
965 * One or more relative paths or absolute URLs for files containing CSS stylesheets to use
966 * in this component.
967 */
968 styleUrls?: string[];
969 /**
970 * One or more inline CSS stylesheets to use
971 * in this component.
972 */
973 styles?: string[];
974 /**
975 * One or more animation `trigger()` calls, containing
976 * `state()` and `transition()` definitions.
977 * See the [Animations guide](/guide/animations) and animations API documentation.
978 *
979 */
980 animations?: any[];
981 /**
982 * An encapsulation policy for the template and CSS styles. One of:
983 * - `ViewEncapsulation.Emulated`: Use shimmed CSS that
984 * emulates the native behavior.
985 * - `ViewEncapsulation.None`: Use global CSS without any
986 * encapsulation.
987 * - `ViewEncapsulation.ShadowDom`: Use Shadow DOM v1 to encapsulate styles.
988 *
989 * If not supplied, the value is taken from `CompilerOptions`. The default compiler option is
990 * `ViewEncapsulation.Emulated`.
991 *
992 * If the policy is set to `ViewEncapsulation.Emulated` and the component has no `styles`
993 * or `styleUrls` specified, the policy is automatically switched to `ViewEncapsulation.None`.
994 */
995 encapsulation?: ViewEncapsulation;
996 /**
997 * Overrides the default interpolation start and end delimiters (`{{` and `}}`).
998 */
999 interpolation?: [string, string];
1000 /**
1001 * A set of components that should be compiled along with
1002 * this component. For each component listed here,
1003 * Angular creates a {@link ComponentFactory} and stores it in the
1004 * {@link ComponentFactoryResolver}.
1005 * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.
1006 */
1007 entryComponents?: Array<Type<any> | any[]>;
1008 /**
1009 * True to preserve or false to remove potentially superfluous whitespace characters
1010 * from the compiled template. Whitespace characters are those matching the `\s`
1011 * character class in JavaScript regular expressions. Default is false, unless
1012 * overridden in compiler options.
1013 */
1014 preserveWhitespaces?: boolean;
1015}
1016
1017/**
1018 * Component decorator and metadata.
1019 *
1020 * @Annotation
1021 * @publicApi
1022 */
1023export declare const Component: ComponentDecorator;
1024
1025/**
1026 * Component decorator interface
1027 *
1028 * @publicApi
1029 */
1030export declare interface ComponentDecorator {
1031 /**
1032 * Decorator that marks a class as an Angular component and provides configuration
1033 * metadata that determines how the component should be processed,
1034 * instantiated, and used at runtime.
1035 *
1036 * Components are the most basic UI building block of an Angular app.
1037 * An Angular app contains a tree of Angular components.
1038 *
1039 * Angular components are a subset of directives, always associated with a template.
1040 * Unlike other directives, only one component can be instantiated for a given element in a
1041 * template.
1042 *
1043 * A component must belong to an NgModule in order for it to be available
1044 * to another component or application. To make it a member of an NgModule,
1045 * list it in the `declarations` field of the `NgModule` metadata.
1046 *
1047 * Note that, in addition to these options for configuring a directive,
1048 * you can control a component's runtime behavior by implementing
1049 * life-cycle hooks. For more information, see the
1050 * [Lifecycle Hooks](guide/lifecycle-hooks) guide.
1051 *
1052 * @usageNotes
1053 *
1054 * ### Setting component inputs
1055 *
1056 * The following example creates a component with two data-bound properties,
1057 * specified by the `inputs` value.
1058 *
1059 * <code-example path="core/ts/metadata/directives.ts" region="component-input"></code-example>
1060 *
1061 *
1062 * ### Setting component outputs
1063 *
1064 * The following example shows two event emitters that emit on an interval. One
1065 * emits an output every second, while the other emits every five seconds.
1066 *
1067 * {@example core/ts/metadata/directives.ts region='component-output-interval'}
1068 *
1069 * ### Injecting a class with a view provider
1070 *
1071 * The following simple example injects a class into a component
1072 * using the view provider specified in component metadata:
1073 *
1074 * ```ts
1075 * class Greeter {
1076 * greet(name:string) {
1077 * return 'Hello ' + name + '!';
1078 * }
1079 * }
1080 *
1081 * @Directive({
1082 * selector: 'needs-greeter'
1083 * })
1084 * class NeedsGreeter {
1085 * greeter:Greeter;
1086 *
1087 * constructor(greeter:Greeter) {
1088 * this.greeter = greeter;
1089 * }
1090 * }
1091 *
1092 * @Component({
1093 * selector: 'greet',
1094 * viewProviders: [
1095 * Greeter
1096 * ],
1097 * template: `<needs-greeter></needs-greeter>`
1098 * })
1099 * class HelloWorld {
1100 * }
1101 *
1102 * ```
1103 *
1104 * ### Preserving whitespace
1105 *
1106 * Removing whitespace can greatly reduce AOT-generated code size and speed up view creation.
1107 * As of Angular 6, the default for `preserveWhitespaces` is false (whitespace is removed).
1108 * To change the default setting for all components in your application, set
1109 * the `preserveWhitespaces` option of the AOT compiler.
1110 *
1111 * By default, the AOT compiler removes whitespace characters as follows:
1112 * * Trims all whitespaces at the beginning and the end of a template.
1113 * * Removes whitespace-only text nodes. For example,
1114 *
1115 * ```html
1116 * <button>Action 1</button> <button>Action 2</button>
1117 * ```
1118 *
1119 * becomes:
1120 *
1121 * ```html
1122 * <button>Action 1</button><button>Action 2</button>
1123 * ```
1124 *
1125 * * Replaces a series of whitespace characters in text nodes with a single space.
1126 * For example, `<span>\n some text\n</span>` becomes `<span> some text </span>`.
1127 * * Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,
1128 * where whitespace characters are significant.
1129 *
1130 * Note that these transformations can influence DOM nodes layout, although impact
1131 * should be minimal.
1132 *
1133 * You can override the default behavior to preserve whitespace characters
1134 * in certain fragments of a template. For example, you can exclude an entire
1135 * DOM sub-tree by using the `ngPreserveWhitespaces` attribute:
1136 *
1137 * ```html
1138 * <div ngPreserveWhitespaces>
1139 * whitespaces are preserved here
1140 * <span> and here </span>
1141 * </div>
1142 * ```
1143 *
1144 * You can force a single space to be preserved in a text node by using `&ngsp;`,
1145 * which is replaced with a space character by Angular's template
1146 * compiler:
1147 *
1148 * ```html
1149 * <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>
1150 * <!-- compiled to be equivalent to:
1151 * <a>Spaces</a> <a>between</a> <a>links.</a> -->
1152 * ```
1153 *
1154 * Note that sequences of `&ngsp;` are still collapsed to just one space character when
1155 * the `preserveWhitespaces` option is set to `false`.
1156 *
1157 * ```html
1158 * <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>
1159 * <!-- compiled to be equivalent to:
1160 * <a>before</a> <a>after</a> -->
1161 * ```
1162 *
1163 * To preserve sequences of whitespace characters, use the
1164 * `ngPreserveWhitespaces` attribute.
1165 *
1166 * @Annotation
1167 */
1168 (obj: Component): TypeDecorator;
1169 /**
1170 * See the `Component` decorator.
1171 */
1172 new (obj: Component): Component;
1173}
1174
1175declare interface ComponentDefFeature {
1176 <T>(componentDef: ɵComponentDef<T>): void;
1177 /**
1178 * Marks a feature as something that {@link InheritDefinitionFeature} will execute
1179 * during inheritance.
1180 *
1181 * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers
1182 * identifying the change as a side effect, and the feature will be included in
1183 * every bundle.
1184 */
1185 ngInherit?: true;
1186}
1187
1188/**
1189 * Base class for a factory that can create a component dynamically.
1190 * Instantiate a factory for a given type of component with `resolveComponentFactory()`.
1191 * Use the resulting `ComponentFactory.create()` method to create a component of that type.
1192 *
1193 * @see [Dynamic Components](guide/dynamic-component-loader)
1194 *
1195 * @publicApi
1196 */
1197declare abstract class ComponentFactory<C> {
1198 /**
1199 * The component's HTML selector.
1200 */
1201 abstract get selector(): string;
1202 /**
1203 * The type of component the factory will create.
1204 */
1205 abstract get componentType(): Type<any>;
1206 /**
1207 * Selector for all <ng-content> elements in the component.
1208 */
1209 abstract get ngContentSelectors(): string[];
1210 /**
1211 * The inputs of the component.
1212 */
1213 abstract get inputs(): {
1214 propName: string;
1215 templateName: string;
1216 }[];
1217 /**
1218 * The outputs of the component.
1219 */
1220 abstract get outputs(): {
1221 propName: string;
1222 templateName: string;
1223 }[];
1224 /**
1225 * Creates a new component.
1226 */
1227 abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef<any>): ComponentRef<C>;
1228}
1229export { ComponentFactory }
1230export { ComponentFactory as ɵComponentFactory }
1231
1232/**
1233 * A simple registry that maps `Components` to generated `ComponentFactory` classes
1234 * that can be used to create instances of components.
1235 * Use to obtain the factory for a given component type,
1236 * then use the factory's `create()` method to create a component of that type.
1237 *
1238 * @see [Dynamic Components](guide/dynamic-component-loader)
1239 * @see [Usage Example](guide/dynamic-component-loader#resolving-components)
1240 * @see <live-example name="dynamic-component-loader" noDownload></live-example>
1241 of the code in this cookbook
1242 * @publicApi
1243 */
1244export declare abstract class ComponentFactoryResolver {
1245 static NULL: ComponentFactoryResolver;
1246 /**
1247 * Retrieves the factory object that creates a component of the given type.
1248 * @param component The component type.
1249 */
1250 abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
1251}
1252
1253declare class ComponentFactoryResolver_2 extends ComponentFactoryResolver {
1254 private ngModule?;
1255 /**
1256 * @param ngModule The NgModuleRef to which all resolved factories are bound.
1257 */
1258 constructor(ngModule?: NgModuleRef<any> | undefined);
1259 resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
1260}
1261
1262declare type ComponentInstance = {};
1263
1264/**
1265 * Represents a component created by a `ComponentFactory`.
1266 * Provides access to the component instance and related objects,
1267 * and provides the means of destroying the instance.
1268 *
1269 * @publicApi
1270 */
1271export declare abstract class ComponentRef<C> {
1272 /**
1273 * The host or anchor [element](guide/glossary#element) for this component instance.
1274 */
1275 abstract get location(): ElementRef;
1276 /**
1277 * The [dependency injector](guide/glossary#injector) for this component instance.
1278 */
1279 abstract get injector(): Injector;
1280 /**
1281 * This component instance.
1282 */
1283 abstract get instance(): C;
1284 /**
1285 * The [host view](guide/glossary#view-tree) defined by the template
1286 * for this component instance.
1287 */
1288 abstract get hostView(): ViewRef;
1289 /**
1290 * The change detector for this component instance.
1291 */
1292 abstract get changeDetectorRef(): ChangeDetectorRef;
1293 /**
1294 * The type of this component (as created by a `ComponentFactory` class).
1295 */
1296 abstract get componentType(): Type<any>;
1297 /**
1298 * Destroys the component instance and all of the data structures associated with it.
1299 */
1300 abstract destroy(): void;
1301 /**
1302 * A lifecycle hook that provides additional developer-defined cleanup
1303 * functionality for the component.
1304 * @param callback A handler function that cleans up developer-defined data
1305 * associated with this component. Called when the `destroy()` method is invoked.
1306 */
1307 abstract onDestroy(callback: Function): void;
1308}
1309
1310/**
1311 * Definition of what a template rendering function should look like for a component.
1312 */
1313declare type ComponentTemplate<T> = {
1314 <U extends T>(rf: ɵRenderFlags, ctx: T | U): void;
1315};
1316
1317/**
1318 * Configures the `Injector` to return an instance of a token.
1319 *
1320 * @see ["Dependency Injection Guide"](guide/dependency-injection).
1321 *
1322 * @usageNotes
1323 *
1324 * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
1325 *
1326 * ### Multi-value example
1327 *
1328 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
1329 *
1330 * @publicApi
1331 */
1332export declare interface ConstructorProvider extends ConstructorSansProvider {
1333 /**
1334 * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
1335 */
1336 provide: Type<any>;
1337 /**
1338 * When true, injector returns an array of instances. This is useful to allow multiple
1339 * providers spread across many files to provide configuration information to a common token.
1340 */
1341 multi?: boolean;
1342}
1343
1344/**
1345 * Configures the `Injector` to return an instance of a token.
1346 *
1347 * @see ["Dependency Injection Guide"](guide/dependency-injection).
1348 *
1349 * @usageNotes
1350 *
1351 * ```ts
1352 * @Injectable(SomeModule, {deps: []})
1353 * class MyService {}
1354 * ```
1355 *
1356 * @publicApi
1357 */
1358export declare interface ConstructorSansProvider {
1359 /**
1360 * A list of `token`s to be resolved by the injector.
1361 */
1362 deps?: any[];
1363}
1364
1365/**
1366 * Type of the ContentChild metadata.
1367 *
1368 * @publicApi
1369 */
1370export declare type ContentChild = Query;
1371
1372/**
1373 * ContentChild decorator and metadata.
1374 *
1375 *
1376 * @Annotation
1377 *
1378 * @publicApi
1379 */
1380export declare const ContentChild: ContentChildDecorator;
1381
1382/**
1383 * Type of the ContentChild decorator / constructor function.
1384 *
1385 * @publicApi
1386 */
1387export declare interface ContentChildDecorator {
1388 /**
1389 * @description
1390 * Property decorator that configures a content query.
1391 *
1392 * Use to get the first element or the directive matching the selector from the content DOM.
1393 * If the content DOM changes, and a new child matches the selector,
1394 * the property will be updated.
1395 *
1396 * Content queries are set before the `ngAfterContentInit` callback is called.
1397 *
1398 * Does not retrieve elements or directives that are in other components' templates,
1399 * since a component's template is always a black box to its ancestors.
1400 *
1401 * **Metadata Properties**:
1402 *
1403 * * **selector** - The directive type or the name used for querying.
1404 * * **read** - Used to read a different token from the queried element.
1405 * * **static** - True to resolve query results before change detection runs,
1406 * false to resolve after change detection. Defaults to false.
1407 *
1408 * The following selectors are supported.
1409 * * Any class with the `@Component` or `@Directive` decorator
1410 * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
1411 * with `@ContentChild('cmp')`)
1412 * * Any provider defined in the child component tree of the current component (e.g.
1413 * `@ContentChild(SomeService) someService: SomeService`)
1414 * * Any provider defined through a string token (e.g. `@ContentChild('someToken') someTokenVal:
1415 * any`)
1416 * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ContentChild(TemplateRef)
1417 * template;`)
1418 *
1419 * The following values are supported by `read`:
1420 * * Any class with the `@Component` or `@Directive` decorator
1421 * * Any provider defined on the injector of the component that is matched by the `selector` of
1422 * this query
1423 * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
1424 * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
1425 *
1426 * @usageNotes
1427 *
1428 * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'}
1429 *
1430 * ### Example
1431 *
1432 * {@example core/di/ts/contentChild/content_child_example.ts region='Component'}
1433 *
1434 * @Annotation
1435 */
1436 (selector: ProviderToken<unknown> | Function | string, opts?: {
1437 read?: any;
1438 static?: boolean;
1439 }): any;
1440 new (selector: ProviderToken<unknown> | Function | string, opts?: {
1441 read?: any;
1442 static?: boolean;
1443 }): ContentChild;
1444}
1445
1446/**
1447 * Type of the ContentChildren metadata.
1448 *
1449 *
1450 * @Annotation
1451 * @publicApi
1452 */
1453export declare type ContentChildren = Query;
1454
1455/**
1456 * ContentChildren decorator and metadata.
1457 *
1458 *
1459 * @Annotation
1460 * @publicApi
1461 */
1462export declare const ContentChildren: ContentChildrenDecorator;
1463
1464/**
1465 * Type of the ContentChildren decorator / constructor function.
1466 *
1467 * @see `ContentChildren`.
1468 * @publicApi
1469 */
1470export declare interface ContentChildrenDecorator {
1471 /**
1472 * @description
1473 * Property decorator that configures a content query.
1474 *
1475 * Use to get the `QueryList` of elements or directives from the content DOM.
1476 * Any time a child element is added, removed, or moved, the query list will be
1477 * updated, and the changes observable of the query list will emit a new value.
1478 *
1479 * Content queries are set before the `ngAfterContentInit` callback is called.
1480 *
1481 * Does not retrieve elements or directives that are in other components' templates,
1482 * since a component's template is always a black box to its ancestors.
1483 *
1484 * **Metadata Properties**:
1485 *
1486 * * **selector** - The directive type or the name used for querying.
1487 * * **descendants** - If `true` include all descendants of the element. If `false` then only
1488 * query direct children of the element.
1489 * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only
1490 * if the QueryList result has changed. When `false` the `changes` observable might emit even
1491 * if the QueryList has not changed.
1492 * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and
1493 * removed in future versions of Angular.
1494 * * **read** - Used to read a different token from the queried elements.
1495 *
1496 * The following selectors are supported.
1497 * * Any class with the `@Component` or `@Directive` decorator
1498 * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
1499 * with `@ContentChildren('cmp')`)
1500 * * Any provider defined in the child component tree of the current component (e.g.
1501 * `@ContentChildren(SomeService) someService: SomeService`)
1502 * * Any provider defined through a string token (e.g. `@ContentChildren('someToken')
1503 * someTokenVal: any`)
1504 * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with
1505 * `@ContentChildren(TemplateRef) template;`)
1506 *
1507 * In addition, multiple string selectors can be separated with a comma (e.g.
1508 * `@ContentChildren('cmp1,cmp2')`)
1509 *
1510 * The following values are supported by `read`:
1511 * * Any class with the `@Component` or `@Directive` decorator
1512 * * Any provider defined on the injector of the component that is matched by the `selector` of
1513 * this query
1514 * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
1515 * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
1516 *
1517 * @usageNotes
1518 *
1519 * Here is a simple demonstration of how the `ContentChildren` decorator can be used.
1520 *
1521 * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'}
1522 *
1523 * ### Tab-pane example
1524 *
1525 * Here is a slightly more realistic example that shows how `ContentChildren` decorators
1526 * can be used to implement a tab pane component.
1527 *
1528 * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'}
1529 *
1530 * @Annotation
1531 */
1532 (selector: ProviderToken<unknown> | Function | string, opts?: {
1533 descendants?: boolean;
1534 emitDistinctChangesOnly?: boolean;
1535 read?: any;
1536 }): any;
1537 new (selector: ProviderToken<unknown> | Function | string, opts?: {
1538 descendants?: boolean;
1539 emitDistinctChangesOnly?: boolean;
1540 read?: any;
1541 }): Query;
1542}
1543
1544/**
1545 * Definition of what a content queries function should look like.
1546 */
1547declare type ContentQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U, directiveIndex: number) => void;
1548
1549declare const CONTEXT = 8;
1550
1551/** Options that control how the component should be bootstrapped. */
1552declare interface CreateComponentOptions {
1553 /** Which renderer factory to use. */
1554 rendererFactory?: RendererFactory3;
1555 /** A custom sanitizer instance */
1556 sanitizer?: Sanitizer;
1557 /** A custom animation player handler */
1558 playerHandler?: ɵPlayerHandler;
1559 /**
1560 * Host element on which the component will be bootstrapped. If not specified,
1561 * the component definition's `tag` is used to query the existing DOM for the
1562 * element to bootstrap.
1563 */
1564 host?: RElement | string;
1565 /** Module injector for the component. If unspecified, the injector will be NULL_INJECTOR. */
1566 injector?: Injector;
1567 /**
1568 * List of features to be applied to the created component. Features are simply
1569 * functions that decorate a component with a certain behavior.
1570 *
1571 * Typically, the features in this list are features that cannot be added to the
1572 * other features list in the component definition because they rely on other factors.
1573 *
1574 * Example: `LifecycleHooksFeature` is a function that adds lifecycle hook capabilities
1575 * to root components in a tree-shakable way. It cannot be added to the component
1576 * features list because there's no way of knowing when the component will be used as
1577 * a root component.
1578 */
1579 hostFeatures?: HostFeature[];
1580 /**
1581 * A function which is used to schedule change detection work in the future.
1582 *
1583 * When marking components as dirty, it is necessary to schedule the work of
1584 * change detection in the future. This is done to coalesce multiple
1585 * {@link markDirty} calls into a single changed detection processing.
1586 *
1587 * The default value of the scheduler is the `requestAnimationFrame` function.
1588 *
1589 * It is also useful to override this function for testing purposes.
1590 */
1591 scheduler?: (work: () => void) => void;
1592}
1593
1594/**
1595 * Returns a new NgModuleRef instance based on the NgModule class and parent injector provided.
1596 * @param ngModule NgModule class.
1597 * @param parentInjector Optional injector instance to use as a parent for the module injector. If
1598 * not provided, `NullInjector` will be used instead.
1599 * @publicApi
1600 */
1601export declare const createNgModuleRef: <T>(ngModule: Type<T>, parentInjector?: Injector) => NgModuleRef<T>;
1602
1603/**
1604 * Creates a platform.
1605 * Platforms must be created on launch using this function.
1606 *
1607 * @publicApi
1608 */
1609export declare function createPlatform(injector: Injector): PlatformRef;
1610
1611/**
1612 * Creates a factory for a platform. Can be used to provide or override `Providers` specific to
1613 * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.
1614 * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories
1615 * to build up configurations that might be required by different libraries or parts of the
1616 * application.
1617 * @param name Identifies the new platform factory.
1618 * @param providers A set of dependency providers for platforms created with the new factory.
1619 *
1620 * @publicApi
1621 */
1622export declare function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef;
1623
1624
1625/**
1626 * Expresses a single CSS Selector.
1627 *
1628 * Beginning of array
1629 * - First index: element name
1630 * - Subsequent odd indices: attr keys
1631 * - Subsequent even indices: attr values
1632 *
1633 * After SelectorFlags.CLASS flag
1634 * - Class name values
1635 *
1636 * SelectorFlags.NOT flag
1637 * - Changes the mode to NOT
1638 * - Can be combined with other flags to set the element / attr / class mode
1639 *
1640 * e.g. SelectorFlags.NOT | SelectorFlags.ELEMENT
1641 *
1642 * Example:
1643 * Original: `div.foo.bar[attr1=val1][attr2]`
1644 * Parsed: ['div', 'attr1', 'val1', 'attr2', '', SelectorFlags.CLASS, 'foo', 'bar']
1645 *
1646 * Original: 'div[attr1]:not(.foo[attr2])
1647 * Parsed: [
1648 * 'div', 'attr1', '',
1649 * SelectorFlags.NOT | SelectorFlags.ATTRIBUTE 'attr2', '', SelectorFlags.CLASS, 'foo'
1650 * ]
1651 *
1652 * See more examples in node_selector_matcher_spec.ts
1653 */
1654declare type CssSelector = (string | SelectorFlags)[];
1655
1656/**
1657 * An object literal of this type is used to represent the metadata of a constructor dependency.
1658 * The type itself is never referred to from generated code.
1659 *
1660 * @publicApi
1661 */
1662declare type CtorDependency = {
1663 /**
1664 * If an `@Attribute` decorator is used, this represents the injected attribute's name. If the
1665 * attribute name is a dynamic expression instead of a string literal, this will be the unknown
1666 * type.
1667 */
1668 attribute?: string | unknown;
1669 /**
1670 * If `@Optional()` is used, this key is set to true.
1671 */
1672 optional?: true;
1673 /**
1674 * If `@Host` is used, this key is set to true.
1675 */
1676 host?: true;
1677 /**
1678 * If `@Self` is used, this key is set to true.
1679 */
1680 self?: true;
1681 /**
1682 * If `@SkipSelf` is used, this key is set to true.
1683 */
1684 skipSelf?: true;
1685} | null;
1686
1687/**
1688 * Defines a schema that allows an NgModule to contain the following:
1689 * - Non-Angular elements named with dash case (`-`).
1690 * - Element properties named with dash case (`-`).
1691 * Dash case is the naming convention for custom elements.
1692 *
1693 * @publicApi
1694 */
1695export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
1696
1697/**
1698 * @publicApi
1699 *
1700 * @see [Component testing scenarios](guide/testing-components-scenarios)
1701 * @see [Basics of testing components](guide/testing-components-basics)
1702 * @see [Testing utility APIs](guide/testing-utility-apis)
1703 */
1704export declare interface DebugElement extends DebugNode {
1705 /**
1706 * The element tag name, if it is an element.
1707 */
1708 readonly name: string;
1709 /**
1710 * A map of property names to property values for an element.
1711 *
1712 * This map includes:
1713 * - Regular property bindings (e.g. `[id]="id"`)
1714 * - Host property bindings (e.g. `host: { '[id]': "id" }`)
1715 * - Interpolated property bindings (e.g. `id="{{ value }}")
1716 *
1717 * It does not include:
1718 * - input property bindings (e.g. `[myCustomInput]="value"`)
1719 * - attribute bindings (e.g. `[attr.role]="menu"`)
1720 */
1721 readonly properties: {
1722 [key: string]: any;
1723 };
1724 /**
1725 * A map of attribute names to attribute values for an element.
1726 */
1727 readonly attributes: {
1728 [key: string]: string | null;
1729 };
1730 /**
1731 * A map containing the class names on the element as keys.
1732 *
1733 * This map is derived from the `className` property of the DOM element.
1734 *
1735 * Note: The values of this object will always be `true`. The class key will not appear in the KV
1736 * object if it does not exist on the element.
1737 *
1738 * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)
1739 */
1740 readonly classes: {
1741 [key: string]: boolean;
1742 };
1743 /**
1744 * The inline styles of the DOM element.
1745 *
1746 * Will be `null` if there is no `style` property on the underlying DOM element.
1747 *
1748 * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)
1749 */
1750 readonly styles: {
1751 [key: string]: string | null;
1752 };
1753 /**
1754 * The `childNodes` of the DOM element as a `DebugNode` array.
1755 *
1756 * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
1757 */
1758 readonly childNodes: DebugNode[];
1759 /**
1760 * The underlying DOM element at the root of the component.
1761 */
1762 readonly nativeElement: any;
1763 /**
1764 * The immediate `DebugElement` children. Walk the tree by descending through `children`.
1765 */
1766 readonly children: DebugElement[];
1767 /**
1768 * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.
1769 */
1770 query(predicate: Predicate<DebugElement>): DebugElement;
1771 /**
1772 * @returns All `DebugElement` matches for the predicate at any depth in the subtree.
1773 */
1774 queryAll(predicate: Predicate<DebugElement>): DebugElement[];
1775 /**
1776 * @returns All `DebugNode` matches for the predicate at any depth in the subtree.
1777 */
1778 queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
1779 /**
1780 * Triggers the event by its name if there is a corresponding listener in the element's
1781 * `listeners` collection.
1782 *
1783 * If the event lacks a listener or there's some other problem, consider
1784 * calling `nativeElement.dispatchEvent(eventObject)`.
1785 *
1786 * @param eventName The name of the event to trigger
1787 * @param eventObj The _event object_ expected by the handler
1788 *
1789 * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)
1790 */
1791 triggerEventHandler(eventName: string, eventObj: any): void;
1792}
1793
1794/**
1795 * @publicApi
1796 */
1797export declare const DebugElement: {
1798 new (...args: any[]): DebugElement;
1799};
1800
1801declare class DebugElement__POST_R3__ extends DebugNode__POST_R3__ implements DebugElement {
1802 constructor(nativeNode: Element);
1803 get nativeElement(): Element | null;
1804 get name(): string;
1805 /**
1806 * Gets a map of property names to property values for an element.
1807 *
1808 * This map includes:
1809 * - Regular property bindings (e.g. `[id]="id"`)
1810 * - Host property bindings (e.g. `host: { '[id]': "id" }`)
1811 * - Interpolated property bindings (e.g. `id="{{ value }}")
1812 *
1813 * It does not include:
1814 * - input property bindings (e.g. `[myCustomInput]="value"`)
1815 * - attribute bindings (e.g. `[attr.role]="menu"`)
1816 */
1817 get properties(): {
1818 [key: string]: any;
1819 };
1820 get attributes(): {
1821 [key: string]: string | null;
1822 };
1823 get styles(): {
1824 [key: string]: string | null;
1825 };
1826 get classes(): {
1827 [key: string]: boolean;
1828 };
1829 get childNodes(): DebugNode[];
1830 get children(): DebugElement[];
1831 query(predicate: Predicate<DebugElement>): DebugElement;
1832 queryAll(predicate: Predicate<DebugElement>): DebugElement[];
1833 queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
1834 triggerEventHandler(eventName: string, eventObj: any): void;
1835}
1836
1837/**
1838 * @publicApi
1839 */
1840export declare class DebugEventListener {
1841 name: string;
1842 callback: Function;
1843 constructor(name: string, callback: Function);
1844}
1845
1846/**
1847 * @publicApi
1848 */
1849export declare interface DebugNode {
1850 /**
1851 * The callbacks attached to the component's @Output properties and/or the element's event
1852 * properties.
1853 */
1854 readonly listeners: DebugEventListener[];
1855 /**
1856 * The `DebugElement` parent. Will be `null` if this is the root element.
1857 */
1858 readonly parent: DebugElement | null;
1859 /**
1860 * The underlying DOM node.
1861 */
1862 readonly nativeNode: any;
1863 /**
1864 * The host dependency injector. For example, the root element's component instance injector.
1865 */
1866 readonly injector: Injector;
1867 /**
1868 * The element's own component instance, if it has one.
1869 */
1870 readonly componentInstance: any;
1871 /**
1872 * An object that provides parent context for this element. Often an ancestor component instance
1873 * that governs this element.
1874 *
1875 * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`
1876 * property is the value of the row instance value. For example, the `hero` in `*ngFor="let hero
1877 * of heroes"`.
1878 */
1879 readonly context: any;
1880 /**
1881 * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local
1882 * variable name.
1883 */
1884 readonly references: {
1885 [key: string]: any;
1886 };
1887 /**
1888 * This component's injector lookup tokens. Includes the component itself plus the tokens that the
1889 * component lists in its providers metadata.
1890 */
1891 readonly providerTokens: any[];
1892}
1893
1894/**
1895 * @publicApi
1896 */
1897export declare const DebugNode: {
1898 new (...args: any[]): DebugNode;
1899};
1900
1901/**
1902 * A logical node which comprise into `LView`s.
1903 *
1904 */
1905declare interface DebugNode_2 {
1906 /**
1907 * HTML representation of the node.
1908 */
1909 html: string | null;
1910 /**
1911 * Associated `TNode`
1912 */
1913 tNode: TNode;
1914 /**
1915 * Human readable node type.
1916 */
1917 type: string;
1918 /**
1919 * DOM native node.
1920 */
1921 native: Node;
1922 /**
1923 * Child nodes
1924 */
1925 children: DebugNode_2[];
1926 /**
1927 * A list of Component/Directive types which need to be instantiated an this location.
1928 */
1929 factories: Type<unknown>[];
1930 /**
1931 * A list of Component/Directive instances which were instantiated an this location.
1932 */
1933 instances: unknown[];
1934 /**
1935 * NodeInjector information.
1936 */
1937 injector: NodeInjectorDebug;
1938 /**
1939 * Injector resolution path.
1940 */
1941 injectorResolutionPath: any;
1942}
1943
1944declare class DebugNode__POST_R3__ implements DebugNode {
1945 readonly nativeNode: Node;
1946 constructor(nativeNode: Node);
1947 get parent(): DebugElement | null;
1948 get injector(): Injector;
1949 get componentInstance(): any;
1950 get context(): any;
1951 get listeners(): DebugEventListener[];
1952 get references(): {
1953 [key: string]: any;
1954 };
1955 get providerTokens(): any[];
1956}
1957
1958declare const DECLARATION_COMPONENT_VIEW = 16;
1959
1960declare const DECLARATION_LCONTAINER = 17;
1961
1962declare const DECLARATION_VIEW = 15;
1963
1964/**
1965 * Provide this token to set the default currency code your application uses for
1966 * CurrencyPipe when there is no currency code passed into it. This is only used by
1967 * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.
1968 *
1969 * See the [i18n guide](guide/i18n-common-locale-id) for more information.
1970 *
1971 * <div class="alert is-helpful">
1972 *
1973 * **Deprecation notice:**
1974 *
1975 * The default currency code is currently always `USD` but this is deprecated from v9.
1976 *
1977 * **In v10 the default currency code will be taken from the current locale.**
1978 *
1979 * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in
1980 * your application `NgModule`:
1981 *
1982 * ```ts
1983 * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}
1984 * ```
1985 *
1986 * </div>
1987 *
1988 * @usageNotes
1989 * ### Example
1990 *
1991 * ```typescript
1992 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
1993 * import { AppModule } from './app/app.module';
1994 *
1995 * platformBrowserDynamic().bootstrapModule(AppModule, {
1996 * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]
1997 * });
1998 * ```
1999 *
2000 * @publicApi
2001 */
2002export declare const DEFAULT_CURRENCY_CODE: InjectionToken<string>;
2003
2004/**
2005 * @deprecated v4.0.0 - Should not be part of public API.
2006 * @publicApi
2007 */
2008export declare class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {
2009 readonly length: number;
2010 readonly collection: V[] | Iterable<V> | null;
2011 private _linkedRecords;
2012 private _unlinkedRecords;
2013 private _previousItHead;
2014 private _itHead;
2015 private _itTail;
2016 private _additionsHead;
2017 private _additionsTail;
2018 private _movesHead;
2019 private _movesTail;
2020 private _removalsHead;
2021 private _removalsTail;
2022 private _identityChangesHead;
2023 private _identityChangesTail;
2024 private _trackByFn;
2025 constructor(trackByFn?: TrackByFunction<V>);
2026 forEachItem(fn: (record: IterableChangeRecord_<V>) => void): void;
2027 forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
2028 forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void): void;
2029 forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
2030 forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
2031 forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
2032 forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void): void;
2033 diff(collection: NgIterable<V> | null | undefined): DefaultIterableDiffer<V> | null;
2034 onDestroy(): void;
2035 check(collection: NgIterable<V>): boolean;
2036 get isDirty(): boolean;
2037 private _addToRemovals;
2038}
2039
2040/**
2041 * @deprecated in v8, delete after v10. This API should be used only by generated code, and that
2042 * code should now use ɵɵdefineInjectable instead.
2043 * @publicApi
2044 */
2045export declare const defineInjectable: typeof ɵɵdefineInjectable;
2046
2047declare interface Definition<DF extends DefinitionFactory<any>> {
2048 factory: DF | null;
2049}
2050
2051/**
2052 * Factory for ViewDefinitions/NgModuleDefinitions.
2053 * We use a function so we can reexeute it in case an error happens and use the given logger
2054 * function to log the error from the definition of the node, which is shown in all browser
2055 * logs.
2056 */
2057declare interface DefinitionFactory<D extends Definition<any>> {
2058 (logger: NodeLogger): D;
2059}
2060
2061declare interface DepDef {
2062 flags: ɵDepFlags;
2063 token: any;
2064 tokenKey: string;
2065}
2066
2067/**
2068 * Array of destroy hooks that should be executed for a view and their directive indices.
2069 *
2070 * The array is set up as a series of number/function or number/(number|function)[]:
2071 * - Even indices represent the context with which hooks should be called.
2072 * - Odd indices are the hook functions themselves. If a value at an odd index is an array,
2073 * it represents the destroy hooks of a `multi` provider where:
2074 * - Even indices represent the index of the provider for which we've registered a destroy hook,
2075 * inside of the `multi` provider array.
2076 * - Odd indices are the destroy hook functions.
2077 * For example:
2078 * LView: `[0, 1, 2, AService, 4, [BService, CService, DService]]`
2079 * destroyHooks: `[3, AService.ngOnDestroy, 5, [0, BService.ngOnDestroy, 2, DService.ngOnDestroy]]`
2080 *
2081 * In the example above `AService` is a type provider with an `ngOnDestroy`, whereas `BService`,
2082 * `CService` and `DService` are part of a `multi` provider where only `BService` and `DService`
2083 * have an `ngOnDestroy` hook.
2084 */
2085declare type DestroyHookData = (HookEntry | HookData)[];
2086
2087/**
2088 * Destroys the current Angular platform and all Angular applications on the page.
2089 * Destroys all modules and listeners registered with the platform.
2090 *
2091 * @publicApi
2092 */
2093export declare function destroyPlatform(): void;
2094
2095/**
2096 * Directive decorator and metadata.
2097 *
2098 * @Annotation
2099 * @publicApi
2100 */
2101export declare interface Directive {
2102 /**
2103 * The CSS selector that identifies this directive in a template
2104 * and triggers instantiation of the directive.
2105 *
2106 * Declare as one of the following:
2107 *
2108 * - `element-name`: Select by element name.
2109 * - `.class`: Select by class name.
2110 * - `[attribute]`: Select by attribute name.
2111 * - `[attribute=value]`: Select by attribute name and value.
2112 * - `:not(sub_selector)`: Select only if the element does not match the `sub_selector`.
2113 * - `selector1, selector2`: Select if either `selector1` or `selector2` matches.
2114 *
2115 * Angular only allows directives to apply on CSS selectors that do not cross
2116 * element boundaries.
2117 *
2118 * For the following template HTML, a directive with an `input[type=text]` selector,
2119 * would be instantiated only on the `<input type="text">` element.
2120 *
2121 * ```html
2122 * <form>
2123 * <input type="text">
2124 * <input type="radio">
2125 * <form>
2126 * ```
2127 *
2128 */
2129 selector?: string;
2130 /**
2131 * Enumerates the set of data-bound input properties for a directive
2132 *
2133 * Angular automatically updates input properties during change detection.
2134 * The `inputs` property defines a set of `directiveProperty` to `bindingProperty`
2135 * configuration:
2136 *
2137 * - `directiveProperty` specifies the component property where the value is written.
2138 * - `bindingProperty` specifies the DOM property where the value is read from.
2139 *
2140 * When `bindingProperty` is not provided, it is assumed to be equal to `directiveProperty`.
2141 *
2142 * @usageNotes
2143 *
2144 * The following example creates a component with two data-bound properties.
2145 *
2146 * ```typescript
2147 * @Component({
2148 * selector: 'bank-account',
2149 * inputs: ['bankName', 'id: account-id'],
2150 * template: `
2151 * Bank Name: {{bankName}}
2152 * Account Id: {{id}}
2153 * `
2154 * })
2155 * class BankAccount {
2156 * bankName: string;
2157 * id: string;
2158 * }
2159 * ```
2160 *
2161 */
2162 inputs?: string[];
2163 /**
2164 * Enumerates the set of event-bound output properties.
2165 *
2166 * When an output property emits an event, an event handler attached to that event
2167 * in the template is invoked.
2168 *
2169 * The `outputs` property defines a set of `directiveProperty` to `bindingProperty`
2170 * configuration:
2171 *
2172 * - `directiveProperty` specifies the component property that emits events.
2173 * - `bindingProperty` specifies the DOM property the event handler is attached to.
2174 *
2175 * @usageNotes
2176 *
2177 * ```typescript
2178 * @Component({
2179 * selector: 'child-dir',
2180 * outputs: [ 'bankNameChange' ]
2181 * template: `<input (input)="bankNameChange.emit($event.target.value)" />`
2182 * })
2183 * class ChildDir {
2184 * bankNameChange: EventEmitter<string> = new EventEmitter<string>();
2185 * }
2186 *
2187 * @Component({
2188 * selector: 'main',
2189 * template: `
2190 * {{ bankName }} <child-dir (bankNameChange)="onBankNameChange($event)"></child-dir>
2191 * `
2192 * })
2193 * class MainComponent {
2194 * bankName: string;
2195 *
2196 * onBankNameChange(bankName: string) {
2197 * this.bankName = bankName;
2198 * }
2199 * }
2200 * ```
2201 *
2202 */
2203 outputs?: string[];
2204 /**
2205 * Configures the [injector](guide/glossary#injector) of this
2206 * directive or component with a [token](guide/glossary#di-token)
2207 * that maps to a [provider](guide/glossary#provider) of a dependency.
2208 */
2209 providers?: Provider[];
2210 /**
2211 * Defines the name that can be used in the template to assign this directive to a variable.
2212 *
2213 * @usageNotes
2214 *
2215 * ```ts
2216 * @Directive({
2217 * selector: 'child-dir',
2218 * exportAs: 'child'
2219 * })
2220 * class ChildDir {
2221 * }
2222 *
2223 * @Component({
2224 * selector: 'main',
2225 * template: `<child-dir #c="child"></child-dir>`
2226 * })
2227 * class MainComponent {
2228 * }
2229 * ```
2230 *
2231 */
2232 exportAs?: string;
2233 /**
2234 * Configures the queries that will be injected into the directive.
2235 *
2236 * Content queries are set before the `ngAfterContentInit` callback is called.
2237 * View queries are set before the `ngAfterViewInit` callback is called.
2238 *
2239 * @usageNotes
2240 *
2241 * The following example shows how queries are defined
2242 * and when their results are available in lifecycle hooks:
2243 *
2244 * ```ts
2245 * @Component({
2246 * selector: 'someDir',
2247 * queries: {
2248 * contentChildren: new ContentChildren(ChildDirective),
2249 * viewChildren: new ViewChildren(ChildDirective)
2250 * },
2251 * template: '<child-directive></child-directive>'
2252 * })
2253 * class SomeDir {
2254 * contentChildren: QueryList<ChildDirective>,
2255 * viewChildren: QueryList<ChildDirective>
2256 *
2257 * ngAfterContentInit() {
2258 * // contentChildren is set
2259 * }
2260 *
2261 * ngAfterViewInit() {
2262 * // viewChildren is set
2263 * }
2264 * }
2265 * ```
2266 *
2267 * @Annotation
2268 */
2269 queries?: {
2270 [key: string]: any;
2271 };
2272 /**
2273 * Maps class properties to host element bindings for properties,
2274 * attributes, and events, using a set of key-value pairs.
2275 *
2276 * Angular automatically checks host property bindings during change detection.
2277 * If a binding changes, Angular updates the directive's host element.
2278 *
2279 * When the key is a property of the host element, the property value is
2280 * the propagated to the specified DOM property.
2281 *
2282 * When the key is a static attribute in the DOM, the attribute value
2283 * is propagated to the specified property in the host element.
2284 *
2285 * For event handling:
2286 * - The key is the DOM event that the directive listens to.
2287 * To listen to global events, add the target to the event name.
2288 * The target can be `window`, `document` or `body`.
2289 * - The value is the statement to execute when the event occurs. If the
2290 * statement evaluates to `false`, then `preventDefault` is applied on the DOM
2291 * event. A handler method can refer to the `$event` local variable.
2292 *
2293 */
2294 host?: {
2295 [key: string]: string;
2296 };
2297 /**
2298 * When present, this directive/component is ignored by the AOT compiler.
2299 * It remains in distributed code, and the JIT compiler attempts to compile it
2300 * at run time, in the browser.
2301 * To ensure the correct behavior, the app must import `@angular/compiler`.
2302 */
2303 jit?: true;
2304}
2305
2306/**
2307 * Type of the Directive metadata.
2308 *
2309 * @publicApi
2310 */
2311export declare const Directive: DirectiveDecorator;
2312
2313/**
2314 * Type of the Directive decorator / constructor function.
2315 * @publicApi
2316 */
2317export declare interface DirectiveDecorator {
2318 /**
2319 * Decorator that marks a class as an Angular directive.
2320 * You can define your own directives to attach custom behavior to elements in the DOM.
2321 *
2322 * The options provide configuration metadata that determines
2323 * how the directive should be processed, instantiated and used at
2324 * runtime.
2325 *
2326 * Directive classes, like component classes, can implement
2327 * [life-cycle hooks](guide/lifecycle-hooks) to influence their configuration and behavior.
2328 *
2329 *
2330 * @usageNotes
2331 * To define a directive, mark the class with the decorator and provide metadata.
2332 *
2333 * ```ts
2334 * import {Directive} from '@angular/core';
2335 *
2336 * @Directive({
2337 * selector: 'my-directive',
2338 * })
2339 * export class MyDirective {
2340 * ...
2341 * }
2342 * ```
2343 *
2344 * ### Declaring directives
2345 *
2346 * Directives are [declarables](guide/glossary#declarable).
2347 * They must be declared by an NgModule
2348 * in order to be usable in an app.
2349 *
2350 * A directive must belong to exactly one NgModule. Do not re-declare
2351 * a directive imported from another module.
2352 * List the directive class in the `declarations` field of an NgModule.
2353 *
2354 * ```ts
2355 * declarations: [
2356 * AppComponent,
2357 * MyDirective
2358 * ],
2359 * ```
2360 *
2361 * @Annotation
2362 */
2363 (obj?: Directive): TypeDecorator;
2364 /**
2365 * See the `Directive` decorator.
2366 */
2367 new (obj?: Directive): Directive;
2368}
2369
2370declare interface DirectiveDefFeature {
2371 <T>(directiveDef: ɵDirectiveDef<T>): void;
2372 /**
2373 * Marks a feature as something that {@link InheritDefinitionFeature} will execute
2374 * during inheritance.
2375 *
2376 * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers
2377 * identifying the change as a side effect, and the feature will be included in
2378 * every bundle.
2379 */
2380 ngInherit?: true;
2381}
2382
2383declare type DirectiveDefList = (ɵDirectiveDef<any> | ɵComponentDef<any>)[];
2384
2385/**
2386 * Type used for directiveDefs on component definition.
2387 *
2388 * The function is necessary to be able to support forward declarations.
2389 */
2390declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDefList;
2391
2392declare type DirectiveInstance = {};
2393
2394declare type DirectiveTypeList = (ɵDirectiveType<any> | ɵComponentType<any> | Type<any>)[];
2395
2396declare type DirectiveTypesOrFactory = (() => DirectiveTypeList) | DirectiveTypeList;
2397
2398declare interface DisposableFn {
2399 (): void;
2400}
2401
2402/**
2403 * @description
2404 * Hook for manual bootstrapping of the application instead of using `bootstrap` array in @NgModule
2405 * annotation. This hook is invoked only when the `bootstrap` array is empty or not provided.
2406 *
2407 * Reference to the current application is provided as a parameter.
2408 *
2409 * See ["Bootstrapping"](guide/bootstrapping) and ["Entry components"](guide/entry-components).
2410 *
2411 * @usageNotes
2412 * The example below uses `ApplicationRef.bootstrap()` to render the
2413 * `AppComponent` on the page.
2414 *
2415 * ```typescript
2416 * class AppModule implements DoBootstrap {
2417 * ngDoBootstrap(appRef: ApplicationRef) {
2418 * appRef.bootstrap(AppComponent); // Or some other component
2419 * }
2420 * }
2421 * ```
2422 *
2423 * @publicApi
2424 */
2425export declare interface DoBootstrap {
2426 ngDoBootstrap(appRef: ApplicationRef): void;
2427}
2428
2429/**
2430 * A lifecycle hook that invokes a custom change-detection function for a directive,
2431 * in addition to the check performed by the default change-detector.
2432 *
2433 * The default change-detection algorithm looks for differences by comparing
2434 * bound-property values by reference across change detection runs. You can use this
2435 * hook to check for and respond to changes by some other means.
2436 *
2437 * When the default change detector detects changes, it invokes `ngOnChanges()` if supplied,
2438 * regardless of whether you perform additional change detection.
2439 * Typically, you should not use both `DoCheck` and `OnChanges` to respond to
2440 * changes on the same input.
2441 *
2442 * @see `OnChanges`
2443 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
2444 *
2445 * @usageNotes
2446 * The following snippet shows how a component can implement this interface
2447 * to invoke it own change-detection cycle.
2448 *
2449 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'}
2450 *
2451 * For a more complete example and discussion, see
2452 * [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection).
2453 *
2454 * @publicApi
2455 */
2456export declare interface DoCheck {
2457 /**
2458 * A callback method that performs change-detection, invoked
2459 * after the default change-detector runs.
2460 * See `KeyValueDiffers` and `IterableDiffers` for implementing
2461 * custom change checking for collections.
2462 *
2463 */
2464 ngDoCheck(): void;
2465}
2466
2467/**
2468 * Marks that the next string is an element name.
2469 *
2470 * See `I18nMutateOpCodes` documentation.
2471 */
2472declare const ELEMENT_MARKER: ELEMENT_MARKER;
2473
2474declare interface ELEMENT_MARKER {
2475 marker: 'element';
2476}
2477
2478declare interface ElementDef {
2479 name: string | null;
2480 ns: string | null;
2481 /** ns, name, value */
2482 attrs: [string, string, string][] | null;
2483 template: ɵViewDefinition | null;
2484 componentProvider: NodeDef | null;
2485 componentRendererType: RendererType2 | null;
2486 componentView: ViewDefinitionFactory | null;
2487 /**
2488 * visible public providers for DI in the view,
2489 * as see from this element. This does not include private providers.
2490 */
2491 publicProviders: {
2492 [tokenKey: string]: NodeDef;
2493 } | null;
2494 /**
2495 * same as visiblePublicProviders, but also includes private providers
2496 * that are located on this element.
2497 */
2498 allProviders: {
2499 [tokenKey: string]: NodeDef;
2500 } | null;
2501 handleEvent: ElementHandleEventFn | null;
2502}
2503
2504declare interface ElementHandleEventFn {
2505 (view: ViewData, eventName: string, event: any): boolean;
2506}
2507
2508/**
2509 * A wrapper around a native element inside of a View.
2510 *
2511 * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM
2512 * element.
2513 *
2514 * @security Permitting direct access to the DOM can make your application more vulnerable to
2515 * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the
2516 * [Security Guide](https://g.co/ng/security).
2517 *
2518 * @publicApi
2519 */
2520export declare class ElementRef<T = any> {
2521 /**
2522 * The underlying native element or `null` if direct access to native elements is not supported
2523 * (e.g. when the application runs in a web worker).
2524 *
2525 * <div class="callout is-critical">
2526 * <header>Use with caution</header>
2527 * <p>
2528 * Use this API as the last resort when direct access to DOM is needed. Use templating and
2529 * data-binding provided by Angular instead. Alternatively you can take a look at {@link
2530 * Renderer2}
2531 * which provides API that can safely be used even when direct access to native elements is not
2532 * supported.
2533 * </p>
2534 * <p>
2535 * Relying on direct DOM access creates tight coupling between your application and rendering
2536 * layers which will make it impossible to separate the two and deploy your application into a
2537 * web worker.
2538 * </p>
2539 * </div>
2540 *
2541 */
2542 nativeElement: T;
2543 constructor(nativeElement: T);
2544}
2545
2546/**
2547 * Represents an Angular [view](guide/glossary#view) in a view container.
2548 * An [embedded view](guide/glossary#view-tree) can be referenced from a component
2549 * other than the hosting component whose template defines it, or it can be defined
2550 * independently by a `TemplateRef`.
2551 *
2552 * Properties of elements in a view can change, but the structure (number and order) of elements in
2553 * a view cannot. Change the structure of elements by inserting, moving, or
2554 * removing nested views in a view container.
2555 *
2556 * @see `ViewContainerRef`
2557 *
2558 * @usageNotes
2559 *
2560 * The following template breaks down into two separate `TemplateRef` instances,
2561 * an outer one and an inner one.
2562 *
2563 * ```
2564 * Count: {{items.length}}
2565 * <ul>
2566 * <li *ngFor="let item of items">{{item}}</li>
2567 * </ul>
2568 * ```
2569 *
2570 * This is the outer `TemplateRef`:
2571 *
2572 * ```
2573 * Count: {{items.length}}
2574 * <ul>
2575 * <ng-template ngFor let-item [ngForOf]="items"></ng-template>
2576 * </ul>
2577 * ```
2578 *
2579 * This is the inner `TemplateRef`:
2580 *
2581 * ```
2582 * <li>{{item}}</li>
2583 * ```
2584 *
2585 * The outer and inner `TemplateRef` instances are assembled into views as follows:
2586 *
2587 * ```
2588 * <!-- ViewRef: outer-0 -->
2589 * Count: 2
2590 * <ul>
2591 * <ng-template view-container-ref></ng-template>
2592 * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->
2593 * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->
2594 * </ul>
2595 * <!-- /ViewRef: outer-0 -->
2596 * ```
2597 * @publicApi
2598 */
2599export declare abstract class EmbeddedViewRef<C> extends ViewRef {
2600 /**
2601 * The context for this view, inherited from the anchor element.
2602 */
2603 abstract context: C;
2604 /**
2605 * The root nodes for this embedded view.
2606 */
2607 abstract get rootNodes(): any[];
2608}
2609
2610/**
2611 * Disable Angular's development mode, which turns off assertions and other
2612 * checks within the framework.
2613 *
2614 * One important assertion this disables verifies that a change detection pass
2615 * does not result in additional changes to any bindings (also known as
2616 * unidirectional data flow).
2617 *
2618 * @publicApi
2619 */
2620export declare function enableProdMode(): void;
2621
2622
2623/**
2624 * Provides a hook for centralized exception handling.
2625 *
2626 * The default implementation of `ErrorHandler` prints error messages to the `console`. To
2627 * intercept error handling, write a custom exception handler that replaces this default as
2628 * appropriate for your app.
2629 *
2630 * @usageNotes
2631 * ### Example
2632 *
2633 * ```
2634 * class MyErrorHandler implements ErrorHandler {
2635 * handleError(error) {
2636 * // do something with the exception
2637 * }
2638 * }
2639 *
2640 * @NgModule({
2641 * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]
2642 * })
2643 * class MyModule {}
2644 * ```
2645 *
2646 * @publicApi
2647 */
2648export declare class ErrorHandler {
2649 handleError(error: any): void;
2650}
2651
2652/**
2653 * Use in components with the `@Output` directive to emit custom events
2654 * synchronously or asynchronously, and register handlers for those events
2655 * by subscribing to an instance.
2656 *
2657 * @usageNotes
2658 *
2659 * Extends
2660 * [RxJS `Subject`](https://rxjs.dev/api/index/class/Subject)
2661 * for Angular by adding the `emit()` method.
2662 *
2663 * In the following example, a component defines two output properties
2664 * that create event emitters. When the title is clicked, the emitter
2665 * emits an open or close event to toggle the current visibility state.
2666 *
2667 * ```html
2668 * @Component({
2669 * selector: 'zippy',
2670 * template: `
2671 * <div class="zippy">
2672 * <div (click)="toggle()">Toggle</div>
2673 * <div [hidden]="!visible">
2674 * <ng-content></ng-content>
2675 * </div>
2676 * </div>`})
2677 * export class Zippy {
2678 * visible: boolean = true;
2679 * @Output() open: EventEmitter<any> = new EventEmitter();
2680 * @Output() close: EventEmitter<any> = new EventEmitter();
2681 *
2682 * toggle() {
2683 * this.visible = !this.visible;
2684 * if (this.visible) {
2685 * this.open.emit(null);
2686 * } else {
2687 * this.close.emit(null);
2688 * }
2689 * }
2690 * }
2691 * ```
2692 *
2693 * Access the event object with the `$event` argument passed to the output event
2694 * handler:
2695 *
2696 * ```html
2697 * <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
2698 * ```
2699 *
2700 * @see [Observables in Angular](guide/observables-in-angular)
2701 * @publicApi
2702 */
2703export declare interface EventEmitter<T> extends Subject<T> {
2704 /**
2705 * Creates an instance of this class that can
2706 * deliver events synchronously or asynchronously.
2707 *
2708 * @param [isAsync=false] When true, deliver events asynchronously.
2709 *
2710 */
2711 new (isAsync?: boolean): EventEmitter<T>;
2712 /**
2713 * Emits an event containing a given value.
2714 * @param value The value to emit.
2715 */
2716 emit(value?: T): void;
2717 /**
2718 * Registers handlers for events emitted by this instance.
2719 * @param next When supplied, a custom handler for emitted events.
2720 * @param error When supplied, a custom handler for an error notification from this emitter.
2721 * @param complete When supplied, a custom handler for a completion notification from this
2722 * emitter.
2723 */
2724 subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Subscription;
2725 /**
2726 * Registers handlers for events emitted by this instance.
2727 * @param observerOrNext When supplied, a custom handler for emitted events, or an observer
2728 * object.
2729 * @param error When supplied, a custom handler for an error notification from this emitter.
2730 * @param complete When supplied, a custom handler for a completion notification from this
2731 * emitter.
2732 */
2733 subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription;
2734}
2735
2736/**
2737 * @publicApi
2738 */
2739export declare const EventEmitter: {
2740 new (isAsync?: boolean): EventEmitter<any>;
2741 new <T>(isAsync?: boolean): EventEmitter<T>;
2742 readonly prototype: EventEmitter<any>;
2743};
2744
2745/**
2746 * Configures the `Injector` to return a value of another `useExisting` token.
2747 *
2748 * @see ["Dependency Injection Guide"](guide/dependency-injection).
2749 *
2750 * @usageNotes
2751 *
2752 * {@example core/di/ts/provider_spec.ts region='ExistingProvider'}
2753 *
2754 * ### Multi-value example
2755 *
2756 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
2757 *
2758 * @publicApi
2759 */
2760export declare interface ExistingProvider extends ExistingSansProvider {
2761 /**
2762 * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
2763 */
2764 provide: any;
2765 /**
2766 * When true, injector returns an array of instances. This is useful to allow multiple
2767 * providers spread across many files to provide configuration information to a common token.
2768 */
2769 multi?: boolean;
2770}
2771
2772/**
2773 * Configures the `Injector` to return a value of another `useExisting` token.
2774 *
2775 * @see `ExistingProvider`
2776 * @see ["Dependency Injection Guide"](guide/dependency-injection).
2777 *
2778 * @publicApi
2779 */
2780export declare interface ExistingSansProvider {
2781 /**
2782 * Existing `token` to return. (Equivalent to `injector.get(useExisting)`)
2783 */
2784 useExisting: any;
2785}
2786
2787/**
2788 * Definition of what a factory function should look like.
2789 */
2790declare type FactoryFn<T> = {
2791 /**
2792 * Subclasses without an explicit constructor call through to the factory of their base
2793 * definition, providing it with their own constructor to instantiate.
2794 */
2795 <U extends T>(t?: Type<U>): U;
2796 /**
2797 * If no constructor to instantiate is provided, an instance of type T itself is created.
2798 */
2799 (t?: undefined): T;
2800};
2801
2802/**
2803 * Configures the `Injector` to return a value by invoking a `useFactory` function.
2804 * @see ["Dependency Injection Guide"](guide/dependency-injection).
2805 *
2806 * @usageNotes
2807 *
2808 * {@example core/di/ts/provider_spec.ts region='FactoryProvider'}
2809 *
2810 * Dependencies can also be marked as optional:
2811 *
2812 * {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps'}
2813 *
2814 * ### Multi-value example
2815 *
2816 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
2817 *
2818 * @publicApi
2819 */
2820export declare interface FactoryProvider extends FactorySansProvider {
2821 /**
2822 * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
2823 */
2824 provide: any;
2825 /**
2826 * When true, injector returns an array of instances. This is useful to allow multiple
2827 * providers spread across many files to provide configuration information to a common token.
2828 */
2829 multi?: boolean;
2830}
2831
2832/**
2833 * Configures the `Injector` to return a value by invoking a `useFactory` function.
2834 *
2835 * @see `FactoryProvider`
2836 * @see ["Dependency Injection Guide"](guide/dependency-injection).
2837 *
2838 * @publicApi
2839 */
2840export declare interface FactorySansProvider {
2841 /**
2842 * A function to invoke to create a value for this `token`. The function is invoked with
2843 * resolved values of `token`s in the `deps` field.
2844 */
2845 useFactory: Function;
2846 /**
2847 * A list of `token`s to be resolved by the injector. The list of values is then
2848 * used as arguments to the `useFactory` function.
2849 */
2850 deps?: any[];
2851}
2852
2853declare const FLAGS = 2;
2854
2855/**
2856 * Allows to refer to references which are not yet defined.
2857 *
2858 * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
2859 * DI is declared, but not yet defined. It is also used when the `token` which we use when creating
2860 * a query is not yet defined.
2861 *
2862 * @usageNotes
2863 * ### Example
2864 * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
2865 * @publicApi
2866 */
2867export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
2868
2869/**
2870 * An interface that a function passed into {@link forwardRef} has to implement.
2871 *
2872 * @usageNotes
2873 * ### Example
2874 *
2875 * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}
2876 * @publicApi
2877 */
2878export declare interface ForwardRefFn {
2879 (): any;
2880}
2881
2882/**
2883 * @publicApi
2884 */
2885export declare const getDebugNode: (nativeNode: any) => DebugNode | null;
2886
2887/**
2888 * Returns the NgModuleFactory with the given id (specified using [@NgModule.id
2889 * field](api/core/NgModule#id)), if it exists and has been loaded. Factories for NgModules that do
2890 * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.
2891 * @publicApi
2892 * @deprecated Use `getNgModuleById` instead.
2893 */
2894export declare const getModuleFactory: (id: string) => NgModuleFactory<any>;
2895
2896/**
2897 * Returns the NgModule class with the given id (specified using [@NgModule.id
2898 * field](api/core/NgModule#id)), if it exists and has been loaded. Classes for NgModules that do
2899 * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.
2900 * @publicApi
2901 */
2902export declare const getNgModuleById: <T>(id: string) => Type<T>;
2903
2904/**
2905 * Returns the current platform.
2906 *
2907 * @publicApi
2908 */
2909export declare function getPlatform(): PlatformRef | null;
2910
2911/**
2912 * Adapter interface for retrieving the `Testability` service associated for a
2913 * particular context.
2914 *
2915 * @publicApi
2916 */
2917export declare interface GetTestability {
2918 addToWindow(registry: TestabilityRegistry): void;
2919 findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
2920}
2921
2922declare type GlobalTargetName = 'document' | 'window' | 'body';
2923
2924declare type GlobalTargetResolver = (element: any) => EventTarget;
2925
2926/**
2927 * Flag to signify that this `LContainer` may have transplanted views which need to be change
2928 * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.
2929 *
2930 * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip
2931 * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify
2932 * that the `MOVED_VIEWS` are transplanted and on-push.
2933 */
2934declare const HAS_TRANSPLANTED_VIEWS = 2;
2935
2936/**
2937 * Array of hooks that should be executed for a view and their directive indices.
2938 *
2939 * For each node of the view, the following data is stored:
2940 * 1) Node index (optional)
2941 * 2) A series of number/function pairs where:
2942 * - even indices are directive indices
2943 * - odd indices are hook functions
2944 *
2945 * Special cases:
2946 * - a negative directive index flags an init hook (ngOnInit, ngAfterContentInit, ngAfterViewInit)
2947 */
2948declare type HookData = HookEntry[];
2949
2950/**
2951 * Information necessary to call a hook. E.g. the callback that
2952 * needs to invoked and the index at which to find its context.
2953 */
2954declare type HookEntry = number | HookFn;
2955
2956/** Single hook callback function. */
2957declare type HookFn = () => void;
2958
2959declare const HOST = 0;
2960
2961/**
2962 * Type of the Host metadata.
2963 *
2964 * @publicApi
2965 */
2966export declare interface Host {
2967}
2968
2969/**
2970 * Host decorator and metadata.
2971 *
2972 * @Annotation
2973 * @publicApi
2974 */
2975export declare const Host: HostDecorator;
2976
2977/**
2978 * Type of the HostBinding metadata.
2979 *
2980 * @publicApi
2981 */
2982export declare interface HostBinding {
2983 /**
2984 * The DOM property that is bound to a data property.
2985 */
2986 hostPropertyName?: string;
2987}
2988
2989/**
2990 * @Annotation
2991 * @publicApi
2992 */
2993export declare const HostBinding: HostBindingDecorator;
2994
2995/**
2996 * Type of the HostBinding decorator / constructor function.
2997 *
2998 * @publicApi
2999 */
3000export declare interface HostBindingDecorator {
3001 /**
3002 * Decorator that marks a DOM property as a host-binding property and supplies configuration
3003 * metadata.
3004 * Angular automatically checks host property bindings during change detection, and
3005 * if a binding changes it updates the host element of the directive.
3006 *
3007 * @usageNotes
3008 *
3009 * The following example creates a directive that sets the `valid` and `invalid`
3010 * properties on the DOM element that has an `ngModel` directive on it.
3011 *
3012 * ```typescript
3013 * @Directive({selector: '[ngModel]'})
3014 * class NgModelStatus {
3015 * constructor(public control: NgModel) {}
3016 * @HostBinding('class.valid') get valid() { return this.control.valid; }
3017 * @HostBinding('class.invalid') get invalid() { return this.control.invalid; }
3018 * }
3019 *
3020 * @Component({
3021 * selector: 'app',
3022 * template: `<input [(ngModel)]="prop">`,
3023 * })
3024 * class App {
3025 * prop;
3026 * }
3027 * ```
3028 *
3029 */
3030 (hostPropertyName?: string): any;
3031 new (hostPropertyName?: string): any;
3032}
3033
3034/**
3035 * Stores a set of OpCodes to process `HostBindingsFunction` associated with a current view.
3036 *
3037 * In order to invoke `HostBindingsFunction` we need:
3038 * 1. 'elementIdx`: Index to the element associated with the `HostBindingsFunction`.
3039 * 2. 'directiveIdx`: Index to the directive associated with the `HostBindingsFunction`. (This will
3040 * become the context for the `HostBindingsFunction` invocation.)
3041 * 3. `bindingRootIdx`: Location where the bindings for the `HostBindingsFunction` start. Internally
3042 * `HostBindingsFunction` binding indexes start from `0` so we need to add `bindingRootIdx` to
3043 * it.
3044 * 4. `HostBindingsFunction`: A host binding function to execute.
3045 *
3046 * The above information needs to be encoded into the `HostBindingOpCodes` in an efficient manner.
3047 *
3048 * 1. `elementIdx` is encoded into the `HostBindingOpCodes` as `~elementIdx` (so a negative number);
3049 * 2. `directiveIdx`
3050 * 3. `bindingRootIdx`
3051 * 4. `HostBindingsFunction` is passed in as is.
3052 *
3053 * The `HostBindingOpCodes` array contains:
3054 * - negative number to select the element index.
3055 * - followed by 1 or more of:
3056 * - a number to select the directive index
3057 * - a number to select the bindingRoot index
3058 * - and a function to invoke.
3059 *
3060 * ## Example
3061 *
3062 * ```
3063 * const hostBindingOpCodes = [
3064 * ~30, // Select element 30
3065 * 40, 45, MyDir.ɵdir.hostBindings // Invoke host bindings on MyDir on element 30;
3066 * // directiveIdx = 40; bindingRootIdx = 45;
3067 * 50, 55, OtherDir.ɵdir.hostBindings // Invoke host bindings on OtherDire on element 30
3068 * // directiveIdx = 50; bindingRootIdx = 55;
3069 * ]
3070 * ```
3071 *
3072 * ## Pseudocode
3073 * ```
3074 * const hostBindingOpCodes = tView.hostBindingOpCodes;
3075 * if (hostBindingOpCodes === null) return;
3076 * for (let i = 0; i < hostBindingOpCodes.length; i++) {
3077 * const opCode = hostBindingOpCodes[i] as number;
3078 * if (opCode < 0) {
3079 * // Negative numbers are element indexes.
3080 * setSelectedIndex(~opCode);
3081 * } else {
3082 * // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.
3083 * const directiveIdx = opCode;
3084 * const bindingRootIndx = hostBindingOpCodes[++i] as number;
3085 * const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;
3086 * setBindingRootForHostBindings(bindingRootIndx, directiveIdx);
3087 * const context = lView[directiveIdx];
3088 * hostBindingFn(RenderFlags.Update, context);
3089 * }
3090 * }
3091 * ```
3092 *
3093 */
3094declare interface HostBindingOpCodes extends Array<number | HostBindingsFunction<any>> {
3095 __brand__: 'HostBindingOpCodes';
3096 debug?: string[];
3097}
3098
3099declare type HostBindingsFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U) => void;
3100
3101/**
3102 * Type of the `Host` decorator / constructor function.
3103 *
3104 * @publicApi
3105 */
3106export declare interface HostDecorator {
3107 /**
3108 * Parameter decorator on a view-provider parameter of a class constructor
3109 * that tells the DI framework to resolve the view by checking injectors of child
3110 * elements, and stop when reaching the host element of the current component.
3111 *
3112 * @usageNotes
3113 *
3114 * The following shows use with the `@Optional` decorator, and allows for a `null` result.
3115 *
3116 * <code-example path="core/di/ts/metadata_spec.ts" region="Host">
3117 * </code-example>
3118 *
3119 * For an extended example, see ["Dependency Injection
3120 * Guide"](guide/dependency-injection-in-action#optional).
3121 */
3122 (): any;
3123 new (): Host;
3124}
3125
3126/** See CreateComponentOptions.hostFeatures */
3127declare type HostFeature = (<T>(component: T, componentDef: ɵComponentDef<T>) => void);
3128
3129/**
3130 * Type of the HostListener metadata.
3131 *
3132 * @publicApi
3133 */
3134export declare interface HostListener {
3135 /**
3136 * The DOM event to listen for.
3137 */
3138 eventName?: string;
3139 /**
3140 * A set of arguments to pass to the handler method when the event occurs.
3141 */
3142 args?: string[];
3143}
3144
3145/**
3146 * Decorator that binds a DOM event to a host listener and supplies configuration metadata.
3147 * Angular invokes the supplied handler method when the host element emits the specified event,
3148 * and updates the bound element with the result.
3149 *
3150 * If the handler method returns false, applies `preventDefault` on the bound element.
3151 *
3152 * @usageNotes
3153 *
3154 * The following example declares a directive
3155 * that attaches a click listener to a button and counts clicks.
3156 *
3157 * ```ts
3158 * @Directive({selector: 'button[counting]'})
3159 * class CountClicks {
3160 * numberOfClicks = 0;
3161 *
3162 * @HostListener('click', ['$event.target'])
3163 * onClick(btn) {
3164 * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);
3165 * }
3166 * }
3167 *
3168 * @Component({
3169 * selector: 'app',
3170 * template: '<button counting>Increment</button>',
3171 * })
3172 * class App {}
3173 *
3174 * ```
3175 *
3176 * The following example registers another DOM event handler that listens for key-press events.
3177 * ``` ts
3178 * import { HostListener, Component } from "@angular/core";
3179 *
3180 * @Component({
3181 * selector: 'app',
3182 * template: `<h1>Hello, you have pressed keys {{counter}} number of times!</h1> Press any key to
3183 * increment the counter.
3184 * <button (click)="resetCounter()">Reset Counter</button>`
3185 * })
3186 * class AppComponent {
3187 * counter = 0;
3188 * @HostListener('window:keydown', ['$event'])
3189 * handleKeyDown(event: KeyboardEvent) {
3190 * this.counter++;
3191 * }
3192 * resetCounter() {
3193 * this.counter = 0;
3194 * }
3195 * }
3196 * ```
3197 *
3198 * @Annotation
3199 * @publicApi
3200 */
3201export declare const HostListener: HostListenerDecorator;
3202
3203/**
3204 * Type of the HostListener decorator / constructor function.
3205 *
3206 * @publicApi
3207 */
3208export declare interface HostListenerDecorator {
3209 /**
3210 * Decorator that declares a DOM event to listen for,
3211 * and provides a handler method to run when that event occurs.
3212 *
3213 * Angular invokes the supplied handler method when the host element emits the specified event,
3214 * and updates the bound element with the result.
3215 *
3216 * If the handler method returns false, applies `preventDefault` on the bound element.
3217 */
3218 (eventName: string, args?: string[]): any;
3219 new (eventName: string, args?: string[]): any;
3220}
3221
3222declare namespace i0 {
3223 export {
3224 ɵɵinject,
3225 ɵɵdefineInjectable,
3226 ɵɵdefineInjector,
3227 ɵɵInjectableDeclaration,
3228 ɵNgModuleDef as NgModuleDef,
3229 ɵɵdefineNgModule,
3230 ɵɵFactoryDeclaration,
3231 ɵɵInjectorDeclaration,
3232 ɵɵNgModuleDeclaration,
3233 ɵsetClassMetadata as setClassMetadata,
3234 ɵNgModuleFactory as NgModuleFactory,
3235 ɵnoSideEffects,
3236 ITS_JUST_ANGULAR
3237 }
3238}
3239
3240/**
3241 * Array storing OpCode for dynamically creating `i18n` translation DOM elements.
3242 *
3243 * This array creates a sequence of `Text` and `Comment` (as ICU anchor) DOM elements. It consists
3244 * of a pair of `number` and `string` pairs which encode the operations for the creation of the
3245 * translated block.
3246 *
3247 * The number is shifted and encoded according to `I18nCreateOpCode`
3248 *
3249 * Pseudocode:
3250 * ```
3251 * const i18nCreateOpCodes = [
3252 * 10 << I18nCreateOpCode.SHIFT, "Text Node add to DOM",
3253 * 11 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.COMMENT, "Comment Node add to DOM",
3254 * 12 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.APPEND_LATER, "Text Node added later"
3255 * ];
3256 *
3257 * for(var i=0; i<i18nCreateOpCodes.length; i++) {
3258 * const opcode = i18NCreateOpCodes[i++];
3259 * const index = opcode >> I18nCreateOpCode.SHIFT;
3260 * const text = i18NCreateOpCodes[i];
3261 * let node: Text|Comment;
3262 * if (opcode & I18nCreateOpCode.COMMENT === I18nCreateOpCode.COMMENT) {
3263 * node = lView[~index] = document.createComment(text);
3264 * } else {
3265 * node = lView[index] = document.createText(text);
3266 * }
3267 * if (opcode & I18nCreateOpCode.APPEND_EAGERLY !== I18nCreateOpCode.APPEND_EAGERLY) {
3268 * parentNode.appendChild(node);
3269 * }
3270 * }
3271 * ```
3272 */
3273declare interface I18nCreateOpCodes extends Array<number | string>, I18nDebug {
3274 __brand__: 'I18nCreateOpCodes';
3275}
3276
3277declare interface I18nDebug {
3278 /**
3279 * Human readable representation of the OpCode arrays.
3280 *
3281 * NOTE: This property only exists if `ngDevMode` is set to `true` and it is not present in
3282 * production. Its presence is purely to help debug issue in development, and should not be relied
3283 * on in production application.
3284 */
3285 debug?: string[];
3286}
3287
3288/**
3289 * Stores a list of nodes which need to be removed.
3290 *
3291 * Numbers are indexes into the `LView`
3292 * - index > 0: `removeRNode(lView[0])`
3293 * - index < 0: `removeICU(~lView[0])`
3294 */
3295declare interface I18nRemoveOpCodes extends Array<number> {
3296 __brand__: 'I18nRemoveOpCodes';
3297}
3298
3299/**
3300 * Stores DOM operations which need to be applied to update DOM render tree due to changes in
3301 * expressions.
3302 *
3303 * The basic idea is that `i18nExp` OpCodes capture expression changes and update a change
3304 * mask bit. (Bit 1 for expression 1, bit 2 for expression 2 etc..., bit 32 for expression 32 and
3305 * higher.) The OpCodes then compare its own change mask against the expression change mask to
3306 * determine if the OpCodes should execute.
3307 *
3308 * NOTE: 32nd bit is special as it says 32nd or higher. This way if we have more than 32 bindings
3309 * the code still works, but with lower efficiency. (it is unlikely that a translation would have
3310 * more than 32 bindings.)
3311 *
3312 * These OpCodes can be used by both the i18n block as well as ICU sub-block.
3313 *
3314 * ## Example
3315 *
3316 * Assume
3317 * ```ts
3318 * if (rf & RenderFlags.Update) {
3319 * i18nExp(ctx.exp1); // If changed set mask bit 1
3320 * i18nExp(ctx.exp2); // If changed set mask bit 2
3321 * i18nExp(ctx.exp3); // If changed set mask bit 3
3322 * i18nExp(ctx.exp4); // If changed set mask bit 4
3323 * i18nApply(0); // Apply all changes by executing the OpCodes.
3324 * }
3325 * ```
3326 * We can assume that each call to `i18nExp` sets an internal `changeMask` bit depending on the
3327 * index of `i18nExp`.
3328 *
3329 * ### OpCodes
3330 * ```ts
3331 * <I18nUpdateOpCodes>[
3332 * // The following OpCodes represent: `<div i18n-title="pre{{exp1}}in{{exp2}}post">`
3333 * // If `changeMask & 0b11`
3334 * // has changed then execute update OpCodes.
3335 * // has NOT changed then skip `8` values and start processing next OpCodes.
3336 * 0b11, 8,
3337 * // Concatenate `newValue = 'pre'+lView[bindIndex-4]+'in'+lView[bindIndex-3]+'post';`.
3338 * 'pre', -4, 'in', -3, 'post',
3339 * // Update attribute: `elementAttribute(1, 'title', sanitizerFn(newValue));`
3340 * 1 << SHIFT_REF | Attr, 'title', sanitizerFn,
3341 *
3342 * // The following OpCodes represent: `<div i18n>Hello {{exp3}}!">`
3343 * // If `changeMask & 0b100`
3344 * // has changed then execute update OpCodes.
3345 * // has NOT changed then skip `4` values and start processing next OpCodes.
3346 * 0b100, 4,
3347 * // Concatenate `newValue = 'Hello ' + lView[bindIndex -2] + '!';`.
3348 * 'Hello ', -2, '!',
3349 * // Update text: `lView[1].textContent = newValue;`
3350 * 1 << SHIFT_REF | Text,
3351 *
3352 * // The following OpCodes represent: `<div i18n>{exp4, plural, ... }">`
3353 * // If `changeMask & 0b1000`
3354 * // has changed then execute update OpCodes.
3355 * // has NOT changed then skip `2` values and start processing next OpCodes.
3356 * 0b1000, 2,
3357 * // Concatenate `newValue = lView[bindIndex -1];`.
3358 * -1,
3359 * // Switch ICU: `icuSwitchCase(lView[1], 0, newValue);`
3360 * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuSwitch,
3361 *
3362 * // Note `changeMask & -1` is always true, so the IcuUpdate will always execute.
3363 * -1, 1,
3364 * // Update ICU: `icuUpdateCase(lView[1], 0);`
3365 * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuUpdate,
3366 *
3367 * ];
3368 * ```
3369 *
3370 */
3371declare interface I18nUpdateOpCodes extends Array<string | number | SanitizerFn | null>, I18nDebug {
3372 __brand__: 'I18nUpdateOpCodes';
3373}
3374
3375/**
3376 * Marks that the next string is comment text need for ICU.
3377 *
3378 * See `I18nMutateOpCodes` documentation.
3379 */
3380declare const ICU_MARKER: ICU_MARKER;
3381
3382declare interface ICU_MARKER {
3383 marker: 'ICU';
3384}
3385
3386/**
3387 * Array storing OpCode for dynamically creating `i18n` blocks.
3388 *
3389 * Example:
3390 * ```ts
3391 * <I18nCreateOpCode>[
3392 * // For adding text nodes
3393 * // ---------------------
3394 * // Equivalent to:
3395 * // lView[1].appendChild(lView[0] = document.createTextNode('xyz'));
3396 * 'xyz', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
3397 *
3398 * // For adding element nodes
3399 * // ---------------------
3400 * // Equivalent to:
3401 * // lView[1].appendChild(lView[0] = document.createElement('div'));
3402 * ELEMENT_MARKER, 'div', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
3403 *
3404 * // For adding comment nodes
3405 * // ---------------------
3406 * // Equivalent to:
3407 * // lView[1].appendChild(lView[0] = document.createComment(''));
3408 * ICU_MARKER, '', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
3409 *
3410 * // For moving existing nodes to a different location
3411 * // --------------------------------------------------
3412 * // Equivalent to:
3413 * // const node = lView[1];
3414 * // lView[2].appendChild(node);
3415 * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
3416 *
3417 * // For removing existing nodes
3418 * // --------------------------------------------------
3419 * // const node = lView[1];
3420 * // removeChild(tView.data(1), node, lView);
3421 * 1 << SHIFT_REF | Remove,
3422 *
3423 * // For writing attributes
3424 * // --------------------------------------------------
3425 * // const node = lView[1];
3426 * // node.setAttribute('attr', 'value');
3427 * 1 << SHIFT_REF | Attr, 'attr', 'value'
3428 * ];
3429 * ```
3430 */
3431declare interface IcuCreateOpCodes extends Array<number | string | ELEMENT_MARKER | ICU_MARKER | null>, I18nDebug {
3432 __brand__: 'I18nCreateOpCodes';
3433}
3434
3435/**
3436 * Defines the ICU type of `select` or `plural`
3437 */
3438declare const enum IcuType {
3439 select = 0,
3440 plural = 1
3441}
3442
3443/**
3444 * This array contains information about input properties that
3445 * need to be set once from attribute data. It's ordered by
3446 * directive index (relative to element) so it's simple to
3447 * look up a specific directive's initial input data.
3448 *
3449 * Within each sub-array:
3450 *
3451 * i+0: attribute name
3452 * i+1: minified/internal input name
3453 * i+2: initial value
3454 *
3455 * If a directive on a node does not have any input properties
3456 * that should be set from attributes, its index is set to null
3457 * to avoid a sparse array.
3458 *
3459 * e.g. [null, ['role-min', 'minified-input', 'button']]
3460 */
3461declare type InitialInputData = (InitialInputs | null)[];
3462
3463/**
3464 * Used by InitialInputData to store input properties
3465 * that should be set once from attributes.
3466 *
3467 * i+0: attribute name
3468 * i+1: minified/internal input name
3469 * i+2: initial value
3470 *
3471 * e.g. ['role-min', 'minified-input', 'button']
3472 */
3473declare type InitialInputs = string[];
3474
3475/**
3476 * Type of the Inject metadata.
3477 *
3478 * @publicApi
3479 */
3480export declare interface Inject {
3481 /**
3482 * A [DI token](guide/glossary#di-token) that maps to the dependency to be injected.
3483 */
3484 token: any;
3485}
3486
3487/**
3488 * Inject decorator and metadata.
3489 *
3490 * @Annotation
3491 * @publicApi
3492 */
3493export declare const Inject: InjectDecorator;
3494
3495/**
3496 * Injects a token from the currently active injector.
3497 *
3498 * Must be used in the context of a factory function such as one defined for an
3499 * `InjectionToken`. Throws an error if not called from such a context.
3500 *
3501 * Within such a factory function, using this function to request injection of a dependency
3502 * is faster and more type-safe than providing an additional array of dependencies
3503 * (as has been common with `useFactory` providers).
3504 *
3505 * @param token The injection token for the dependency to be injected.
3506 * @param flags Optional flags that control how injection is executed.
3507 * The flags correspond to injection strategies that can be specified with
3508 * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.
3509 * @returns the injected value if injection is successful, `null` otherwise.
3510 *
3511 * @usageNotes
3512 *
3513 * ### Example
3514 *
3515 * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
3516 *
3517 * @publicApi
3518 */
3519export declare const inject: typeof ɵɵinject;
3520
3521/**
3522 * Type of the Injectable metadata.
3523 *
3524 * @publicApi
3525 */
3526export declare interface Injectable {
3527 /**
3528 * Determines which injectors will provide the injectable.
3529 *
3530 * - `Type<any>` - associates the injectable with an `@NgModule` or other `InjectorType`,
3531 * - 'null' : Equivalent to `undefined`. The injectable is not provided in any scope automatically
3532 * and must be added to a `providers` array of an [@NgModule](api/core/NgModule#providers),
3533 * [@Component](api/core/Directive#providers) or [@Directive](api/core/Directive#providers).
3534 *
3535 * The following options specify that this injectable should be provided in one of the following
3536 * injectors:
3537 * - 'root' : The application-level injector in most apps.
3538 * - 'platform' : A special singleton platform injector shared by all
3539 * applications on the page.
3540 * - 'any' : Provides a unique instance in each lazy loaded module while all eagerly loaded
3541 * modules share one instance.
3542 *
3543 */
3544 providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
3545}
3546
3547/**
3548 * Injectable decorator and metadata.
3549 *
3550 * @Annotation
3551 * @publicApi
3552 */
3553export declare const Injectable: InjectableDecorator;
3554
3555/**
3556 * Type of the Injectable decorator / constructor function.
3557 *
3558 * @publicApi
3559 */
3560export declare interface InjectableDecorator {
3561 /**
3562 * Decorator that marks a class as available to be
3563 * provided and injected as a dependency.
3564 *
3565 * @see [Introduction to Services and DI](guide/architecture-services)
3566 * @see [Dependency Injection Guide](guide/dependency-injection)
3567 *
3568 * @usageNotes
3569 *
3570 * Marking a class with `@Injectable` ensures that the compiler
3571 * will generate the necessary metadata to create the class's
3572 * dependencies when the class is injected.
3573 *
3574 * The following example shows how a service class is properly
3575 * marked so that a supporting service can be injected upon creation.
3576 *
3577 * <code-example path="core/di/ts/metadata_spec.ts" region="Injectable"></code-example>
3578 *
3579 */
3580 (): TypeDecorator;
3581 (options?: {
3582 providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
3583 } & InjectableProvider): TypeDecorator;
3584 new (): Injectable;
3585 new (options?: {
3586 providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
3587 } & InjectableProvider): Injectable;
3588}
3589
3590/**
3591 * Injectable providers used in `@Injectable` decorator.
3592 *
3593 * @publicApi
3594 */
3595export declare type InjectableProvider = ValueSansProvider | ExistingSansProvider | StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider;
3596
3597/**
3598 * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.
3599 *
3600 * `InjectableType`s contain their own Dependency Injection metadata and are usable in an
3601 * `InjectorDef`-based `StaticInjector.
3602 *
3603 * @publicApi
3604 */
3605export declare interface InjectableType<T> extends Type<T> {
3606 /**
3607 * Opaque type whose structure is highly version dependent. Do not rely on any properties.
3608 */
3609 ɵprov: unknown;
3610}
3611
3612/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */
3613declare function injectChangeDetectorRef(flags: InjectFlags): ChangeDetectorRef;
3614
3615
3616/**
3617 * Type of the Inject decorator / constructor function.
3618 *
3619 * @publicApi
3620 */
3621export declare interface InjectDecorator {
3622 /**
3623 * Parameter decorator on a dependency parameter of a class constructor
3624 * that specifies a custom provider of the dependency.
3625 *
3626 * @usageNotes
3627 * The following example shows a class constructor that specifies a
3628 * custom provider of a dependency using the parameter decorator.
3629 *
3630 * When `@Inject()` is not present, the injector uses the type annotation of the
3631 * parameter as the provider.
3632 *
3633 * <code-example path="core/di/ts/metadata_spec.ts" region="InjectWithoutDecorator">
3634 * </code-example>
3635 *
3636 * @see ["Dependency Injection Guide"](guide/dependency-injection)
3637 *
3638 */
3639 (token: any): any;
3640 new (token: any): Inject;
3641}
3642
3643/**
3644 * Creates an ElementRef from the most recent node.
3645 *
3646 * @returns The ElementRef instance to use
3647 */
3648declare function injectElementRef(): ElementRef;
3649
3650/**
3651 * Injection flags for DI.
3652 *
3653 * @publicApi
3654 */
3655export declare enum InjectFlags {
3656 /** Check self and check parent injector if needed */
3657 Default = 0,
3658 /**
3659 * Specifies that an injector should retrieve a dependency from any injector until reaching the
3660 * host element of the current component. (Only used with Element Injector)
3661 */
3662 Host = 1,
3663 /** Don't ascend to ancestors of the node requesting injection. */
3664 Self = 2,
3665 /** Skip the node that is requesting injection. */
3666 SkipSelf = 4,
3667 /** Inject `defaultValue` instead if token not found. */
3668 Optional = 8
3669}
3670
3671/**
3672 * Creates a token that can be used in a DI Provider.
3673 *
3674 * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a
3675 * runtime representation) such as when injecting an interface, callable type, array or
3676 * parameterized type.
3677 *
3678 * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
3679 * the `Injector`. This provides an additional level of type safety.
3680 *
3681 * ```
3682 * interface MyInterface {...}
3683 * const myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));
3684 * // myInterface is inferred to be MyInterface.
3685 * ```
3686 *
3687 * When creating an `InjectionToken`, you can optionally specify a factory function which returns
3688 * (possibly by creating) a default value of the parameterized type `T`. This sets up the
3689 * `InjectionToken` using this factory as a provider as if it was defined explicitly in the
3690 * application's root injector. If the factory function, which takes zero arguments, needs to inject
3691 * dependencies, it can do so using the `inject` function.
3692 * As you can see in the Tree-shakable InjectionToken example below.
3693 *
3694 * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which
3695 * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As
3696 * mentioned above, `'root'` is the default value for `providedIn`.
3697 *
3698 * @usageNotes
3699 * ### Basic Examples
3700 *
3701 * ### Plain InjectionToken
3702 *
3703 * {@example core/di/ts/injector_spec.ts region='InjectionToken'}
3704 *
3705 * ### Tree-shakable InjectionToken
3706 *
3707 * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
3708 *
3709 *
3710 * @publicApi
3711 */
3712export declare class InjectionToken<T> {
3713 protected _desc: string;
3714 readonly ɵprov: unknown;
3715 /**
3716 * @param _desc Description for the token,
3717 * used only for debugging purposes,
3718 * it should but does not need to be unique
3719 * @param options Options for the token's usage, as described above
3720 */
3721 constructor(_desc: string, options?: {
3722 providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
3723 factory: () => T;
3724 });
3725 toString(): string;
3726}
3727
3728/**
3729 * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.
3730 *
3731 * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a
3732 * project.
3733 *
3734 * @publicApi
3735 */
3736export declare const INJECTOR: InjectionToken<Injector>;
3737
3738/**
3739 * Concrete injectors implement this interface. Injectors are configured
3740 * with [providers](guide/glossary#provider) that associate
3741 * dependencies of various types with [injection tokens](guide/glossary#di-token).
3742 *
3743 * @see ["DI Providers"](guide/dependency-injection-providers).
3744 * @see `StaticProvider`
3745 *
3746 * @usageNotes
3747 *
3748 * The following example creates a service injector instance.
3749 *
3750 * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
3751 *
3752 * ### Usage example
3753 *
3754 * {@example core/di/ts/injector_spec.ts region='Injector'}
3755 *
3756 * `Injector` returns itself when given `Injector` as a token:
3757 *
3758 * {@example core/di/ts/injector_spec.ts region='injectInjector'}
3759 *
3760 * @publicApi
3761 */
3762export declare abstract class Injector {
3763 static THROW_IF_NOT_FOUND: {};
3764 static NULL: Injector;
3765 /**
3766 * Retrieves an instance from the injector based on the provided token.
3767 * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
3768 * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
3769 */
3770 abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
3771 /**
3772 * @deprecated from v4.0.0 use ProviderToken<T>
3773 * @suppress {duplicate}
3774 */
3775 abstract get(token: any, notFoundValue?: any): any;
3776 /**
3777 * @deprecated from v5 use the new signature Injector.create(options)
3778 */
3779 static create(providers: StaticProvider[], parent?: Injector): Injector;
3780 /**
3781 * Creates a new injector instance that provides one or more dependencies,
3782 * according to a given type or types of `StaticProvider`.
3783 *
3784 * @param options An object with the following properties:
3785 * * `providers`: An array of providers of the [StaticProvider type](api/core/StaticProvider).
3786 * * `parent`: (optional) A parent injector.
3787 * * `name`: (optional) A developer-defined identifying name for the new injector.
3788 *
3789 * @returns The new injector instance.
3790 *
3791 */
3792 static create(options: {
3793 providers: StaticProvider[];
3794 parent?: Injector;
3795 name?: string;
3796 }): Injector;
3797 /** @nocollapse */
3798 static ɵprov: unknown;
3799}
3800
3801declare const INJECTOR_2 = 9;
3802
3803/**
3804 * A type which has an `InjectorDef` static field.
3805 *
3806 * `InjectorTypes` can be used to configure a `StaticInjector`.
3807 *
3808 * This is an opaque type whose structure is highly version dependent. Do not rely on any
3809 * properties.
3810 *
3811 * @publicApi
3812 */
3813export declare interface InjectorType<T> extends Type<T> {
3814 ɵfac?: unknown;
3815 ɵinj: unknown;
3816}
3817
3818/**
3819 * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorType` with an
3820 * associated array of providers.
3821 *
3822 * Objects of this type can be listed in the imports section of an `InjectorDef`.
3823 *
3824 * NOTE: This is a private type and should not be exported
3825 */
3826declare interface InjectorTypeWithProviders<T> {
3827 ngModule: InjectorType<T>;
3828 providers?: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[];
3829}
3830
3831/** Injects a Renderer2 for the current component. */
3832declare function injectRenderer2(): Renderer2;
3833
3834/**
3835 * Creates a TemplateRef given a node.
3836 *
3837 * @returns The TemplateRef instance to use
3838 */
3839declare function injectTemplateRef<T>(): TemplateRef<T> | null;
3840
3841/**
3842 * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef
3843 * already exists, retrieves the existing ViewContainerRef.
3844 *
3845 * @returns The ViewContainerRef instance to use
3846 */
3847declare function injectViewContainerRef(): ViewContainerRef;
3848
3849/**
3850 * Type of metadata for an `Input` property.
3851 *
3852 * @publicApi
3853 */
3854export declare interface Input {
3855 /**
3856 * The name of the DOM property to which the input property is bound.
3857 */
3858 bindingPropertyName?: string;
3859}
3860
3861/**
3862 * @Annotation
3863 * @publicApi
3864 */
3865export declare const Input: InputDecorator;
3866
3867/**
3868 * @publicApi
3869 */
3870export declare interface InputDecorator {
3871 /**
3872 * Decorator that marks a class field as an input property and supplies configuration metadata.
3873 * The input property is bound to a DOM property in the template. During change detection,
3874 * Angular automatically updates the data property with the DOM property's value.
3875 *
3876 * @usageNotes
3877 *
3878 * You can supply an optional name to use in templates when the
3879 * component is instantiated, that maps to the
3880 * name of the bound property. By default, the original
3881 * name of the bound property is used for input binding.
3882 *
3883 * The following example creates a component with two input properties,
3884 * one of which is given a special binding name.
3885 *
3886 * ```typescript
3887 * @Component({
3888 * selector: 'bank-account',
3889 * template: `
3890 * Bank Name: {{bankName}}
3891 * Account Id: {{id}}
3892 * `
3893 * })
3894 * class BankAccount {
3895 * // This property is bound using its original name.
3896 * @Input() bankName: string;
3897 * // this property value is bound to a different property name
3898 * // when this component is instantiated in a template.
3899 * @Input('account-id') id: string;
3900 *
3901 * // this property is not bound, and is not automatically updated by Angular
3902 * normalizedBankName: string;
3903 * }
3904 *
3905 * @Component({
3906 * selector: 'app',
3907 * template: `
3908 * <bank-account bankName="RBC" account-id="4747"></bank-account>
3909 * `
3910 * })
3911 * class App {}
3912 * ```
3913 *
3914 * @see [Input and Output properties](guide/inputs-outputs)
3915 */
3916 (bindingPropertyName?: string): any;
3917 new (bindingPropertyName?: string): any;
3918}
3919
3920/**
3921 * See `TNode.insertBeforeIndex`
3922 */
3923declare type InsertBeforeIndex = null | number | number[];
3924
3925declare interface InternalNgModuleRef<T> extends NgModuleRef<T> {
3926 _bootstrapComponents: Type<any>[];
3927}
3928
3929declare interface InternalViewRef extends ViewRef {
3930 detachFromAppRef(): void;
3931 attachToAppRef(appRef: ViewRefTracker): void;
3932}
3933
3934
3935/**
3936 * Returns whether Angular is in development mode. After called once,
3937 * the value is locked and won't change any more.
3938 *
3939 * By default, this is true, unless a user calls `enableProdMode` before calling this.
3940 *
3941 * @publicApi
3942 */
3943export declare function isDevMode(): boolean;
3944
3945/**
3946 * Record representing the item change information.
3947 *
3948 * @publicApi
3949 */
3950export declare interface IterableChangeRecord<V> {
3951 /** Current index of the item in `Iterable` or null if removed. */
3952 readonly currentIndex: number | null;
3953 /** Previous index of the item in `Iterable` or null if added. */
3954 readonly previousIndex: number | null;
3955 /** The item. */
3956 readonly item: V;
3957 /** Track by identity as computed by the `TrackByFunction`. */
3958 readonly trackById: any;
3959}
3960
3961declare class IterableChangeRecord_<V> implements IterableChangeRecord<V> {
3962 item: V;
3963 trackById: any;
3964 currentIndex: number | null;
3965 previousIndex: number | null;
3966 constructor(item: V, trackById: any);
3967}
3968
3969/**
3970 * An object describing the changes in the `Iterable` collection since last time
3971 * `IterableDiffer#diff()` was invoked.
3972 *
3973 * @publicApi
3974 */
3975export declare interface IterableChanges<V> {
3976 /**
3977 * Iterate over all changes. `IterableChangeRecord` will contain information about changes
3978 * to each item.
3979 */
3980 forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;
3981 /**
3982 * Iterate over a set of operations which when applied to the original `Iterable` will produce the
3983 * new `Iterable`.
3984 *
3985 * NOTE: These are not necessarily the actual operations which were applied to the original
3986 * `Iterable`, rather these are a set of computed operations which may not be the same as the
3987 * ones applied.
3988 *
3989 * @param record A change which needs to be applied
3990 * @param previousIndex The `IterableChangeRecord#previousIndex` of the `record` refers to the
3991 * original `Iterable` location, where as `previousIndex` refers to the transient location
3992 * of the item, after applying the operations up to this point.
3993 * @param currentIndex The `IterableChangeRecord#currentIndex` of the `record` refers to the
3994 * original `Iterable` location, where as `currentIndex` refers to the transient location
3995 * of the item, after applying the operations up to this point.
3996 */
3997 forEachOperation(fn: (record: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
3998 /**
3999 * Iterate over changes in the order of original `Iterable` showing where the original items
4000 * have moved.
4001 */
4002 forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;
4003 /** Iterate over all added items. */
4004 forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;
4005 /** Iterate over all moved items. */
4006 forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
4007 /** Iterate over all removed items. */
4008 forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
4009 /**
4010 * Iterate over all items which had their identity (as computed by the `TrackByFunction`)
4011 * changed.
4012 */
4013 forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;
4014}
4015
4016/**
4017 * A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to
4018 * respond to changes in an iterable by effecting equivalent changes in the DOM.
4019 *
4020 * @publicApi
4021 */
4022export declare interface IterableDiffer<V> {
4023 /**
4024 * Compute a difference between the previous state and the new `object` state.
4025 *
4026 * @param object containing the new value.
4027 * @returns an object describing the difference. The return value is only valid until the next
4028 * `diff()` invocation.
4029 */
4030 diff(object: NgIterable<V> | undefined | null): IterableChanges<V> | null;
4031}
4032
4033/**
4034 * Provides a factory for {@link IterableDiffer}.
4035 *
4036 * @publicApi
4037 */
4038export declare interface IterableDifferFactory {
4039 supports(objects: any): boolean;
4040 create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;
4041}
4042
4043/**
4044 * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
4045 *
4046 * @publicApi
4047 */
4048export declare class IterableDiffers {
4049 /** @nocollapse */
4050 static ɵprov: unknown;
4051 /**
4052 * @deprecated v4.0.0 - Should be private
4053 */
4054 factories: IterableDifferFactory[];
4055 constructor(factories: IterableDifferFactory[]);
4056 static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers;
4057 /**
4058 * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
4059 * inherited {@link IterableDiffers} instance with the provided factories and return a new
4060 * {@link IterableDiffers} instance.
4061 *
4062 * @usageNotes
4063 * ### Example
4064 *
4065 * The following example shows how to extend an existing list of factories,
4066 * which will only be applied to the injector for this component and its children.
4067 * This step is all that's required to make a new {@link IterableDiffer} available.
4068 *
4069 * ```
4070 * @Component({
4071 * viewProviders: [
4072 * IterableDiffers.extend([new ImmutableListDiffer()])
4073 * ]
4074 * })
4075 * ```
4076 */
4077 static extend(factories: IterableDifferFactory[]): StaticProvider;
4078 find(iterable: any): IterableDifferFactory;
4079}
4080
4081/**
4082 * The existence of this constant (in this particular file) informs the Angular compiler that the
4083 * current program is actually @angular/core, which needs to be compiled specially.
4084 */
4085declare const ITS_JUST_ANGULAR = true;
4086
4087/**
4088 * `KeyValueArray` is an array where even positions contain keys and odd positions contain values.
4089 *
4090 * `KeyValueArray` provides a very efficient way of iterating over its contents. For small
4091 * sets (~10) the cost of binary searching an `KeyValueArray` has about the same performance
4092 * characteristics that of a `Map` with significantly better memory footprint.
4093 *
4094 * If used as a `Map` the keys are stored in alphabetical order so that they can be binary searched
4095 * for retrieval.
4096 *
4097 * See: `keyValueArraySet`, `keyValueArrayGet`, `keyValueArrayIndexOf`, `keyValueArrayDelete`.
4098 */
4099declare interface KeyValueArray<VALUE> extends Array<VALUE | string> {
4100 __brand__: 'array-map';
4101}
4102
4103/**
4104 * Record representing the item change information.
4105 *
4106 * @publicApi
4107 */
4108export declare interface KeyValueChangeRecord<K, V> {
4109 /**
4110 * Current key in the Map.
4111 */
4112 readonly key: K;
4113 /**
4114 * Current value for the key or `null` if removed.
4115 */
4116 readonly currentValue: V | null;
4117 /**
4118 * Previous value for the key or `null` if added.
4119 */
4120 readonly previousValue: V | null;
4121}
4122
4123/**
4124 * An object describing the changes in the `Map` or `{[k:string]: string}` since last time
4125 * `KeyValueDiffer#diff()` was invoked.
4126 *
4127 * @publicApi
4128 */
4129export declare interface KeyValueChanges<K, V> {
4130 /**
4131 * Iterate over all changes. `KeyValueChangeRecord` will contain information about changes
4132 * to each item.
4133 */
4134 forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
4135 /**
4136 * Iterate over changes in the order of original Map showing where the original items
4137 * have moved.
4138 */
4139 forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
4140 /**
4141 * Iterate over all keys for which values have changed.
4142 */
4143 forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
4144 /**
4145 * Iterate over all added items.
4146 */
4147 forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
4148 /**
4149 * Iterate over all removed items.
4150 */
4151 forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
4152}
4153
4154/**
4155 * A differ that tracks changes made to an object over time.
4156 *
4157 * @publicApi
4158 */
4159export declare interface KeyValueDiffer<K, V> {
4160 /**
4161 * Compute a difference between the previous state and the new `object` state.
4162 *
4163 * @param object containing the new value.
4164 * @returns an object describing the difference. The return value is only valid until the next
4165 * `diff()` invocation.
4166 */
4167 diff(object: Map<K, V>): KeyValueChanges<K, V> | null;
4168 /**
4169 * Compute a difference between the previous state and the new `object` state.
4170 *
4171 * @param object containing the new value.
4172 * @returns an object describing the difference. The return value is only valid until the next
4173 * `diff()` invocation.
4174 */
4175 diff(object: {
4176 [key: string]: V;
4177 }): KeyValueChanges<string, V> | null;
4178}
4179
4180/**
4181 * Provides a factory for {@link KeyValueDiffer}.
4182 *
4183 * @publicApi
4184 */
4185export declare interface KeyValueDifferFactory {
4186 /**
4187 * Test to see if the differ knows how to diff this kind of object.
4188 */
4189 supports(objects: any): boolean;
4190 /**
4191 * Create a `KeyValueDiffer`.
4192 */
4193 create<K, V>(): KeyValueDiffer<K, V>;
4194}
4195
4196/**
4197 * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
4198 *
4199 * @publicApi
4200 */
4201export declare class KeyValueDiffers {
4202 /** @nocollapse */
4203 static ɵprov: unknown;
4204 /**
4205 * @deprecated v4.0.0 - Should be private.
4206 */
4207 factories: KeyValueDifferFactory[];
4208 constructor(factories: KeyValueDifferFactory[]);
4209 static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers;
4210 /**
4211 * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
4212 * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
4213 * {@link KeyValueDiffers} instance.
4214 *
4215 * @usageNotes
4216 * ### Example
4217 *
4218 * The following example shows how to extend an existing list of factories,
4219 * which will only be applied to the injector for this component and its children.
4220 * This step is all that's required to make a new {@link KeyValueDiffer} available.
4221 *
4222 * ```
4223 * @Component({
4224 * viewProviders: [
4225 * KeyValueDiffers.extend([new ImmutableMapDiffer()])
4226 * ]
4227 * })
4228 * ```
4229 */
4230 static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider;
4231 find(kv: any): KeyValueDifferFactory;
4232}
4233
4234/**
4235 * The state associated with a container.
4236 *
4237 * This is an array so that its structure is closer to LView. This helps
4238 * when traversing the view tree (which is a mix of containers and component
4239 * views), so we can jump to viewOrContainer[NEXT] in the same way regardless
4240 * of type.
4241 */
4242declare interface LContainer extends Array<any> {
4243 /**
4244 * The host element of this LContainer.
4245 *
4246 * The host could be an LView if this container is on a component node.
4247 * In that case, the component LView is its HOST.
4248 */
4249 readonly [HOST]: RElement | RComment | LView;
4250 /**
4251 * This is a type field which allows us to differentiate `LContainer` from `StylingContext` in an
4252 * efficient way. The value is always set to `true`
4253 */
4254 [TYPE]: true;
4255 /**
4256 * Flag to signify that this `LContainer` may have transplanted views which need to be change
4257 * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.
4258 *
4259 * This flag, once set, is never unset for the `LContainer`.
4260 */
4261 [HAS_TRANSPLANTED_VIEWS]: boolean;
4262 /**
4263 * Access to the parent view is necessary so we can propagate back
4264 * up from inside a container to parent[NEXT].
4265 */
4266 [PARENT]: LView;
4267 /**
4268 * This allows us to jump from a container to a sibling container or component
4269 * view with the same parent, so we can remove listeners efficiently.
4270 */
4271 [NEXT]: LView | LContainer | null;
4272 /**
4273 * The number of direct transplanted views which need a refresh or have descendants themselves
4274 * that need a refresh but have not marked their ancestors as Dirty. This tells us that during
4275 * change detection we should still descend to find those children to refresh, even if the parents
4276 * are not `Dirty`/`CheckAlways`.
4277 */
4278 [TRANSPLANTED_VIEWS_TO_REFRESH]: number;
4279 /**
4280 * A collection of views created based on the underlying `<ng-template>` element but inserted into
4281 * a different `LContainer`. We need to track views created from a given declaration point since
4282 * queries collect matches from the embedded view declaration point and _not_ the insertion point.
4283 */
4284 [MOVED_VIEWS]: LView[] | null;
4285 /**
4286 * Pointer to the `TNode` which represents the host of the container.
4287 */
4288 [T_HOST]: TNode;
4289 /** The comment element that serves as an anchor for this LContainer. */
4290 readonly [NATIVE]: RComment;
4291 /**
4292 * Array of `ViewRef`s used by any `ViewContainerRef`s that point to this container.
4293 *
4294 * This is lazily initialized by `ViewContainerRef` when the first view is inserted.
4295 *
4296 * NOTE: This is stored as `any[]` because render3 should really not be aware of `ViewRef` and
4297 * doing so creates circular dependency.
4298 */
4299 [VIEW_REFS]: unknown[] | null;
4300}
4301
4302/**
4303 * Human readable version of the `LContainer`
4304 *
4305 * `LContainer` is a data structure used internally to keep track of child views. The `LContainer`
4306 * is designed for efficiency and so at times it is difficult to read or write tests which assert on
4307 * its values. For this reason when `ngDevMode` is true we patch a `LContainer.debug` property which
4308 * points to `LContainerDebug` for easier debugging and test writing. It is the intent of
4309 * `LContainerDebug` to be used in tests.
4310 */
4311declare interface LContainerDebug {
4312 readonly native: RComment;
4313 /**
4314 * Child `LView`s.
4315 */
4316 readonly views: LViewDebug[];
4317 readonly parent: LViewDebug | null;
4318 readonly movedViews: LView[] | null;
4319 readonly host: RElement | RComment | LView;
4320 readonly next: LViewDebug | LContainerDebug | null;
4321 readonly hasTransplantedViews: boolean;
4322}
4323
4324/**
4325 * Provide this token to set the locale of your application.
4326 * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
4327 * DecimalPipe and PercentPipe) and by ICU expressions.
4328 *
4329 * See the [i18n guide](guide/i18n-common-locale-id) for more information.
4330 *
4331 * @usageNotes
4332 * ### Example
4333 *
4334 * ```typescript
4335 * import { LOCALE_ID } from '@angular/core';
4336 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4337 * import { AppModule } from './app/app.module';
4338 *
4339 * platformBrowserDynamic().bootstrapModule(AppModule, {
4340 * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]
4341 * });
4342 * ```
4343 *
4344 * @publicApi
4345 */
4346export declare const LOCALE_ID: InjectionToken<string>;
4347
4348/**
4349 * Type for a function that extracts a value for a local refs.
4350 * Example:
4351 * - `<div #nativeDivEl>` - `nativeDivEl` should point to the native `<div>` element;
4352 * - `<ng-template #tplRef>` - `tplRef` should point to the `TemplateRef` instance;
4353 */
4354declare type LocalRefExtractor = (tNode: TNodeWithLocalRefs, currentView: LView) => any;
4355
4356/**
4357 * lQueries represent a collection of individual LQuery objects tracked in a given view.
4358 */
4359declare interface LQueries {
4360 /**
4361 * A collection of queries tracked in a given view.
4362 */
4363 queries: LQuery<any>[];
4364 /**
4365 * A method called when a new embedded view is created. As a result a set of LQueries applicable
4366 * for a new embedded view is instantiated (cloned) from the declaration view.
4367 * @param tView
4368 */
4369 createEmbeddedView(tView: TView): LQueries | null;
4370 /**
4371 * A method called when an embedded view is inserted into a container. As a result all impacted
4372 * `LQuery` objects (and associated `QueryList`) are marked as dirty.
4373 * @param tView
4374 */
4375 insertView(tView: TView): void;
4376 /**
4377 * A method called when an embedded view is detached from a container. As a result all impacted
4378 * `LQuery` objects (and associated `QueryList`) are marked as dirty.
4379 * @param tView
4380 */
4381 detachView(tView: TView): void;
4382}
4383
4384/**
4385 * An interface that represents query-related information specific to a view instance. Most notably
4386 * it contains:
4387 * - materialized query matches;
4388 * - a pointer to a QueryList where materialized query results should be reported.
4389 */
4390declare interface LQuery<T> {
4391 /**
4392 * Materialized query matches for a given view only (!). Results are initialized lazily so the
4393 * array of matches is set to `null` initially.
4394 */
4395 matches: (T | null)[] | null;
4396 /**
4397 * A QueryList where materialized query results should be reported.
4398 */
4399 queryList: QueryList<T>;
4400 /**
4401 * Clones an LQuery for an embedded view. A cloned query shares the same `QueryList` but has a
4402 * separate collection of materialized matches.
4403 */
4404 clone(): LQuery<T>;
4405 /**
4406 * Called when an embedded view, impacting results of this query, is inserted or removed.
4407 */
4408 setDirty(): void;
4409}
4410
4411/**
4412 * `LView` stores all of the information needed to process the instructions as
4413 * they are invoked from the template. Each embedded view and component view has its
4414 * own `LView`. When processing a particular view, we set the `viewData` to that
4415 * `LView`. When that view is done processing, the `viewData` is set back to
4416 * whatever the original `viewData` was before (the parent `LView`).
4417 *
4418 * Keeping separate state for each view facilities view insertion / deletion, so we
4419 * don't have to edit the data array based on which views are present.
4420 */
4421declare interface LView extends Array<any> {
4422 /**
4423 * Human readable representation of the `LView`.
4424 *
4425 * NOTE: This property only exists if `ngDevMode` is set to `true` and it is not present in
4426 * production. Its presence is purely to help debug issue in development, and should not be relied
4427 * on in production application.
4428 */
4429 debug?: LViewDebug;
4430 /**
4431 * The node into which this `LView` is inserted.
4432 */
4433 [HOST]: RElement | null;
4434 /**
4435 * The static data for this view. We need a reference to this so we can easily walk up the
4436 * node tree in DI and get the TView.data array associated with a node (where the
4437 * directive defs are stored).
4438 */
4439 readonly [TVIEW]: TView;
4440 /** Flags for this view. See LViewFlags for more info. */
4441 [FLAGS]: LViewFlags;
4442 /**
4443 * This may store an {@link LView} or {@link LContainer}.
4444 *
4445 * `LView` - The parent view. This is needed when we exit the view and must restore the previous
4446 * LView. Without this, the render method would have to keep a stack of
4447 * views as it is recursively rendering templates.
4448 *
4449 * `LContainer` - The current view is part of a container, and is an embedded view.
4450 */
4451 [PARENT]: LView | LContainer | null;
4452 /**
4453 *
4454 * The next sibling LView or LContainer.
4455 *
4456 * Allows us to propagate between sibling view states that aren't in the same
4457 * container. Embedded views already have a node.next, but it is only set for
4458 * views in the same container. We need a way to link component views and views
4459 * across containers as well.
4460 */
4461 [NEXT]: LView | LContainer | null;
4462 /** Queries active for this view - nodes from a view are reported to those queries. */
4463 [QUERIES]: LQueries | null;
4464 /**
4465 * Store the `TNode` of the location where the current `LView` is inserted into.
4466 *
4467 * Given:
4468 * ```
4469 * <div>
4470 * <ng-template><span></span></ng-template>
4471 * </div>
4472 * ```
4473 *
4474 * We end up with two `TView`s.
4475 * - `parent` `TView` which contains `<div><!-- anchor --></div>`
4476 * - `child` `TView` which contains `<span></span>`
4477 *
4478 * Typically the `child` is inserted into the declaration location of the `parent`, but it can be
4479 * inserted anywhere. Because it can be inserted anywhere it is not possible to store the
4480 * insertion information in the `TView` and instead we must store it in the `LView[T_HOST]`.
4481 *
4482 * So to determine where is our insertion parent we would execute:
4483 * ```
4484 * const parentLView = lView[PARENT];
4485 * const parentTNode = lView[T_HOST];
4486 * const insertionParent = parentLView[parentTNode.index];
4487 * ```
4488 *
4489 *
4490 * If `null`, this is the root view of an application (root component is in this view) and it has
4491 * no parents.
4492 */
4493 [T_HOST]: TNode | null;
4494 /**
4495 * When a view is destroyed, listeners need to be released and outputs need to be
4496 * unsubscribed. This context array stores both listener functions wrapped with
4497 * their context and output subscription instances for a particular view.
4498 *
4499 * These change per LView instance, so they cannot be stored on TView. Instead,
4500 * TView.cleanup saves an index to the necessary context in this array.
4501 *
4502 * After `LView` is created it is possible to attach additional instance specific functions at the
4503 * end of the `lView[CLENUP]` because we know that no more `T` level cleanup functions will be
4504 * addeded here.
4505 */
4506 [CLEANUP]: any[] | null;
4507 /**
4508 * - For dynamic views, this is the context with which to render the template (e.g.
4509 * `NgForContext`), or `{}` if not defined explicitly.
4510 * - For root view of the root component the context contains change detection data.
4511 * - For non-root components, the context is the component instance,
4512 * - For inline views, the context is null.
4513 */
4514 [CONTEXT]: {} | RootContext | null;
4515 /** An optional Module Injector to be used as fall back after Element Injectors are consulted. */
4516 readonly [INJECTOR_2]: Injector | null;
4517 /** Factory to be used for creating Renderer. */
4518 [RENDERER_FACTORY]: RendererFactory3;
4519 /** Renderer to be used for this view. */
4520 [RENDERER]: Renderer3;
4521 /** An optional custom sanitizer. */
4522 [SANITIZER]: Sanitizer | null;
4523 /**
4524 * Reference to the first LView or LContainer beneath this LView in
4525 * the hierarchy.
4526 *
4527 * Necessary to store this so views can traverse through their nested views
4528 * to remove listeners and call onDestroy callbacks.
4529 */
4530 [CHILD_HEAD]: LView | LContainer | null;
4531 /**
4532 * The last LView or LContainer beneath this LView in the hierarchy.
4533 *
4534 * The tail allows us to quickly add a new state to the end of the view list
4535 * without having to propagate starting from the first child.
4536 */
4537 [CHILD_TAIL]: LView | LContainer | null;
4538 /**
4539 * View where this view's template was declared.
4540 *
4541 * The template for a dynamically created view may be declared in a different view than
4542 * it is inserted. We already track the "insertion view" (view where the template was
4543 * inserted) in LView[PARENT], but we also need access to the "declaration view"
4544 * (view where the template was declared). Otherwise, we wouldn't be able to call the
4545 * view's template function with the proper contexts. Context should be inherited from
4546 * the declaration view tree, not the insertion view tree.
4547 *
4548 * Example (AppComponent template):
4549 *
4550 * <ng-template #foo></ng-template> <-- declared here -->
4551 * <some-comp [tpl]="foo"></some-comp> <-- inserted inside this component -->
4552 *
4553 * The <ng-template> above is declared in the AppComponent template, but it will be passed into
4554 * SomeComp and inserted there. In this case, the declaration view would be the AppComponent,
4555 * but the insertion view would be SomeComp. When we are removing views, we would want to
4556 * traverse through the insertion view to clean up listeners. When we are calling the
4557 * template function during change detection, we need the declaration view to get inherited
4558 * context.
4559 */
4560 [DECLARATION_VIEW]: LView | null;
4561 /**
4562 * Points to the declaration component view, used to track transplanted `LView`s.
4563 *
4564 * See: `DECLARATION_VIEW` which points to the actual `LView` where it was declared, whereas
4565 * `DECLARATION_COMPONENT_VIEW` points to the component which may not be same as
4566 * `DECLARATION_VIEW`.
4567 *
4568 * Example:
4569 * ```
4570 * <#VIEW #myComp>
4571 * <div *ngIf="true">
4572 * <ng-template #myTmpl>...</ng-template>
4573 * </div>
4574 * </#VIEW>
4575 * ```
4576 * In the above case `DECLARATION_VIEW` for `myTmpl` points to the `LView` of `ngIf` whereas
4577 * `DECLARATION_COMPONENT_VIEW` points to `LView` of the `myComp` which owns the template.
4578 *
4579 * The reason for this is that all embedded views are always check-always whereas the component
4580 * view can be check-always or on-push. When we have a transplanted view it is important to
4581 * determine if we have transplanted a view from check-always declaration to on-push insertion
4582 * point. In such a case the transplanted view needs to be added to the `LContainer` in the
4583 * declared `LView` and CD during the declared view CD (in addition to the CD at the insertion
4584 * point.) (Any transplanted views which are intra Component are of no interest because the CD
4585 * strategy of declaration and insertion will always be the same, because it is the same
4586 * component.)
4587 *
4588 * Queries already track moved views in `LView[DECLARATION_LCONTAINER]` and
4589 * `LContainer[MOVED_VIEWS]`. However the queries also track `LView`s which moved within the same
4590 * component `LView`. Transplanted views are a subset of moved views, and we use
4591 * `DECLARATION_COMPONENT_VIEW` to differentiate them. As in this example.
4592 *
4593 * Example showing intra component `LView` movement.
4594 * ```
4595 * <#VIEW #myComp>
4596 * <div *ngIf="condition; then thenBlock else elseBlock"></div>
4597 * <ng-template #thenBlock>Content to render when condition is true.</ng-template>
4598 * <ng-template #elseBlock>Content to render when condition is false.</ng-template>
4599 * </#VIEW>
4600 * ```
4601 * The `thenBlock` and `elseBlock` is moved but not transplanted.
4602 *
4603 * Example showing inter component `LView` movement (transplanted view).
4604 * ```
4605 * <#VIEW #myComp>
4606 * <ng-template #myTmpl>...</ng-template>
4607 * <insertion-component [template]="myTmpl"></insertion-component>
4608 * </#VIEW>
4609 * ```
4610 * In the above example `myTmpl` is passed into a different component. If `insertion-component`
4611 * instantiates `myTmpl` and `insertion-component` is on-push then the `LContainer` needs to be
4612 * marked as containing transplanted views and those views need to be CD as part of the
4613 * declaration CD.
4614 *
4615 *
4616 * When change detection runs, it iterates over `[MOVED_VIEWS]` and CDs any child `LView`s where
4617 * the `DECLARATION_COMPONENT_VIEW` of the current component and the child `LView` does not match
4618 * (it has been transplanted across components.)
4619 *
4620 * Note: `[DECLARATION_COMPONENT_VIEW]` points to itself if the LView is a component view (the
4621 * simplest / most common case).
4622 *
4623 * see also:
4624 * - https://hackmd.io/@mhevery/rJUJsvv9H write up of the problem
4625 * - `LContainer[HAS_TRANSPLANTED_VIEWS]` which marks which `LContainer` has transplanted views.
4626 * - `LContainer[TRANSPLANT_HEAD]` and `LContainer[TRANSPLANT_TAIL]` storage for transplanted
4627 * - `LView[DECLARATION_LCONTAINER]` similar problem for queries
4628 * - `LContainer[MOVED_VIEWS]` similar problem for queries
4629 */
4630 [DECLARATION_COMPONENT_VIEW]: LView;
4631 /**
4632 * A declaration point of embedded views (ones instantiated based on the content of a
4633 * <ng-template>), null for other types of views.
4634 *
4635 * We need to track all embedded views created from a given declaration point so we can prepare
4636 * query matches in a proper order (query matches are ordered based on their declaration point and
4637 * _not_ the insertion point).
4638 */
4639 [DECLARATION_LCONTAINER]: LContainer | null;
4640 /**
4641 * More flags for this view. See PreOrderHookFlags for more info.
4642 */
4643 [PREORDER_HOOK_FLAGS]: PreOrderHookFlags;
4644 /**
4645 * The number of direct transplanted views which need a refresh or have descendants themselves
4646 * that need a refresh but have not marked their ancestors as Dirty. This tells us that during
4647 * change detection we should still descend to find those children to refresh, even if the parents
4648 * are not `Dirty`/`CheckAlways`.
4649 */
4650 [TRANSPLANTED_VIEWS_TO_REFRESH]: number;
4651}
4652
4653/**
4654 * Human readable version of the `LView`.
4655 *
4656 * `LView` is a data structure used internally to keep track of views. The `LView` is designed for
4657 * efficiency and so at times it is difficult to read or write tests which assert on its values. For
4658 * this reason when `ngDevMode` is true we patch a `LView.debug` property which points to
4659 * `LViewDebug` for easier debugging and test writing. It is the intent of `LViewDebug` to be used
4660 * in tests.
4661 */
4662declare interface LViewDebug {
4663 /**
4664 * Flags associated with the `LView` unpacked into a more readable state.
4665 *
4666 * See `LViewFlags` for the flag meanings.
4667 */
4668 readonly flags: {
4669 initPhaseState: number;
4670 creationMode: boolean;
4671 firstViewPass: boolean;
4672 checkAlways: boolean;
4673 dirty: boolean;
4674 attached: boolean;
4675 destroyed: boolean;
4676 isRoot: boolean;
4677 indexWithinInitPhase: number;
4678 };
4679 /**
4680 * Associated TView
4681 */
4682 readonly tView: TView;
4683 /**
4684 * Parent view (or container)
4685 */
4686 readonly parent: LViewDebug | LContainerDebug | null;
4687 /**
4688 * Next sibling to the `LView`.
4689 */
4690 readonly next: LViewDebug | LContainerDebug | null;
4691 /**
4692 * The context used for evaluation of the `LView`
4693 *
4694 * (Usually the component)
4695 */
4696 readonly context: {} | null;
4697 /**
4698 * Hierarchical tree of nodes.
4699 */
4700 readonly nodes: DebugNode_2[];
4701 /**
4702 * Template structure (no instance data).
4703 * (Shows how TNodes are connected)
4704 */
4705 readonly template: string;
4706 /**
4707 * HTML representation of the `LView`.
4708 *
4709 * This is only approximate to actual HTML as child `LView`s are removed.
4710 */
4711 readonly html: string;
4712 /**
4713 * The host element to which this `LView` is attached.
4714 */
4715 readonly hostHTML: string | null;
4716 /**
4717 * Child `LView`s
4718 */
4719 readonly childViews: Array<LViewDebug | LContainerDebug>;
4720 /**
4721 * Sub range of `LView` containing decls (DOM elements).
4722 */
4723 readonly decls: LViewDebugRange;
4724 /**
4725 * Sub range of `LView` containing vars (bindings).
4726 */
4727 readonly vars: LViewDebugRange;
4728 /**
4729 * Sub range of `LView` containing expando (used by DI).
4730 */
4731 readonly expando: LViewDebugRange;
4732}
4733
4734/**
4735 * `LView` is subdivided to ranges where the actual data is stored. Some of these ranges such as
4736 * `decls` and `vars` are known at compile time. Other such as `i18n` and `expando` are runtime only
4737 * concepts.
4738 */
4739declare interface LViewDebugRange {
4740 /**
4741 * The starting index in `LView` where the range begins. (Inclusive)
4742 */
4743 start: number;
4744 /**
4745 * The ending index in `LView` where the range ends. (Exclusive)
4746 */
4747 end: number;
4748 /**
4749 * The length of the range
4750 */
4751 length: number;
4752 /**
4753 * The merged content of the range. `t` contains data from `TView.data` and `l` contains `LView`
4754 * data at an index.
4755 */
4756 content: LViewDebugRangeContent[];
4757}
4758
4759/**
4760 * For convenience the static and instance portions of `TView` and `LView` are merged into a single
4761 * object in `LViewRange`.
4762 */
4763declare interface LViewDebugRangeContent {
4764 /**
4765 * Index into original `LView` or `TView.data`.
4766 */
4767 index: number;
4768 /**
4769 * Value from the `TView.data[index]` location.
4770 */
4771 t: any;
4772 /**
4773 * Value from the `LView[index]` location.
4774 */
4775 l: any;
4776}
4777
4778/** Flags associated with an LView (saved in LView[FLAGS]) */
4779declare const enum LViewFlags {
4780 /** The state of the init phase on the first 2 bits */
4781 InitPhaseStateIncrementer = 1,
4782 InitPhaseStateMask = 3,
4783 /**
4784 * Whether or not the view is in creationMode.
4785 *
4786 * This must be stored in the view rather than using `data` as a marker so that
4787 * we can properly support embedded views. Otherwise, when exiting a child view
4788 * back into the parent view, `data` will be defined and `creationMode` will be
4789 * improperly reported as false.
4790 */
4791 CreationMode = 4,
4792 /**
4793 * Whether or not this LView instance is on its first processing pass.
4794 *
4795 * An LView instance is considered to be on its "first pass" until it
4796 * has completed one creation mode run and one update mode run. At this
4797 * time, the flag is turned off.
4798 */
4799 FirstLViewPass = 8,
4800 /** Whether this view has default change detection strategy (checks always) or onPush */
4801 CheckAlways = 16,
4802 /**
4803 * Whether or not manual change detection is turned on for onPush components.
4804 *
4805 * This is a special mode that only marks components dirty in two cases:
4806 * 1) There has been a change to an @Input property
4807 * 2) `markDirty()` has been called manually by the user
4808 *
4809 * Note that in this mode, the firing of events does NOT mark components
4810 * dirty automatically.
4811 *
4812 * Manual mode is turned off by default for backwards compatibility, as events
4813 * automatically mark OnPush components dirty in View Engine.
4814 *
4815 * TODO: Add a public API to ChangeDetectionStrategy to turn this mode on
4816 */
4817 ManualOnPush = 32,
4818 /** Whether or not this view is currently dirty (needing check) */
4819 Dirty = 64,
4820 /** Whether or not this view is currently attached to change detection tree. */
4821 Attached = 128,
4822 /** Whether or not this view is destroyed. */
4823 Destroyed = 256,
4824 /** Whether or not this view is the root view */
4825 IsRoot = 512,
4826 /**
4827 * Whether this moved LView was needs to be refreshed at the insertion location because the
4828 * declaration was dirty.
4829 */
4830 RefreshTransplantedView = 1024,
4831 /**
4832 * Index of the current init phase on last 21 bits
4833 */
4834 IndexWithinInitPhaseIncrementer = 2048,
4835 IndexWithinInitPhaseShift = 11,
4836 IndexWithinInitPhaseReset = 2047
4837}
4838
4839/**
4840 * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
4841 * that the compiler should use in case of missing translations:
4842 * - Error: throw if you have missing translations.
4843 * - Warning (default): show a warning in the console and/or shell.
4844 * - Ignore: do nothing.
4845 *
4846 * See the [i18n guide](guide/i18n-common-merge#report-missing-translations) for more information.
4847 *
4848 * @usageNotes
4849 * ### Example
4850 * ```typescript
4851 * import { MissingTranslationStrategy } from '@angular/core';
4852 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4853 * import { AppModule } from './app/app.module';
4854 *
4855 * platformBrowserDynamic().bootstrapModule(AppModule, {
4856 * missingTranslation: MissingTranslationStrategy.Error
4857 * });
4858 * ```
4859 *
4860 * @publicApi
4861 */
4862export declare enum MissingTranslationStrategy {
4863 Error = 0,
4864 Warning = 1,
4865 Ignore = 2
4866}
4867
4868/**
4869 * Combination of NgModuleFactory and ComponentFactories.
4870 *
4871 * @publicApi
4872 *
4873 * @deprecated
4874 * Ivy JIT mode doesn't require accessing this symbol.
4875 * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for
4876 * additional context.
4877 */
4878export declare class ModuleWithComponentFactories<T> {
4879 ngModuleFactory: NgModuleFactory<T>;
4880 componentFactories: ComponentFactory<any>[];
4881 constructor(ngModuleFactory: NgModuleFactory<T>, componentFactories: ComponentFactory<any>[]);
4882}
4883
4884/**
4885 * A wrapper around an NgModule that associates it with [providers](guide/glossary#provider
4886 * "Definition"). Usage without a generic type is deprecated.
4887 *
4888 * @see [Deprecations](guide/deprecations#modulewithproviders-type-without-a-generic)
4889 *
4890 * @publicApi
4891 */
4892export declare interface ModuleWithProviders<T> {
4893 ngModule: Type<T>;
4894 providers?: Provider[];
4895}
4896
4897declare const MOVED_VIEWS = 9;
4898
4899declare const NATIVE = 7;
4900
4901declare const NEXT = 4;
4902
4903declare interface NgContentDef {
4904 /**
4905 * this index is checked against NodeDef.ngContentIndex to find the nodes
4906 * that are matched by this ng-content.
4907 * Note that a NodeDef with an ng-content can be reprojected, i.e.
4908 * have a ngContentIndex on its own.
4909 */
4910 index: number;
4911}
4912
4913/**
4914 * A type describing supported iterable types.
4915 *
4916 * @publicApi
4917 */
4918export declare type NgIterable<T> = Array<T> | Iterable<T>;
4919
4920/**
4921 * Type of the NgModule metadata.
4922 *
4923 * @publicApi
4924 */
4925export declare interface NgModule {
4926 /**
4927 * The set of injectable objects that are available in the injector
4928 * of this module.
4929 *
4930 * @see [Dependency Injection guide](guide/dependency-injection)
4931 * @see [NgModule guide](guide/providers)
4932 *
4933 * @usageNotes
4934 *
4935 * Dependencies whose providers are listed here become available for injection
4936 * into any component, directive, pipe or service that is a child of this injector.
4937 * The NgModule used for bootstrapping uses the root injector, and can provide dependencies
4938 * to any part of the app.
4939 *
4940 * A lazy-loaded module has its own injector, typically a child of the app root injector.
4941 * Lazy-loaded services are scoped to the lazy-loaded module's injector.
4942 * If a lazy-loaded module also provides the `UserService`, any component created
4943 * within that module's context (such as by router navigation) gets the local instance
4944 * of the service, not the instance in the root injector.
4945 * Components in external modules continue to receive the instance provided by their injectors.
4946 *
4947 * ### Example
4948 *
4949 * The following example defines a class that is injected in
4950 * the HelloWorld NgModule:
4951 *
4952 * ```
4953 * class Greeter {
4954 * greet(name:string) {
4955 * return 'Hello ' + name + '!';
4956 * }
4957 * }
4958 *
4959 * @NgModule({
4960 * providers: [
4961 * Greeter
4962 * ]
4963 * })
4964 * class HelloWorld {
4965 * greeter:Greeter;
4966 *
4967 * constructor(greeter:Greeter) {
4968 * this.greeter = greeter;
4969 * }
4970 * }
4971 * ```
4972 */
4973 providers?: Provider[];
4974 /**
4975 * The set of components, directives, and pipes ([declarables](guide/glossary#declarable))
4976 * that belong to this module.
4977 *
4978 * @usageNotes
4979 *
4980 * The set of selectors that are available to a template include those declared here, and
4981 * those that are exported from imported NgModules.
4982 *
4983 * Declarables must belong to exactly one module.
4984 * The compiler emits an error if you try to declare the same class in more than one module.
4985 * Be careful not to declare a class that is imported from another module.
4986 *
4987 * ### Example
4988 *
4989 * The following example allows the CommonModule to use the `NgFor`
4990 * directive.
4991 *
4992 * ```javascript
4993 * @NgModule({
4994 * declarations: [NgFor]
4995 * })
4996 * class CommonModule {
4997 * }
4998 * ```
4999 */
5000 declarations?: Array<Type<any> | any[]>;
5001 /**
5002 * The set of NgModules whose exported [declarables](guide/glossary#declarable)
5003 * are available to templates in this module.
5004 *
5005 * @usageNotes
5006 *
5007 * A template can use exported declarables from any
5008 * imported module, including those from modules that are imported indirectly
5009 * and re-exported.
5010 * For example, `ModuleA` imports `ModuleB`, and also exports
5011 * it, which makes the declarables from `ModuleB` available
5012 * wherever `ModuleA` is imported.
5013 *
5014 * ### Example
5015 *
5016 * The following example allows MainModule to use anything exported by
5017 * `CommonModule`:
5018 *
5019 * ```javascript
5020 * @NgModule({
5021 * imports: [CommonModule]
5022 * })
5023 * class MainModule {
5024 * }
5025 * ```
5026 *
5027 */
5028 imports?: Array<Type<any> | ModuleWithProviders<{}> | any[]>;
5029 /**
5030 * The set of components, directives, and pipes declared in this
5031 * NgModule that can be used in the template of any component that is part of an
5032 * NgModule that imports this NgModule. Exported declarations are the module's public API.
5033 *
5034 * A declarable belongs to one and only one NgModule.
5035 * A module can list another module among its exports, in which case all of that module's
5036 * public declaration are exported.
5037 *
5038 * @usageNotes
5039 *
5040 * Declarations are private by default.
5041 * If this ModuleA does not export UserComponent, then only the components within this
5042 * ModuleA can use UserComponent.
5043 *
5044 * ModuleA can import ModuleB and also export it, making exports from ModuleB
5045 * available to an NgModule that imports ModuleA.
5046 *
5047 * ### Example
5048 *
5049 * The following example exports the `NgFor` directive from CommonModule.
5050 *
5051 * ```javascript
5052 * @NgModule({
5053 * exports: [NgFor]
5054 * })
5055 * class CommonModule {
5056 * }
5057 * ```
5058 */
5059 exports?: Array<Type<any> | any[]>;
5060 /**
5061 * The set of components to compile when this NgModule is defined,
5062 * so that they can be dynamically loaded into the view.
5063 *
5064 * For each component listed here, Angular creates a `ComponentFactory`
5065 * and stores it in the `ComponentFactoryResolver`.
5066 *
5067 * Angular automatically adds components in the module's bootstrap
5068 * and route definitions into the `entryComponents` list. Use this
5069 * option to add components that are bootstrapped
5070 * using one of the imperative techniques, such as `ViewContainerRef.createComponent()`.
5071 *
5072 * @see [Entry Components](guide/entry-components)
5073 * @deprecated
5074 * Since 9.0.0. With Ivy, this property is no longer necessary.
5075 * (You may need to keep these if building a library that will be consumed by a View Engine
5076 * application.)
5077 */
5078 entryComponents?: Array<Type<any> | any[]>;
5079 /**
5080 * The set of components that are bootstrapped when
5081 * this module is bootstrapped. The components listed here
5082 * are automatically added to `entryComponents`.
5083 */
5084 bootstrap?: Array<Type<any> | any[]>;
5085 /**
5086 * The set of schemas that declare elements to be allowed in the NgModule.
5087 * Elements and properties that are neither Angular components nor directives
5088 * must be declared in a schema.
5089 *
5090 * Allowed value are `NO_ERRORS_SCHEMA` and `CUSTOM_ELEMENTS_SCHEMA`.
5091 *
5092 * @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA`
5093 * you must ensure that allowed elements and properties securely escape inputs.
5094 */
5095 schemas?: Array<SchemaMetadata | any[]>;
5096 /**
5097 * A name or path that uniquely identifies this NgModule in `getNgModuleById`.
5098 * If left `undefined`, the NgModule is not registered with `getNgModuleById`.
5099 */
5100 id?: string;
5101 /**
5102 * When present, this module is ignored by the AOT compiler.
5103 * It remains in distributed code, and the JIT compiler attempts to compile it
5104 * at run time, in the browser.
5105 * To ensure the correct behavior, the app must import `@angular/compiler`.
5106 */
5107 jit?: true;
5108}
5109
5110/**
5111 * @Annotation
5112 * @publicApi
5113 */
5114export declare const NgModule: NgModuleDecorator;
5115
5116/**
5117 * Type of the NgModule decorator / constructor function.
5118 *
5119 * @publicApi
5120 */
5121export declare interface NgModuleDecorator {
5122 /**
5123 * Decorator that marks a class as an NgModule and supplies configuration metadata.
5124 */
5125 (obj?: NgModule): TypeDecorator;
5126 new (obj?: NgModule): NgModule;
5127}
5128
5129declare interface NgModuleDefinition extends Definition<NgModuleDefinitionFactory> {
5130 providers: NgModuleProviderDef[];
5131 providersByKey: {
5132 [tokenKey: string]: NgModuleProviderDef;
5133 };
5134 modules: any[];
5135 scope: 'root' | 'platform' | null;
5136}
5137
5138declare interface NgModuleDefinitionFactory extends DefinitionFactory<NgModuleDefinition> {
5139}
5140
5141/**
5142 * @publicApi
5143 *
5144 * @deprecated
5145 * This class was mostly used as a part of ViewEngine-based JIT API and is no longer needed in Ivy
5146 * JIT mode. See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes)
5147 * for additional context. Angular provides APIs that accept NgModule classes directly (such as
5148 * [PlatformRef.bootstrapModule](api/core/PlatformRef#bootstrapModule) and
5149 * [createNgModuleRef](api/core/createNgModuleRef)), consider switching to those APIs instead of
5150 * using factory-based ones.
5151 */
5152export declare abstract class NgModuleFactory<T> {
5153 abstract get moduleType(): Type<T>;
5154 abstract create(parentInjector: Injector | null): NgModuleRef<T>;
5155}
5156
5157declare interface NgModuleProviderDef {
5158 flags: ɵNodeFlags;
5159 index: number;
5160 token: any;
5161 value: any;
5162 deps: DepDef[];
5163}
5164
5165/**
5166 * Represents an instance of an `NgModule` created by an `NgModuleFactory`.
5167 * Provides access to the `NgModule` instance and related objects.
5168 *
5169 * @publicApi
5170 */
5171export declare abstract class NgModuleRef<T> {
5172 /**
5173 * The injector that contains all of the providers of the `NgModule`.
5174 */
5175 abstract get injector(): Injector;
5176 /**
5177 * The resolver that can retrieve the component factories
5178 * declared in the `entryComponents` property of the module.
5179 */
5180 abstract get componentFactoryResolver(): ComponentFactoryResolver;
5181 /**
5182 * The `NgModule` instance.
5183 */
5184 abstract get instance(): T;
5185 /**
5186 * Destroys the module instance and all of the data structures associated with it.
5187 */
5188 abstract destroy(): void;
5189 /**
5190 * Registers a callback to be executed when the module is destroyed.
5191 */
5192 abstract onDestroy(callback: () => void): void;
5193}
5194
5195/**
5196 * A token for third-party components that can register themselves with NgProbe.
5197 *
5198 * @publicApi
5199 */
5200export declare class NgProbeToken {
5201 name: string;
5202 token: any;
5203 constructor(name: string, token: any);
5204}
5205
5206/**
5207 * An injectable service for executing work inside or outside of the Angular zone.
5208 *
5209 * The most common use of this service is to optimize performance when starting a work consisting of
5210 * one or more asynchronous tasks that don't require UI updates or error handling to be handled by
5211 * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks
5212 * can reenter the Angular zone via {@link #run}.
5213 *
5214 * <!-- TODO: add/fix links to:
5215 * - docs explaining zones and the use of zones in Angular and change-detection
5216 * - link to runOutsideAngular/run (throughout this file!)
5217 * -->
5218 *
5219 * @usageNotes
5220 * ### Example
5221 *
5222 * ```
5223 * import {Component, NgZone} from '@angular/core';
5224 * import {NgIf} from '@angular/common';
5225 *
5226 * @Component({
5227 * selector: 'ng-zone-demo',
5228 * template: `
5229 * <h2>Demo: NgZone</h2>
5230 *
5231 * <p>Progress: {{progress}}%</p>
5232 * <p *ngIf="progress >= 100">Done processing {{label}} of Angular zone!</p>
5233 *
5234 * <button (click)="processWithinAngularZone()">Process within Angular zone</button>
5235 * <button (click)="processOutsideOfAngularZone()">Process outside of Angular zone</button>
5236 * `,
5237 * })
5238 * export class NgZoneDemo {
5239 * progress: number = 0;
5240 * label: string;
5241 *
5242 * constructor(private _ngZone: NgZone) {}
5243 *
5244 * // Loop inside the Angular zone
5245 * // so the UI DOES refresh after each setTimeout cycle
5246 * processWithinAngularZone() {
5247 * this.label = 'inside';
5248 * this.progress = 0;
5249 * this._increaseProgress(() => console.log('Inside Done!'));
5250 * }
5251 *
5252 * // Loop outside of the Angular zone
5253 * // so the UI DOES NOT refresh after each setTimeout cycle
5254 * processOutsideOfAngularZone() {
5255 * this.label = 'outside';
5256 * this.progress = 0;
5257 * this._ngZone.runOutsideAngular(() => {
5258 * this._increaseProgress(() => {
5259 * // reenter the Angular zone and display done
5260 * this._ngZone.run(() => { console.log('Outside Done!'); });
5261 * });
5262 * });
5263 * }
5264 *
5265 * _increaseProgress(doneCallback: () => void) {
5266 * this.progress += 1;
5267 * console.log(`Current progress: ${this.progress}%`);
5268 *
5269 * if (this.progress < 100) {
5270 * window.setTimeout(() => this._increaseProgress(doneCallback), 10);
5271 * } else {
5272 * doneCallback();
5273 * }
5274 * }
5275 * }
5276 * ```
5277 *
5278 * @publicApi
5279 */
5280export declare class NgZone {
5281 readonly hasPendingMacrotasks: boolean;
5282 readonly hasPendingMicrotasks: boolean;
5283 /**
5284 * Whether there are no outstanding microtasks or macrotasks.
5285 */
5286 readonly isStable: boolean;
5287 /**
5288 * Notifies when code enters Angular Zone. This gets fired first on VM Turn.
5289 */
5290 readonly onUnstable: EventEmitter<any>;
5291 /**
5292 * Notifies when there is no more microtasks enqueued in the current VM Turn.
5293 * This is a hint for Angular to do change detection, which may enqueue more microtasks.
5294 * For this reason this event can fire multiple times per VM Turn.
5295 */
5296 readonly onMicrotaskEmpty: EventEmitter<any>;
5297 /**
5298 * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
5299 * implies we are about to relinquish VM turn.
5300 * This event gets called just once.
5301 */
5302 readonly onStable: EventEmitter<any>;
5303 /**
5304 * Notifies that an error has been delivered.
5305 */
5306 readonly onError: EventEmitter<any>;
5307 constructor({ enableLongStackTrace, shouldCoalesceEventChangeDetection, shouldCoalesceRunChangeDetection }: {
5308 enableLongStackTrace?: boolean | undefined;
5309 shouldCoalesceEventChangeDetection?: boolean | undefined;
5310 shouldCoalesceRunChangeDetection?: boolean | undefined;
5311 });
5312 static isInAngularZone(): boolean;
5313 static assertInAngularZone(): void;
5314 static assertNotInAngularZone(): void;
5315 /**
5316 * Executes the `fn` function synchronously within the Angular zone and returns value returned by
5317 * the function.
5318 *
5319 * Running functions via `run` allows you to reenter Angular zone from a task that was executed
5320 * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
5321 *
5322 * Any future tasks or microtasks scheduled from within this function will continue executing from
5323 * within the Angular zone.
5324 *
5325 * If a synchronous error happens it will be rethrown and not reported via `onError`.
5326 */
5327 run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
5328 /**
5329 * Executes the `fn` function synchronously within the Angular zone as a task and returns value
5330 * returned by the function.
5331 *
5332 * Running functions via `run` allows you to reenter Angular zone from a task that was executed
5333 * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
5334 *
5335 * Any future tasks or microtasks scheduled from within this function will continue executing from
5336 * within the Angular zone.
5337 *
5338 * If a synchronous error happens it will be rethrown and not reported via `onError`.
5339 */
5340 runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T;
5341 /**
5342 * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
5343 * rethrown.
5344 */
5345 runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
5346 /**
5347 * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
5348 * the function.
5349 *
5350 * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
5351 * work that
5352 * doesn't trigger Angular change-detection or is subject to Angular's error handling.
5353 *
5354 * Any future tasks or microtasks scheduled from within this function will continue executing from
5355 * outside of the Angular zone.
5356 *
5357 * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
5358 */
5359 runOutsideAngular<T>(fn: (...args: any[]) => T): T;
5360}
5361
5362/**
5363 * Defines a schema that allows any property on any element.
5364 *
5365 * This schema allows you to ignore the errors related to any unknown elements or properties in a
5366 * template. The usage of this schema is generally discouraged because it prevents useful validation
5367 * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.
5368 *
5369 * @publicApi
5370 */
5371export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
5372
5373declare interface NodeCheckFn {
5374 (view: ViewData, nodeIndex: number, argStyle: ɵArgumentType.Dynamic, values: any[]): any;
5375 (view: ViewData, nodeIndex: number, argStyle: ɵArgumentType.Inline, v0?: any, v1?: any, v2?: any, v3?: any, v4?: any, v5?: any, v6?: any, v7?: any, v8?: any, v9?: any): any;
5376}
5377
5378/**
5379 * Node instance data.
5380 *
5381 * We have a separate type per NodeType to save memory
5382 * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>)
5383 *
5384 * To keep our code monomorphic,
5385 * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...).
5386 * This way, no usage site can get a `NodeData` from view.nodes and then use it for different
5387 * purposes.
5388 */
5389declare class NodeData {
5390 private __brand;
5391}
5392
5393/**
5394 * A node definition in the view.
5395 *
5396 * Note: We use one type for all nodes so that loops that loop over all nodes
5397 * of a ViewDefinition stay monomorphic!
5398 */
5399declare interface NodeDef {
5400 flags: ɵNodeFlags;
5401 nodeIndex: number;
5402 checkIndex: number;
5403 parent: NodeDef | null;
5404 renderParent: NodeDef | null;
5405 /** this is checked against NgContentDef.index to find matched nodes */
5406 ngContentIndex: number | null;
5407 /** number of transitive children */
5408 childCount: number;
5409 /** aggregated NodeFlags for all transitive children (does not include self) **/
5410 childFlags: ɵNodeFlags;
5411 /** aggregated NodeFlags for all direct children (does not include self) **/
5412 directChildFlags: ɵNodeFlags;
5413 bindingIndex: number;
5414 bindings: BindingDef[];
5415 bindingFlags: ɵBindingFlags;
5416 outputIndex: number;
5417 outputs: OutputDef[];
5418 /**
5419 * references that the user placed on the element
5420 */
5421 references: {
5422 [refId: string]: ɵQueryValueType;
5423 };
5424 /**
5425 * ids and value types of all queries that are matched by this node.
5426 */
5427 matchedQueries: {
5428 [queryId: number]: ɵQueryValueType;
5429 };
5430 /** Binary or of all matched query ids of this node. */
5431 matchedQueryIds: number;
5432 /**
5433 * Binary or of all query ids that are matched by one of the children.
5434 * This includes query ids from templates as well.
5435 * Used as a bloom filter.
5436 */
5437 childMatchedQueries: number;
5438 element: ElementDef | null;
5439 provider: ProviderDef | null;
5440 text: TextDef | null;
5441 query: QueryDef | null;
5442 ngContent: NgContentDef | null;
5443}
5444
5445declare interface NodeInjectorDebug {
5446 /**
5447 * Instance bloom. Does the current injector have a provider with a given bloom mask.
5448 */
5449 bloom: string;
5450 /**
5451 * Cumulative bloom. Do any of the above injectors have a provider with a given bloom mask.
5452 */
5453 cumulativeBloom: string;
5454 /**
5455 * A list of providers associated with this injector.
5456 */
5457 providers: (Type<unknown> | ɵDirectiveDef<unknown> | ɵComponentDef<unknown>)[];
5458 /**
5459 * A list of providers associated with this injector visible to the view of the component only.
5460 */
5461 viewProviders: Type<unknown>[];
5462 /**
5463 * Location of the parent `TNode`.
5464 */
5465 parentInjectorIndex: number;
5466}
5467
5468/**
5469 * Function to call console.error at the right source location. This is an indirection
5470 * via another function as browser will log the location that actually called
5471 * `console.error`.
5472 */
5473declare interface NodeLogger {
5474 (): () => void;
5475}
5476
5477/**
5478 * Object Oriented style of API needed to create elements and text nodes.
5479 *
5480 * This is the native browser API style, e.g. operations are methods on individual objects
5481 * like HTMLElement. With this style, no additional code is needed as a facade
5482 * (reducing payload size).
5483 * */
5484declare interface ObjectOrientedRenderer3 {
5485 createComment(data: string): RComment;
5486 createElement(tagName: string): RElement;
5487 createElementNS(namespace: string, tagName: string): RElement;
5488 createTextNode(data: string): RText;
5489 querySelector(selectors: string): RElement | null;
5490}
5491
5492/**
5493 * @description
5494 * A lifecycle hook that is called when any data-bound property of a directive changes.
5495 * Define an `ngOnChanges()` method to handle the changes.
5496 *
5497 * @see `DoCheck`
5498 * @see `OnInit`
5499 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
5500 *
5501 * @usageNotes
5502 * The following snippet shows how a component can implement this interface to
5503 * define an on-changes handler for an input property.
5504 *
5505 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnChanges'}
5506 *
5507 * @publicApi
5508 */
5509export declare interface OnChanges {
5510 /**
5511 * A callback method that is invoked immediately after the
5512 * default change detector has checked data-bound properties
5513 * if at least one has changed, and before the view and content
5514 * children are checked.
5515 * @param changes The changed properties.
5516 */
5517 ngOnChanges(changes: SimpleChanges): void;
5518}
5519
5520/**
5521 * A lifecycle hook that is called when a directive, pipe, or service is destroyed.
5522 * Use for any custom cleanup that needs to occur when the
5523 * instance is destroyed.
5524 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
5525 *
5526 * @usageNotes
5527 * The following snippet shows how a component can implement this interface
5528 * to define its own custom clean-up method.
5529 *
5530 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'}
5531 *
5532 * @publicApi
5533 */
5534export declare interface OnDestroy {
5535 /**
5536 * A callback method that performs custom clean-up, invoked immediately
5537 * before a directive, pipe, or service instance is destroyed.
5538 */
5539 ngOnDestroy(): void;
5540}
5541
5542/**
5543 * @description
5544 * A lifecycle hook that is called after Angular has initialized
5545 * all data-bound properties of a directive.
5546 * Define an `ngOnInit()` method to handle any additional initialization tasks.
5547 *
5548 * @see `AfterContentInit`
5549 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
5550 *
5551 * @usageNotes
5552 * The following snippet shows how a component can implement this interface to
5553 * define its own initialization method.
5554 *
5555 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'}
5556 *
5557 * @publicApi
5558 */
5559export declare interface OnInit {
5560 /**
5561 * A callback method that is invoked immediately after the
5562 * default change detector has checked the directive's
5563 * data-bound properties for the first time,
5564 * and before any of the view or content children have been checked.
5565 * It is invoked only once when the directive is instantiated.
5566 */
5567 ngOnInit(): void;
5568}
5569
5570declare type OpaqueValue = unknown;
5571
5572declare interface OpaqueViewState {
5573 '__brand__': 'Brand for OpaqueViewState that nothing will match';
5574}
5575
5576/**
5577 * Type of the Optional metadata.
5578 *
5579 * @publicApi
5580 */
5581export declare interface Optional {
5582}
5583
5584/**
5585 * Optional decorator and metadata.
5586 *
5587 * @Annotation
5588 * @publicApi
5589 */
5590export declare const Optional: OptionalDecorator;
5591
5592/**
5593 * Type of the Optional decorator / constructor function.
5594 *
5595 * @publicApi
5596 */
5597export declare interface OptionalDecorator {
5598 /**
5599 * Parameter decorator to be used on constructor parameters,
5600 * which marks the parameter as being an optional dependency.
5601 * The DI framework provides `null` if the dependency is not found.
5602 *
5603 * Can be used together with other parameter decorators
5604 * that modify how dependency injection operates.
5605 *
5606 * @usageNotes
5607 *
5608 * The following code allows the possibility of a `null` result:
5609 *
5610 * <code-example path="core/di/ts/metadata_spec.ts" region="Optional">
5611 * </code-example>
5612 *
5613 * @see ["Dependency Injection Guide"](guide/dependency-injection).
5614 */
5615 (): any;
5616 new (): Optional;
5617}
5618
5619/**
5620 * Type of the Output metadata.
5621 *
5622 * @publicApi
5623 */
5624export declare interface Output {
5625 /**
5626 * The name of the DOM property to which the output property is bound.
5627 */
5628 bindingPropertyName?: string;
5629}
5630
5631/**
5632 * @Annotation
5633 * @publicApi
5634 */
5635export declare const Output: OutputDecorator;
5636
5637/**
5638 * Type of the Output decorator / constructor function.
5639 *
5640 * @publicApi
5641 */
5642export declare interface OutputDecorator {
5643 /**
5644 * Decorator that marks a class field as an output property and supplies configuration metadata.
5645 * The DOM property bound to the output property is automatically updated during change detection.
5646 *
5647 * @usageNotes
5648 *
5649 * You can supply an optional name to use in templates when the
5650 * component is instantiated, that maps to the
5651 * name of the bound property. By default, the original
5652 * name of the bound property is used for output binding.
5653 *
5654 * See `Input` decorator for an example of providing a binding name.
5655 *
5656 * @see [Input and Output properties](guide/inputs-outputs)
5657 *
5658 */
5659 (bindingPropertyName?: string): any;
5660 new (bindingPropertyName?: string): any;
5661}
5662
5663declare interface OutputDef {
5664 type: OutputType;
5665 target: 'window' | 'document' | 'body' | 'component' | null;
5666 eventName: string;
5667 propName: string | null;
5668}
5669
5670declare const enum OutputType {
5671 ElementOutput = 0,
5672 DirectiveOutput = 1
5673}
5674
5675/**
5676 * A [DI token](guide/glossary#di-token "DI token definition") that indicates the root directory of
5677 * the application
5678 * @publicApi
5679 */
5680export declare const PACKAGE_ROOT_URL: InjectionToken<string>;
5681
5682declare const PARENT = 3;
5683
5684/**
5685 * Type of the Pipe metadata.
5686 *
5687 * @publicApi
5688 */
5689export declare interface Pipe {
5690 /**
5691 * The pipe name to use in template bindings.
5692 * Typically uses [lowerCamelCase](guide/glossary#case-types)
5693 * because the name cannot contain hyphens.
5694 */
5695 name: string;
5696 /**
5697 * When true, the pipe is pure, meaning that the
5698 * `transform()` method is invoked only when its input arguments
5699 * change. Pipes are pure by default.
5700 *
5701 * If the pipe has internal state (that is, the result
5702 * depends on state other than its arguments), set `pure` to false.
5703 * In this case, the pipe is invoked on each change-detection cycle,
5704 * even if the arguments have not changed.
5705 */
5706 pure?: boolean;
5707}
5708
5709/**
5710 * @Annotation
5711 * @publicApi
5712 */
5713export declare const Pipe: PipeDecorator;
5714
5715/**
5716 * Type of the Pipe decorator / constructor function.
5717 *
5718 * @publicApi
5719 */
5720export declare interface PipeDecorator {
5721 /**
5722 *
5723 * Decorator that marks a class as pipe and supplies configuration metadata.
5724 *
5725 * A pipe class must implement the `PipeTransform` interface.
5726 * For example, if the name is "myPipe", use a template binding expression
5727 * such as the following:
5728 *
5729 * ```
5730 * {{ exp | myPipe }}
5731 * ```
5732 *
5733 * The result of the expression is passed to the pipe's `transform()` method.
5734 *
5735 * A pipe must belong to an NgModule in order for it to be available
5736 * to a template. To make it a member of an NgModule,
5737 * list it in the `declarations` field of the `NgModule` metadata.
5738 *
5739 * @see [Style Guide: Pipe Names](guide/styleguide#02-09)
5740 *
5741 */
5742 (obj: Pipe): TypeDecorator;
5743 /**
5744 * See the `Pipe` decorator.
5745 */
5746 new (obj: Pipe): Pipe;
5747}
5748
5749declare type PipeDefList = ɵPipeDef<any>[];
5750
5751/**
5752 * Type used for PipeDefs on component definition.
5753 *
5754 * The function is necessary to be able to support forward declarations.
5755 */
5756declare type PipeDefListOrFactory = (() => PipeDefList) | PipeDefList;
5757
5758
5759/**
5760 * An interface that is implemented by pipes in order to perform a transformation.
5761 * Angular invokes the `transform` method with the value of a binding
5762 * as the first argument, and any parameters as the second argument in list form.
5763 *
5764 * @usageNotes
5765 *
5766 * In the following example, `TruncatePipe` returns the shortened value with an added ellipses.
5767 *
5768 * <code-example path="core/ts/pipes/simple_truncate.ts" header="simple_truncate.ts"></code-example>
5769 *
5770 * Invoking `{{ 'It was the best of times' | truncate }}` in a template will produce `It was...`.
5771 *
5772 * In the following example, `TruncatePipe` takes parameters that sets the truncated length and the
5773 * string to append with.
5774 *
5775 * <code-example path="core/ts/pipes/truncate.ts" header="truncate.ts"></code-example>
5776 *
5777 * Invoking `{{ 'It was the best of times' | truncate:4:'....' }}` in a template will produce `It
5778 * was the best....`.
5779 *
5780 * @publicApi
5781 */
5782export declare interface PipeTransform {
5783 transform(value: any, ...args: any[]): any;
5784}
5785
5786/**
5787 * A subclass of `Type` which has a static `ɵpipe`:`PipeDef` field making it
5788 * consumable for rendering.
5789 */
5790declare interface PipeType<T> extends Type<T> {
5791 ɵpipe: unknown;
5792}
5793
5794declare type PipeTypeList = (PipeType<any> | Type<any>)[];
5795
5796declare type PipeTypesOrFactory = (() => PipeTypeList) | PipeTypeList;
5797
5798/**
5799 * A token that indicates an opaque platform ID.
5800 * @publicApi
5801 */
5802export declare const PLATFORM_ID: InjectionToken<Object>;
5803
5804/**
5805 * A function that is executed when a platform is initialized.
5806 * @publicApi
5807 */
5808export declare const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>;
5809
5810/**
5811 * This platform has to be included in any other platform
5812 *
5813 * @publicApi
5814 */
5815export declare const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
5816
5817/**
5818 * The Angular platform is the entry point for Angular on a web page.
5819 * Each page has exactly one platform. Services (such as reflection) which are common
5820 * to every Angular application running on the page are bound in its scope.
5821 * A page's platform is initialized implicitly when a platform is created using a platform
5822 * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.
5823 *
5824 * @publicApi
5825 */
5826export declare class PlatformRef {
5827 private _injector;
5828 private _modules;
5829 private _destroyListeners;
5830 private _destroyed;
5831 /**
5832 * Creates an instance of an `@NgModule` for the given platform for offline compilation.
5833 *
5834 * @usageNotes
5835 *
5836 * The following example creates the NgModule for a browser platform.
5837 *
5838 * ```typescript
5839 * my_module.ts:
5840 *
5841 * @NgModule({
5842 * imports: [BrowserModule]
5843 * })
5844 * class MyModule {}
5845 *
5846 * main.ts:
5847 * import {MyModuleNgFactory} from './my_module.ngfactory';
5848 * import {platformBrowser} from '@angular/platform-browser';
5849 *
5850 * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
5851 * ```
5852 *
5853 * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function
5854 * argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.
5855 */
5856 bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions): Promise<NgModuleRef<M>>;
5857 /**
5858 * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
5859 *
5860 * @usageNotes
5861 * ### Simple Example
5862 *
5863 * ```typescript
5864 * @NgModule({
5865 * imports: [BrowserModule]
5866 * })
5867 * class MyModule {}
5868 *
5869 * let moduleRef = platformBrowser().bootstrapModule(MyModule);
5870 * ```
5871 *
5872 */
5873 bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>;
5874 private _moduleDoBootstrap;
5875 /**
5876 * Registers a listener to be called when the platform is destroyed.
5877 */
5878 onDestroy(callback: () => void): void;
5879 /**
5880 * Retrieves the platform {@link Injector}, which is the parent injector for
5881 * every Angular application on the page and provides singleton providers.
5882 */
5883 get injector(): Injector;
5884 /**
5885 * Destroys the current Angular platform and all Angular applications on the page.
5886 * Destroys all modules and listeners registered with the platform.
5887 */
5888 destroy(): void;
5889 get destroyed(): boolean;
5890 static ɵfac: i0.ɵɵFactoryDeclaration<PlatformRef, never>;
5891 static ɵprov: i0.ɵɵInjectableDeclaration<PlatformRef>;
5892}
5893
5894declare interface PlatformReflectionCapabilities {
5895 isReflectionEnabled(): boolean;
5896 factory(type: Type<any>): Function;
5897 hasLifecycleHook(type: any, lcProperty: string): boolean;
5898 guards(type: any): {
5899 [key: string]: any;
5900 };
5901 /**
5902 * Return a list of annotations/types for constructor parameters
5903 */
5904 parameters(type: Type<any>): any[][];
5905 /**
5906 * Return a list of annotations declared on the class
5907 */
5908 annotations(type: Type<any>): any[];
5909 /**
5910 * Return a object literal which describes the annotations on Class fields/properties.
5911 */
5912 propMetadata(typeOrFunc: Type<any>): {
5913 [key: string]: any[];
5914 };
5915 getter(name: string): ɵGetterFn;
5916 setter(name: string): ɵSetterFn;
5917 method(name: string): ɵMethodFn;
5918 importUri(type: Type<any>): string;
5919 resourceUri(type: Type<any>): string;
5920 resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any;
5921 resolveEnum(enumIdentifier: any, name: string): any;
5922}
5923
5924/**
5925 * A boolean-valued function over a value, possibly including context information
5926 * regarding that value's position in an array.
5927 *
5928 * @publicApi
5929 */
5930export declare interface Predicate<T> {
5931 (value: T): boolean;
5932}
5933
5934declare const PREORDER_HOOK_FLAGS = 18;
5935
5936/** More flags associated with an LView (saved in LView[PREORDER_HOOK_FLAGS]) */
5937declare const enum PreOrderHookFlags {
5938 /**
5939 The index of the next pre-order hook to be called in the hooks array, on the first 16
5940 bits
5941 */
5942 IndexOfTheNextPreOrderHookMaskMask = 65535,
5943 /**
5944 * The number of init hooks that have already been called, on the last 16 bits
5945 */
5946 NumberOfInitHooksCalledIncrementer = 65536,
5947 NumberOfInitHooksCalledShift = 16,
5948 NumberOfInitHooksCalledMask = 4294901760
5949}
5950
5951/**
5952 * Procedural style of API needed to create elements and text nodes.
5953 *
5954 * In non-native browser environments (e.g. platforms such as web-workers), this is the
5955 * facade that enables element manipulation. This also facilitates backwards compatibility
5956 * with Renderer2.
5957 */
5958declare interface ProceduralRenderer3 {
5959 destroy(): void;
5960 createComment(value: string): RComment;
5961 createElement(name: string, namespace?: string | null): RElement;
5962 createText(value: string): RText;
5963 /**
5964 * This property is allowed to be null / undefined,
5965 * in which case the view engine won't call it.
5966 * This is used as a performance optimization for production mode.
5967 */
5968 destroyNode?: ((node: RNode) => void) | null;
5969 appendChild(parent: RElement, newChild: RNode): void;
5970 insertBefore(parent: RNode, newChild: RNode, refChild: RNode | null, isMove?: boolean): void;
5971 removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;
5972 selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): RElement;
5973 parentNode(node: RNode): RElement | null;
5974 nextSibling(node: RNode): RNode | null;
5975 setAttribute(el: RElement, name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL, namespace?: string | null): void;
5976 removeAttribute(el: RElement, name: string, namespace?: string | null): void;
5977 addClass(el: RElement, name: string): void;
5978 removeClass(el: RElement, name: string): void;
5979 setStyle(el: RElement, style: string, value: any, flags?: RendererStyleFlags2 | RendererStyleFlags3): void;
5980 removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2 | RendererStyleFlags3): void;
5981 setProperty(el: RElement, name: string, value: any): void;
5982 setValue(node: RText | RComment, value: string): void;
5983 listen(target: GlobalTargetName | RNode, eventName: string, callback: (event: any) => boolean | void): () => void;
5984}
5985
5986/**
5987 * Describes a function that is used to process provider lists (such as provider
5988 * overrides).
5989 */
5990declare type ProcessProvidersFunction = (providers: Provider[]) => Provider[];
5991
5992/**
5993 * List of slots for a projection. A slot can be either based on a parsed CSS selector
5994 * which will be used to determine nodes which are projected into that slot.
5995 *
5996 * When set to "*", the slot is reserved and can be used for multi-slot projection
5997 * using {@link ViewContainerRef#createComponent}. The last slot that specifies the
5998 * wildcard selector will retrieve all projectable nodes which do not match any selector.
5999 */
6000declare type ProjectionSlots = (ɵCssSelectorList | '*')[];
6001
6002/**
6003 * This mapping is necessary so we can set input properties and output listeners
6004 * properly at runtime when property names are minified or aliased.
6005 *
6006 * Key: unminified / public input or output name
6007 * Value: array containing minified / internal name and related directive index
6008 *
6009 * The value must be an array to support inputs and outputs with the same name
6010 * on the same node.
6011 */
6012declare type PropertyAliases = {
6013 [key: string]: PropertyAliasValue;
6014};
6015
6016/**
6017 * Store the runtime input or output names for all the directives.
6018 *
6019 * i+0: directive instance index
6020 * i+1: privateName
6021 *
6022 * e.g. [0, 'change-minified']
6023 */
6024declare type PropertyAliasValue = (number | string)[];
6025
6026/**
6027 * Describes how the `Injector` should be configured.
6028 * @see ["Dependency Injection Guide"](guide/dependency-injection).
6029 *
6030 * @see `StaticProvider`
6031 *
6032 * @publicApi
6033 */
6034export declare type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | any[];
6035
6036declare interface ProviderDef {
6037 token: any;
6038 value: any;
6039 deps: DepDef[];
6040}
6041
6042declare interface ProviderOverride {
6043 token: any;
6044 flags: ɵNodeFlags;
6045 value: any;
6046 deps: ([ɵDepFlags, any] | any)[];
6047 deprecatedBehavior: boolean;
6048}
6049
6050/**
6051 * @description
6052 *
6053 * Token that can be used to retrieve an instance from an injector or through a query.
6054 *
6055 * @publicApi
6056 */
6057export declare type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToken<T>;
6058
6059/**
6060 * Testability API.
6061 * `declare` keyword causes tsickle to generate externs, so these methods are
6062 * not renamed by Closure Compiler.
6063 * @publicApi
6064 */
6065declare interface PublicTestability {
6066 isStable(): boolean;
6067 whenStable(callback: Function, timeout?: number, updateCallback?: Function): void;
6068 findProviders(using: any, provider: string, exactMatch: boolean): any[];
6069}
6070
6071declare const QUERIES = 19;
6072
6073/**
6074 * Type of the Query metadata.
6075 *
6076 * @publicApi
6077 */
6078export declare interface Query {
6079 descendants: boolean;
6080 emitDistinctChangesOnly: boolean;
6081 first: boolean;
6082 read: any;
6083 isViewQuery: boolean;
6084 selector: any;
6085 static?: boolean;
6086}
6087
6088/**
6089 * Base class for query metadata.
6090 *
6091 * @see `ContentChildren`.
6092 * @see `ContentChild`.
6093 * @see `ViewChildren`.
6094 * @see `ViewChild`.
6095 *
6096 * @publicApi
6097 */
6098export declare abstract class Query {
6099}
6100
6101declare interface QueryBindingDef {
6102 propName: string;
6103 bindingType: ɵQueryBindingType;
6104}
6105
6106declare interface QueryDef {
6107 id: number;
6108 filterId: number;
6109 bindings: QueryBindingDef[];
6110}
6111
6112/**
6113 * A set of flags to be used with Queries.
6114 *
6115 * NOTE: Ensure changes here are reflected in `packages/compiler/src/render3/view/compiler.ts`
6116 */
6117declare const enum QueryFlags {
6118 /**
6119 * No flags
6120 */
6121 none = 0,
6122 /**
6123 * Whether or not the query should descend into children.
6124 */
6125 descendants = 1,
6126 /**
6127 * The query can be computed statically and hence can be assigned eagerly.
6128 *
6129 * NOTE: Backwards compatibility with ViewEngine.
6130 */
6131 isStatic = 2,
6132 /**
6133 * If the `QueryList` should fire change event only if actual change to query was computed (vs old
6134 * behavior where the change was fired whenever the query was recomputed, even if the recomputed
6135 * query resulted in the same list.)
6136 */
6137 emitDistinctChangesOnly = 4
6138}
6139
6140/**
6141 * An unmodifiable list of items that Angular keeps up to date when the state
6142 * of the application changes.
6143 *
6144 * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}
6145 * provide.
6146 *
6147 * Implements an iterable interface, therefore it can be used in both ES6
6148 * javascript `for (var i of items)` loops as well as in Angular templates with
6149 * `*ngFor="let i of myList"`.
6150 *
6151 * Changes can be observed by subscribing to the changes `Observable`.
6152 *
6153 * NOTE: In the future this class will implement an `Observable` interface.
6154 *
6155 * @usageNotes
6156 * ### Example
6157 * ```typescript
6158 * @Component({...})
6159 * class Container {
6160 * @ViewChildren(Item) items:QueryList<Item>;
6161 * }
6162 * ```
6163 *
6164 * @publicApi
6165 */
6166export declare class QueryList<T> implements Iterable<T> {
6167 private _emitDistinctChangesOnly;
6168 readonly dirty = true;
6169 private _results;
6170 private _changesDetected;
6171 private _changes;
6172 readonly length: number;
6173 readonly first: T;
6174 readonly last: T;
6175 /**
6176 * Returns `Observable` of `QueryList` notifying the subscriber of changes.
6177 */
6178 get changes(): Observable<any>;
6179 /**
6180 * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change
6181 * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in
6182 * the same result)
6183 */
6184 constructor(_emitDistinctChangesOnly?: boolean);
6185 /**
6186 * Returns the QueryList entry at `index`.
6187 */
6188 get(index: number): T | undefined;
6189 /**
6190 * See
6191 * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
6192 */
6193 map<U>(fn: (item: T, index: number, array: T[]) => U): U[];
6194 /**
6195 * See
6196 * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
6197 */
6198 filter(fn: (item: T, index: number, array: T[]) => boolean): T[];
6199 /**
6200 * See
6201 * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
6202 */
6203 find(fn: (item: T, index: number, array: T[]) => boolean): T | undefined;
6204 /**
6205 * See
6206 * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
6207 */
6208 reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U;
6209 /**
6210 * See
6211 * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
6212 */
6213 forEach(fn: (item: T, index: number, array: T[]) => void): void;
6214 /**
6215 * See
6216 * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
6217 */
6218 some(fn: (value: T, index: number, array: T[]) => boolean): boolean;
6219 /**
6220 * Returns a copy of the internal results list as an Array.
6221 */
6222 toArray(): T[];
6223 toString(): string;
6224 /**
6225 * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that
6226 * on change detection, it will not notify of changes to the queries, unless a new change
6227 * occurs.
6228 *
6229 * @param resultsTree The query results to store
6230 * @param identityAccessor Optional function for extracting stable object identity from a value
6231 * in the array. This function is executed for each element of the query result list while
6232 * comparing current query list with the new one (provided as a first argument of the `reset`
6233 * function) to detect if the lists are different. If the function is not provided, elements
6234 * are compared as is (without any pre-processing).
6235 */
6236 reset(resultsTree: Array<T | any[]>, identityAccessor?: (value: T) => unknown): void;
6237 /**
6238 * Triggers a change event by emitting on the `changes` {@link EventEmitter}.
6239 */
6240 notifyOnChanges(): void;
6241 /** internal */
6242 setDirty(): void;
6243 /** internal */
6244 destroy(): void;
6245 [Symbol.iterator]: () => Iterator<T>;
6246}
6247
6248declare interface R3DeclareComponentFacade extends R3DeclareDirectiveFacade {
6249 template: string;
6250 isInline?: boolean;
6251 styles?: string[];
6252 components?: R3DeclareUsedDirectiveFacade[];
6253 directives?: R3DeclareUsedDirectiveFacade[];
6254 pipes?: {
6255 [pipeName: string]: OpaqueValue | (() => OpaqueValue);
6256 };
6257 viewProviders?: OpaqueValue;
6258 animations?: OpaqueValue;
6259 changeDetection?: ChangeDetectionStrategy_2;
6260 encapsulation?: ViewEncapsulation_2;
6261 interpolation?: [string, string];
6262 preserveWhitespaces?: boolean;
6263}
6264
6265declare interface R3DeclareDependencyMetadataFacade {
6266 token: OpaqueValue;
6267 attribute?: boolean;
6268 host?: boolean;
6269 optional?: boolean;
6270 self?: boolean;
6271 skipSelf?: boolean;
6272}
6273
6274declare interface R3DeclareDirectiveFacade {
6275 selector?: string;
6276 type: Type_2;
6277 inputs?: {
6278 [classPropertyName: string]: string | [string, string];
6279 };
6280 outputs?: {
6281 [classPropertyName: string]: string;
6282 };
6283 host?: {
6284 attributes?: {
6285 [key: string]: OpaqueValue;
6286 };
6287 listeners?: {
6288 [key: string]: string;
6289 };
6290 properties?: {
6291 [key: string]: string;
6292 };
6293 classAttribute?: string;
6294 styleAttribute?: string;
6295 };
6296 queries?: R3DeclareQueryMetadataFacade[];
6297 viewQueries?: R3DeclareQueryMetadataFacade[];
6298 providers?: OpaqueValue;
6299 exportAs?: string[];
6300 usesInheritance?: boolean;
6301 usesOnChanges?: boolean;
6302}
6303
6304declare interface R3DeclareFactoryFacade {
6305 type: Type_2;
6306 deps: R3DeclareDependencyMetadataFacade[] | 'invalid' | null;
6307 target: ɵɵFactoryTarget;
6308}
6309
6310declare interface R3DeclareInjectableFacade {
6311 type: Type_2;
6312 providedIn?: Type_2 | 'root' | 'platform' | 'any' | null;
6313 useClass?: OpaqueValue;
6314 useFactory?: OpaqueValue;
6315 useExisting?: OpaqueValue;
6316 useValue?: OpaqueValue;
6317 deps?: R3DeclareDependencyMetadataFacade[];
6318}
6319
6320declare interface R3DeclareInjectorFacade {
6321 type: Type_2;
6322 imports?: OpaqueValue[];
6323 providers?: OpaqueValue[];
6324}
6325
6326declare interface R3DeclareNgModuleFacade {
6327 type: Type_2;
6328 bootstrap?: OpaqueValue[] | (() => OpaqueValue[]);
6329 declarations?: OpaqueValue[] | (() => OpaqueValue[]);
6330 imports?: OpaqueValue[] | (() => OpaqueValue[]);
6331 exports?: OpaqueValue[] | (() => OpaqueValue[]);
6332 schemas?: OpaqueValue[];
6333 id?: OpaqueValue;
6334}
6335
6336declare interface R3DeclarePipeFacade {
6337 type: Type_2;
6338 name: string;
6339 pure?: boolean;
6340}
6341
6342declare interface R3DeclareQueryMetadataFacade {
6343 propertyName: string;
6344 first?: boolean;
6345 predicate: OpaqueValue | string[];
6346 descendants?: boolean;
6347 read?: OpaqueValue;
6348 static?: boolean;
6349 emitDistinctChangesOnly?: boolean;
6350}
6351
6352declare interface R3DeclareUsedDirectiveFacade {
6353 selector: string;
6354 type: OpaqueValue | (() => OpaqueValue);
6355 inputs?: string[];
6356 outputs?: string[];
6357 exportAs?: string[];
6358}
6359
6360declare class R3Injector {
6361 readonly parent: Injector;
6362 /**
6363 * Map of tokens to records which contain the instances of those tokens.
6364 * - `null` value implies that we don't have the record. Used by tree-shakable injectors
6365 * to prevent further searches.
6366 */
6367 private records;
6368 /**
6369 * The transitive set of `InjectorType`s which define this injector.
6370 */
6371 private injectorDefTypes;
6372 /**
6373 * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
6374 */
6375 private onDestroy;
6376 /**
6377 * Flag indicating this injector provides the APP_ROOT_SCOPE token, and thus counts as the
6378 * root scope.
6379 */
6380 private readonly scope;
6381 readonly source: string | null;
6382 /**
6383 * Flag indicating that this injector was previously destroyed.
6384 */
6385 get destroyed(): boolean;
6386 private _destroyed;
6387 constructor(def: InjectorType<any>, additionalProviders: StaticProvider[] | null, parent: Injector, source?: string | null);
6388 /**
6389 * Destroy the injector and release references to every instance or provider associated with it.
6390 *
6391 * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
6392 * hook was found.
6393 */
6394 destroy(): void;
6395 get<T>(token: ProviderToken<T>, notFoundValue?: any, flags?: InjectFlags): T;
6396 toString(): string;
6397 private assertNotDestroyed;
6398 /**
6399 * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers
6400 * to this injector.
6401 *
6402 * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,
6403 * the function will return "true" to indicate that the providers of the type definition need
6404 * to be processed. This allows us to process providers of injector types after all imports of
6405 * an injector definition are processed. (following View Engine semantics: see FW-1349)
6406 */
6407 private processInjectorType;
6408 /**
6409 * Process a `SingleProvider` and add it.
6410 */
6411 private processProvider;
6412 private hydrate;
6413 private injectableDefInScope;
6414}
6415
6416declare interface RComment extends RNode {
6417 textContent: string | null;
6418}
6419
6420declare interface RCssStyleDeclaration {
6421 removeProperty(propertyName: string): string;
6422 setProperty(propertyName: string, value: string | null, priority?: string): void;
6423}
6424
6425declare interface RDomTokenList {
6426 add(token: string): void;
6427 remove(token: string): void;
6428}
6429
6430/**
6431 * `Dependency` is used by the framework to extend DI.
6432 * This is internal to Angular and should not be used directly.
6433 */
6434declare class ReflectiveDependency {
6435 key: ReflectiveKey;
6436 optional: boolean;
6437 visibility: Self | SkipSelf | null;
6438 constructor(key: ReflectiveKey, optional: boolean, visibility: Self | SkipSelf | null);
6439 static fromKey(key: ReflectiveKey): ReflectiveDependency;
6440}
6441
6442/**
6443 * A ReflectiveDependency injection container used for instantiating objects and resolving
6444 * dependencies.
6445 *
6446 * An `Injector` is a replacement for a `new` operator, which can automatically resolve the
6447 * constructor dependencies.
6448 *
6449 * In typical use, application code asks for the dependencies in the constructor and they are
6450 * resolved by the `Injector`.
6451 *
6452 * @usageNotes
6453 * ### Example
6454 *
6455 * The following example creates an `Injector` configured to create `Engine` and `Car`.
6456 *
6457 * ```typescript
6458 * @Injectable()
6459 * class Engine {
6460 * }
6461 *
6462 * @Injectable()
6463 * class Car {
6464 * constructor(public engine:Engine) {}
6465 * }
6466 *
6467 * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
6468 * var car = injector.get(Car);
6469 * expect(car instanceof Car).toBe(true);
6470 * expect(car.engine instanceof Engine).toBe(true);
6471 * ```
6472 *
6473 * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`
6474 * resolve all of the object's dependencies automatically.
6475 *
6476 * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.
6477 * @publicApi
6478 */
6479export declare abstract class ReflectiveInjector implements Injector {
6480 /**
6481 * Turns an array of provider definitions into an array of resolved providers.
6482 *
6483 * A resolution is a process of flattening multiple nested arrays and converting individual
6484 * providers into an array of `ResolvedReflectiveProvider`s.
6485 *
6486 * @usageNotes
6487 * ### Example
6488 *
6489 * ```typescript
6490 * @Injectable()
6491 * class Engine {
6492 * }
6493 *
6494 * @Injectable()
6495 * class Car {
6496 * constructor(public engine:Engine) {}
6497 * }
6498 *
6499 * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
6500 *
6501 * expect(providers.length).toEqual(2);
6502 *
6503 * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
6504 * expect(providers[0].key.displayName).toBe("Car");
6505 * expect(providers[0].dependencies.length).toEqual(1);
6506 * expect(providers[0].factory).toBeDefined();
6507 *
6508 * expect(providers[1].key.displayName).toBe("Engine");
6509 * });
6510 * ```
6511 *
6512 */
6513 static resolve(providers: Provider[]): ResolvedReflectiveProvider[];
6514 /**
6515 * Resolves an array of providers and creates an injector from those providers.
6516 *
6517 * The passed-in providers can be an array of `Type`, `Provider`,
6518 * or a recursive array of more providers.
6519 *
6520 * @usageNotes
6521 * ### Example
6522 *
6523 * ```typescript
6524 * @Injectable()
6525 * class Engine {
6526 * }
6527 *
6528 * @Injectable()
6529 * class Car {
6530 * constructor(public engine:Engine) {}
6531 * }
6532 *
6533 * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
6534 * expect(injector.get(Car) instanceof Car).toBe(true);
6535 * ```
6536 */
6537 static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector;
6538 /**
6539 * Creates an injector from previously resolved providers.
6540 *
6541 * This API is the recommended way to construct injectors in performance-sensitive parts.
6542 *
6543 * @usageNotes
6544 * ### Example
6545 *
6546 * ```typescript
6547 * @Injectable()
6548 * class Engine {
6549 * }
6550 *
6551 * @Injectable()
6552 * class Car {
6553 * constructor(public engine:Engine) {}
6554 * }
6555 *
6556 * var providers = ReflectiveInjector.resolve([Car, Engine]);
6557 * var injector = ReflectiveInjector.fromResolvedProviders(providers);
6558 * expect(injector.get(Car) instanceof Car).toBe(true);
6559 * ```
6560 */
6561 static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector;
6562 /**
6563 * Parent of this injector.
6564 *
6565 * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
6566 * -->
6567 */
6568 abstract get parent(): Injector | null;
6569 /**
6570 * Resolves an array of providers and creates a child injector from those providers.
6571 *
6572 * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
6573 * -->
6574 *
6575 * The passed-in providers can be an array of `Type`, `Provider`,
6576 * or a recursive array of more providers.
6577 *
6578 * @usageNotes
6579 * ### Example
6580 *
6581 * ```typescript
6582 * class ParentProvider {}
6583 * class ChildProvider {}
6584 *
6585 * var parent = ReflectiveInjector.resolveAndCreate([ParentProvider]);
6586 * var child = parent.resolveAndCreateChild([ChildProvider]);
6587 *
6588 * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
6589 * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
6590 * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
6591 * ```
6592 */
6593 abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
6594 /**
6595 * Creates a child injector from previously resolved providers.
6596 *
6597 * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
6598 * -->
6599 *
6600 * This API is the recommended way to construct injectors in performance-sensitive parts.
6601 *
6602 * @usageNotes
6603 * ### Example
6604 *
6605 * ```typescript
6606 * class ParentProvider {}
6607 * class ChildProvider {}
6608 *
6609 * var parentProviders = ReflectiveInjector.resolve([ParentProvider]);
6610 * var childProviders = ReflectiveInjector.resolve([ChildProvider]);
6611 *
6612 * var parent = ReflectiveInjector.fromResolvedProviders(parentProviders);
6613 * var child = parent.createChildFromResolved(childProviders);
6614 *
6615 * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
6616 * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
6617 * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
6618 * ```
6619 */
6620 abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
6621 /**
6622 * Resolves a provider and instantiates an object in the context of the injector.
6623 *
6624 * The created object does not get cached by the injector.
6625 *
6626 * @usageNotes
6627 * ### Example
6628 *
6629 * ```typescript
6630 * @Injectable()
6631 * class Engine {
6632 * }
6633 *
6634 * @Injectable()
6635 * class Car {
6636 * constructor(public engine:Engine) {}
6637 * }
6638 *
6639 * var injector = ReflectiveInjector.resolveAndCreate([Engine]);
6640 *
6641 * var car = injector.resolveAndInstantiate(Car);
6642 * expect(car.engine).toBe(injector.get(Engine));
6643 * expect(car).not.toBe(injector.resolveAndInstantiate(Car));
6644 * ```
6645 */
6646 abstract resolveAndInstantiate(provider: Provider): any;
6647 /**
6648 * Instantiates an object using a resolved provider in the context of the injector.
6649 *
6650 * The created object does not get cached by the injector.
6651 *
6652 * @usageNotes
6653 * ### Example
6654 *
6655 * ```typescript
6656 * @Injectable()
6657 * class Engine {
6658 * }
6659 *
6660 * @Injectable()
6661 * class Car {
6662 * constructor(public engine:Engine) {}
6663 * }
6664 *
6665 * var injector = ReflectiveInjector.resolveAndCreate([Engine]);
6666 * var carProvider = ReflectiveInjector.resolve([Car])[0];
6667 * var car = injector.instantiateResolved(carProvider);
6668 * expect(car.engine).toBe(injector.get(Engine));
6669 * expect(car).not.toBe(injector.instantiateResolved(carProvider));
6670 * ```
6671 */
6672 abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
6673 abstract get(token: any, notFoundValue?: any): any;
6674}
6675
6676
6677/**
6678 * A unique object used for retrieving items from the {@link ReflectiveInjector}.
6679 *
6680 * Keys have:
6681 * - a system-wide unique `id`.
6682 * - a `token`.
6683 *
6684 * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows
6685 * the
6686 * injector to store created objects in a more efficient way.
6687 *
6688 * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when
6689 * resolving
6690 * providers.
6691 *
6692 * @deprecated No replacement
6693 * @publicApi
6694 */
6695export declare class ReflectiveKey {
6696 token: Object;
6697 id: number;
6698 readonly displayName: string;
6699 /**
6700 * Private
6701 */
6702 constructor(token: Object, id: number);
6703 /**
6704 * Retrieves a `Key` for a token.
6705 */
6706 static get(token: Object): ReflectiveKey;
6707 /**
6708 * @returns the number of keys registered in the system.
6709 */
6710 static get numberOfKeys(): number;
6711}
6712
6713/**
6714 * Subset of API needed for writing attributes, properties, and setting up
6715 * listeners on Element.
6716 */
6717declare interface RElement extends RNode {
6718 style: RCssStyleDeclaration;
6719 classList: RDomTokenList;
6720 className: string;
6721 textContent: string | null;
6722 setAttribute(name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL): void;
6723 removeAttribute(name: string): void;
6724 setAttributeNS(namespaceURI: string, qualifiedName: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL): void;
6725 addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;
6726 removeEventListener(type: string, listener?: EventListener, options?: boolean): void;
6727 setProperty?(name: string, value: any): void;
6728}
6729
6730declare const RENDERER = 11;
6731
6732/**
6733 * Extend this base class to implement custom rendering. By default, Angular
6734 * renders a template into DOM. You can use custom rendering to intercept
6735 * rendering calls, or to render to something other than DOM.
6736 *
6737 * Create your custom renderer using `RendererFactory2`.
6738 *
6739 * Use a custom renderer to bypass Angular's templating and
6740 * make custom UI changes that can't be expressed declaratively.
6741 * For example if you need to set a property or an attribute whose name is
6742 * not statically known, use the `setProperty()` or
6743 * `setAttribute()` method.
6744 *
6745 * @publicApi
6746 */
6747export declare abstract class Renderer2 {
6748 /**
6749 * Use to store arbitrary developer-defined data on a renderer instance,
6750 * as an object containing key-value pairs.
6751 * This is useful for renderers that delegate to other renderers.
6752 */
6753 abstract get data(): {
6754 [key: string]: any;
6755 };
6756 /**
6757 * Implement this callback to destroy the renderer or the host element.
6758 */
6759 abstract destroy(): void;
6760 /**
6761 * Implement this callback to create an instance of the host element.
6762 * @param name An identifying name for the new element, unique within the namespace.
6763 * @param namespace The namespace for the new element.
6764 * @returns The new element.
6765 */
6766 abstract createElement(name: string, namespace?: string | null): any;
6767 /**
6768 * Implement this callback to add a comment to the DOM of the host element.
6769 * @param value The comment text.
6770 * @returns The modified element.
6771 */
6772 abstract createComment(value: string): any;
6773 /**
6774 * Implement this callback to add text to the DOM of the host element.
6775 * @param value The text string.
6776 * @returns The modified element.
6777 */
6778 abstract createText(value: string): any;
6779 /**
6780 * If null or undefined, the view engine won't call it.
6781 * This is used as a performance optimization for production mode.
6782 */
6783 destroyNode: ((node: any) => void) | null;
6784 /**
6785 * Appends a child to a given parent node in the host element DOM.
6786 * @param parent The parent node.
6787 * @param newChild The new child node.
6788 */
6789 abstract appendChild(parent: any, newChild: any): void;
6790 /**
6791 * Implement this callback to insert a child node at a given position in a parent node
6792 * in the host element DOM.
6793 * @param parent The parent node.
6794 * @param newChild The new child nodes.
6795 * @param refChild The existing child node before which `newChild` is inserted.
6796 * @param isMove Optional argument which signifies if the current `insertBefore` is a result of a
6797 * move. Animation uses this information to trigger move animations. In the past the Animation
6798 * would always assume that any `insertBefore` is a move. This is not strictly true because
6799 * with runtime i18n it is possible to invoke `insertBefore` as a result of i18n and it should
6800 * not trigger an animation move.
6801 */
6802 abstract insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void;
6803 /**
6804 * Implement this callback to remove a child node from the host element's DOM.
6805 * @param parent The parent node.
6806 * @param oldChild The child node to remove.
6807 * @param isHostElement Optionally signal to the renderer whether this element is a host element
6808 * or not
6809 */
6810 abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;
6811 /**
6812 * Implement this callback to prepare an element to be bootstrapped
6813 * as a root element, and return the element instance.
6814 * @param selectorOrNode The DOM element.
6815 * @param preserveContent Whether the contents of the root element
6816 * should be preserved, or cleared upon bootstrap (default behavior).
6817 * Use with `ViewEncapsulation.ShadowDom` to allow simple native
6818 * content projection via `<slot>` elements.
6819 * @returns The root element.
6820 */
6821 abstract selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): any;
6822 /**
6823 * Implement this callback to get the parent of a given node
6824 * in the host element's DOM.
6825 * @param node The child node to query.
6826 * @returns The parent node, or null if there is no parent.
6827 * For WebWorkers, always returns true.
6828 * This is because the check is synchronous,
6829 * and the caller can't rely on checking for null.
6830 */
6831 abstract parentNode(node: any): any;
6832 /**
6833 * Implement this callback to get the next sibling node of a given node
6834 * in the host element's DOM.
6835 * @returns The sibling node, or null if there is no sibling.
6836 * For WebWorkers, always returns a value.
6837 * This is because the check is synchronous,
6838 * and the caller can't rely on checking for null.
6839 */
6840 abstract nextSibling(node: any): any;
6841 /**
6842 * Implement this callback to set an attribute value for an element in the DOM.
6843 * @param el The element.
6844 * @param name The attribute name.
6845 * @param value The new value.
6846 * @param namespace The namespace.
6847 */
6848 abstract setAttribute(el: any, name: string, value: string, namespace?: string | null): void;
6849 /**
6850 * Implement this callback to remove an attribute from an element in the DOM.
6851 * @param el The element.
6852 * @param name The attribute name.
6853 * @param namespace The namespace.
6854 */
6855 abstract removeAttribute(el: any, name: string, namespace?: string | null): void;
6856 /**
6857 * Implement this callback to add a class to an element in the DOM.
6858 * @param el The element.
6859 * @param name The class name.
6860 */
6861 abstract addClass(el: any, name: string): void;
6862 /**
6863 * Implement this callback to remove a class from an element in the DOM.
6864 * @param el The element.
6865 * @param name The class name.
6866 */
6867 abstract removeClass(el: any, name: string): void;
6868 /**
6869 * Implement this callback to set a CSS style for an element in the DOM.
6870 * @param el The element.
6871 * @param style The name of the style.
6872 * @param value The new value.
6873 * @param flags Flags for style variations. No flags are set by default.
6874 */
6875 abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;
6876 /**
6877 * Implement this callback to remove the value from a CSS style for an element in the DOM.
6878 * @param el The element.
6879 * @param style The name of the style.
6880 * @param flags Flags for style variations to remove, if set. ???
6881 */
6882 abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;
6883 /**
6884 * Implement this callback to set the value of a property of an element in the DOM.
6885 * @param el The element.
6886 * @param name The property name.
6887 * @param value The new value.
6888 */
6889 abstract setProperty(el: any, name: string, value: any): void;
6890 /**
6891 * Implement this callback to set the value of a node in the host element.
6892 * @param node The node.
6893 * @param value The new value.
6894 */
6895 abstract setValue(node: any, value: string): void;
6896 /**
6897 * Implement this callback to start an event listener.
6898 * @param target The context in which to listen for events. Can be
6899 * the entire window or document, the body of the document, or a specific
6900 * DOM element.
6901 * @param eventName The event to listen for.
6902 * @param callback A handler function to invoke when the event occurs.
6903 * @returns An "unlisten" function for disposing of this handler.
6904 */
6905 abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void;
6906}
6907
6908declare type Renderer3 = ObjectOrientedRenderer3 | ProceduralRenderer3;
6909
6910declare const RENDERER_FACTORY = 10;
6911
6912/**
6913 * Creates and initializes a custom renderer that implements the `Renderer2` base class.
6914 *
6915 * @publicApi
6916 */
6917export declare abstract class RendererFactory2 {
6918 /**
6919 * Creates and initializes a custom renderer for a host DOM element.
6920 * @param hostElement The element to render.
6921 * @param type The base class to implement.
6922 * @returns The new custom renderer instance.
6923 */
6924 abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2;
6925 /**
6926 * A callback invoked when rendering has begun.
6927 */
6928 abstract begin?(): void;
6929 /**
6930 * A callback invoked when rendering has completed.
6931 */
6932 abstract end?(): void;
6933 /**
6934 * Use with animations test-only mode. Notifies the test when rendering has completed.
6935 * @returns The asynchronous result of the developer-defined function.
6936 */
6937 abstract whenRenderingDone?(): Promise<any>;
6938}
6939
6940declare interface RendererFactory3 {
6941 createRenderer(hostElement: RElement | null, rendererType: RendererType2 | null): Renderer3;
6942 begin?(): void;
6943 end?(): void;
6944}
6945
6946/**
6947 * Flags for renderer-specific style modifiers.
6948 * @publicApi
6949 */
6950export declare enum RendererStyleFlags2 {
6951 /**
6952 * Marks a style as important.
6953 */
6954 Important = 1,
6955 /**
6956 * Marks a style as using dash case naming (this-is-dash-case).
6957 */
6958 DashCase = 2
6959}
6960
6961declare enum RendererStyleFlags3 {
6962 Important = 1,
6963 DashCase = 2
6964}
6965
6966/**
6967 * Used by `RendererFactory2` to associate custom rendering data and styles
6968 * with a rendering implementation.
6969 * @publicApi
6970 */
6971export declare interface RendererType2 {
6972 /**
6973 * A unique identifying string for the new renderer, used when creating
6974 * unique styles for encapsulation.
6975 */
6976 id: string;
6977 /**
6978 * The view encapsulation type, which determines how styles are applied to
6979 * DOM elements. One of
6980 * - `Emulated` (default): Emulate native scoping of styles.
6981 * - `Native`: Use the native encapsulation mechanism of the renderer.
6982 * - `ShadowDom`: Use modern [Shadow
6983 * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
6984 * create a ShadowRoot for component's host element.
6985 * - `None`: Do not provide any template or style encapsulation.
6986 */
6987 encapsulation: ViewEncapsulation;
6988 /**
6989 * Defines CSS styles to be stored on a renderer instance.
6990 */
6991 styles: (string | any[])[];
6992 /**
6993 * Defines arbitrary developer-defined data to be stored on a renderer instance.
6994 * This is useful for renderers that delegate to other renderers.
6995 */
6996 data: {
6997 [kind: string]: any;
6998 };
6999}
7000
7001/**
7002 * An internal resolved representation of a factory function created by resolving `Provider`.
7003 * @publicApi
7004 */
7005export declare class ResolvedReflectiveFactory {
7006 /**
7007 * Factory function which can return an instance of an object represented by a key.
7008 */
7009 factory: Function;
7010 /**
7011 * Arguments (dependencies) to the `factory` function.
7012 */
7013 dependencies: ReflectiveDependency[];
7014 constructor(
7015 /**
7016 * Factory function which can return an instance of an object represented by a key.
7017 */
7018 factory: Function,
7019 /**
7020 * Arguments (dependencies) to the `factory` function.
7021 */
7022 dependencies: ReflectiveDependency[]);
7023}
7024
7025/**
7026 * An internal resolved representation of a `Provider` used by the `Injector`.
7027 *
7028 * @usageNotes
7029 * This is usually created automatically by `Injector.resolveAndCreate`.
7030 *
7031 * It can be created manually, as follows:
7032 *
7033 * ### Example
7034 *
7035 * ```typescript
7036 * var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);
7037 * var injector = Injector.fromResolvedProviders(resolvedProviders);
7038 *
7039 * expect(injector.get('message')).toEqual('Hello');
7040 * ```
7041 *
7042 * @publicApi
7043 */
7044export declare interface ResolvedReflectiveProvider {
7045 /**
7046 * A key, usually a `Type<any>`.
7047 */
7048 key: ReflectiveKey;
7049 /**
7050 * Factory function which can return an instance of an object represented by a key.
7051 */
7052 resolvedFactories: ResolvedReflectiveFactory[];
7053 /**
7054 * Indicates if the provider is a multi-provider or a regular provider.
7055 */
7056 multiProvider: boolean;
7057}
7058
7059/**
7060 * Lazily retrieves the reference value from a forwardRef.
7061 *
7062 * Acts as the identity function when given a non-forward-ref value.
7063 *
7064 * @usageNotes
7065 * ### Example
7066 *
7067 * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
7068 *
7069 * @see `forwardRef`
7070 * @publicApi
7071 */
7072export declare function resolveForwardRef<T>(type: T): T;
7073
7074/**
7075 * The goal here is to make sure that the browser DOM API is the Renderer.
7076 * We do this by defining a subset of DOM API to be the renderer and then
7077 * use that at runtime for rendering.
7078 *
7079 * At runtime we can then use the DOM api directly, in server or web-worker
7080 * it will be easy to implement such API.
7081 */
7082/** Subset of API needed for appending elements and text nodes. */
7083declare interface RNode {
7084 /**
7085 * Returns the parent Element, Document, or DocumentFragment
7086 */
7087 parentNode: RNode | null;
7088 /**
7089 * Returns the parent Element if there is one
7090 */
7091 parentElement: RElement | null;
7092 /**
7093 * Gets the Node immediately following this one in the parent's childNodes
7094 */
7095 nextSibling: RNode | null;
7096 /**
7097 * Removes a child from the current node and returns the removed node
7098 * @param oldChild the child node to remove
7099 */
7100 removeChild(oldChild: RNode): RNode;
7101 /**
7102 * Insert a child node.
7103 *
7104 * Used exclusively for adding View root nodes into ViewAnchor location.
7105 */
7106 insertBefore(newChild: RNode, refChild: RNode | null, isViewRoot: boolean): void;
7107 /**
7108 * Append a child node.
7109 *
7110 * Used exclusively for building up DOM which are static (ie not View roots)
7111 */
7112 appendChild(newChild: RNode): RNode;
7113}
7114
7115/**
7116 * RootContext contains information which is shared for all components which
7117 * were bootstrapped with {@link renderComponent}.
7118 */
7119declare interface RootContext {
7120 /**
7121 * A function used for scheduling change detection in the future. Usually
7122 * this is `requestAnimationFrame`.
7123 */
7124 scheduler: (workFn: () => void) => void;
7125 /**
7126 * A promise which is resolved when all components are considered clean (not dirty).
7127 *
7128 * This promise is overwritten every time a first call to {@link markDirty} is invoked.
7129 */
7130 clean: Promise<null>;
7131 /**
7132 * RootComponents - The components that were instantiated by the call to
7133 * {@link renderComponent}.
7134 */
7135 components: {}[];
7136 /**
7137 * The player flushing handler to kick off all animations
7138 */
7139 playerHandler: ɵPlayerHandler | null;
7140 /**
7141 * What render-related operations to run once a scheduler has been set
7142 */
7143 flags: RootContextFlags;
7144}
7145
7146declare const enum RootContextFlags {
7147 Empty = 0,
7148 DetectChanges = 1,
7149 FlushPlayers = 2
7150}
7151
7152declare interface RootData {
7153 injector: Injector;
7154 ngModule: NgModuleRef<any>;
7155 projectableNodes: any[][];
7156 selectorOrNode: any;
7157 renderer: Renderer2;
7158 rendererFactory: RendererFactory2;
7159 errorHandler: ErrorHandler;
7160 sanitizer: Sanitizer;
7161}
7162
7163declare interface RText extends RNode {
7164 textContent: string | null;
7165}
7166
7167declare const SANITIZER = 12;
7168
7169/**
7170 * Sanitizer is used by the views to sanitize potentially dangerous values.
7171 *
7172 * @publicApi
7173 */
7174export declare abstract class Sanitizer {
7175 abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;
7176 /** @nocollapse */
7177 static ɵprov: unknown;
7178}
7179
7180/**
7181 * Function used to sanitize the value before writing it into the renderer.
7182 */
7183declare type SanitizerFn = (value: any, tagName?: string, propName?: string) => string | TrustedHTML | TrustedScript | TrustedScriptURL;
7184
7185
7186/**
7187 * A schema definition associated with an NgModule.
7188 *
7189 * @see `@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`
7190 *
7191 * @param name The name of a defined schema.
7192 *
7193 * @publicApi
7194 */
7195export declare interface SchemaMetadata {
7196 name: string;
7197}
7198
7199
7200/**
7201 * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
7202 * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
7203 * handled.
7204 *
7205 * See DomSanitizer for more details on security in Angular applications.
7206 *
7207 * @publicApi
7208 */
7209export declare enum SecurityContext {
7210 NONE = 0,
7211 HTML = 1,
7212 STYLE = 2,
7213 SCRIPT = 3,
7214 URL = 4,
7215 RESOURCE_URL = 5
7216}
7217
7218/** Flags used to build up CssSelectors */
7219declare const enum SelectorFlags {
7220 /** Indicates this is the beginning of a new negative selector */
7221 NOT = 1,
7222 /** Mode for matching attributes */
7223 ATTRIBUTE = 2,
7224 /** Mode for matching tag names */
7225 ELEMENT = 4,
7226 /** Mode for matching class names */
7227 CLASS = 8
7228}
7229
7230/**
7231 * Type of the Self metadata.
7232 *
7233 * @publicApi
7234 */
7235export declare interface Self {
7236}
7237
7238/**
7239 * Self decorator and metadata.
7240 *
7241 * @Annotation
7242 * @publicApi
7243 */
7244export declare const Self: SelfDecorator;
7245
7246/**
7247 * Type of the Self decorator / constructor function.
7248 *
7249 * @publicApi
7250 */
7251export declare interface SelfDecorator {
7252 /**
7253 * Parameter decorator to be used on constructor parameters,
7254 * which tells the DI framework to start dependency resolution from the local injector.
7255 *
7256 * Resolution works upward through the injector hierarchy, so the children
7257 * of this class must configure their own providers or be prepared for a `null` result.
7258 *
7259 * @usageNotes
7260 *
7261 * In the following example, the dependency can be resolved
7262 * by the local injector when instantiating the class itself, but not
7263 * when instantiating a child.
7264 *
7265 * <code-example path="core/di/ts/metadata_spec.ts" region="Self">
7266 * </code-example>
7267 *
7268 * @see `SkipSelf`
7269 * @see `Optional`
7270 *
7271 */
7272 (): any;
7273 new (): Self;
7274}
7275
7276/**
7277 * Set the {@link GetTestability} implementation used by the Angular testing framework.
7278 * @publicApi
7279 */
7280export declare function setTestabilityGetter(getter: GetTestability): void;
7281
7282
7283/**
7284 * Represents a basic change from a previous to a new value for a single
7285 * property on a directive instance. Passed as a value in a
7286 * {@link SimpleChanges} object to the `ngOnChanges` hook.
7287 *
7288 * @see `OnChanges`
7289 *
7290 * @publicApi
7291 */
7292export declare class SimpleChange {
7293 previousValue: any;
7294 currentValue: any;
7295 firstChange: boolean;
7296 constructor(previousValue: any, currentValue: any, firstChange: boolean);
7297 /**
7298 * Check whether the new value is the first value assigned.
7299 */
7300 isFirstChange(): boolean;
7301}
7302
7303/**
7304 * A hashtable of changes represented by {@link SimpleChange} objects stored
7305 * at the declared property name they belong to on a Directive or Component. This is
7306 * the type passed to the `ngOnChanges` hook.
7307 *
7308 * @see `OnChanges`
7309 *
7310 * @publicApi
7311 */
7312export declare interface SimpleChanges {
7313 [propName: string]: SimpleChange;
7314}
7315
7316/**
7317 * Type of the `SkipSelf` metadata.
7318 *
7319 * @publicApi
7320 */
7321export declare interface SkipSelf {
7322}
7323
7324/**
7325 * `SkipSelf` decorator and metadata.
7326 *
7327 * @Annotation
7328 * @publicApi
7329 */
7330export declare const SkipSelf: SkipSelfDecorator;
7331
7332/**
7333 * Type of the `SkipSelf` decorator / constructor function.
7334 *
7335 * @publicApi
7336 */
7337export declare interface SkipSelfDecorator {
7338 /**
7339 * Parameter decorator to be used on constructor parameters,
7340 * which tells the DI framework to start dependency resolution from the parent injector.
7341 * Resolution works upward through the injector hierarchy, so the local injector
7342 * is not checked for a provider.
7343 *
7344 * @usageNotes
7345 *
7346 * In the following example, the dependency can be resolved when
7347 * instantiating a child, but not when instantiating the class itself.
7348 *
7349 * <code-example path="core/di/ts/metadata_spec.ts" region="SkipSelf">
7350 * </code-example>
7351 *
7352 * @see [Dependency Injection guide](guide/dependency-injection-in-action#skip).
7353 * @see `Self`
7354 * @see `Optional`
7355 *
7356 */
7357 (): any;
7358 new (): SkipSelf;
7359}
7360
7361/**
7362 * Configures the `Injector` to return an instance of `useClass` for a token.
7363 * @see ["Dependency Injection Guide"](guide/dependency-injection).
7364 *
7365 * @usageNotes
7366 *
7367 * {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}
7368 *
7369 * Note that following two providers are not equal:
7370 *
7371 * {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}
7372 *
7373 * ### Multi-value example
7374 *
7375 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
7376 *
7377 * @publicApi
7378 */
7379export declare interface StaticClassProvider extends StaticClassSansProvider {
7380 /**
7381 * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
7382 */
7383 provide: any;
7384 /**
7385 * When true, injector returns an array of instances. This is useful to allow multiple
7386 * providers spread across many files to provide configuration information to a common token.
7387 */
7388 multi?: boolean;
7389}
7390
7391/**
7392 * Configures the `Injector` to return an instance of `useClass` for a token.
7393 * Base for `StaticClassProvider` decorator.
7394 *
7395 * @publicApi
7396 */
7397export declare interface StaticClassSansProvider {
7398 /**
7399 * An optional class to instantiate for the `token`. By default, the `provide`
7400 * class is instantiated.
7401 */
7402 useClass: Type<any>;
7403 /**
7404 * A list of `token`s to be resolved by the injector. The list of values is then
7405 * used as arguments to the `useClass` constructor.
7406 */
7407 deps: any[];
7408}
7409
7410/**
7411 * Describes how an `Injector` should be configured as static (that is, without reflection).
7412 * A static provider provides tokens to an injector for various types of dependencies.
7413 *
7414 * @see `Injector.create()`.
7415 * @see ["Dependency Injection Guide"](guide/dependency-injection-providers).
7416 *
7417 * @publicApi
7418 */
7419export declare type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[];
7420
7421declare const T_HOST = 6;
7422
7423/**
7424 * A combination of:
7425 * - Attribute names and values.
7426 * - Special markers acting as flags to alter attributes processing.
7427 * - Parsed ngProjectAs selectors.
7428 */
7429declare type TAttributes = (string | ɵAttributeMarker | CssSelector)[];
7430
7431/**
7432 * Constants that are associated with a view. Includes:
7433 * - Attribute arrays.
7434 * - Local definition arrays.
7435 * - Translated messages (i18n).
7436 */
7437declare type TConstants = (TAttributes | string)[];
7438
7439/**
7440 * Factory function that returns an array of consts. Consts can be represented as a function in
7441 * case any additional statements are required to define consts in the list. An example is i18n
7442 * where additional i18n calls are generated, which should be executed when consts are requested
7443 * for the first time.
7444 */
7445declare type TConstantsFactory = () => TConstants;
7446
7447/**
7448 * TConstants type that describes how the `consts` field is generated on ComponentDef: it can be
7449 * either an array or a factory function that returns that array.
7450 */
7451declare type TConstantsOrFactory = TConstants | TConstantsFactory;
7452
7453/** Static data for an LContainer */
7454declare interface TContainerNode extends TNode {
7455 /**
7456 * Index in the data[] array.
7457 *
7458 * If it's -1, this is a dynamically created container node that isn't stored in
7459 * data[] (e.g. when you inject ViewContainerRef) .
7460 */
7461 index: number;
7462 child: null;
7463 /**
7464 * Container nodes will have parents unless:
7465 *
7466 * - They are the first node of a component or embedded view
7467 * - They are dynamically created
7468 */
7469 parent: TElementNode | TElementContainerNode | null;
7470 tViews: TView | TView[] | null;
7471 projection: null;
7472 value: null;
7473}
7474
7475/**
7476 * Static data that corresponds to the instance-specific data array on an LView.
7477 *
7478 * Each node's static data is stored in tData at the same index that it's stored
7479 * in the data array. Any nodes that do not have static data store a null value in
7480 * tData to avoid a sparse array.
7481 *
7482 * Each pipe's definition is stored here at the same index as its pipe instance in
7483 * the data array.
7484 *
7485 * Each host property's name is stored here at the same index as its value in the
7486 * data array.
7487 *
7488 * Each property binding name is stored here at the same index as its value in
7489 * the data array. If the binding is an interpolation, the static string values
7490 * are stored parallel to the dynamic values. Example:
7491 *
7492 * id="prefix {{ v0 }} a {{ v1 }} b {{ v2 }} suffix"
7493 *
7494 * LView | TView.data
7495 *------------------------
7496 * v0 value | 'a'
7497 * v1 value | 'b'
7498 * v2 value | id � prefix � suffix
7499 *
7500 * Injector bloom filters are also stored here.
7501 */
7502declare type TData = (TNode | ɵPipeDef<any> | ɵDirectiveDef<any> | ɵComponentDef<any> | number | TStylingRange | TStylingKey | ProviderToken<any> | TI18n | I18nUpdateOpCodes | TIcu | null | string)[];
7503
7504/** Static data for an <ng-container> */
7505declare interface TElementContainerNode extends TNode {
7506 /** Index in the LView[] array. */
7507 index: number;
7508 child: TElementNode | TTextNode | TContainerNode | TElementContainerNode | TProjectionNode | null;
7509 parent: TElementNode | TElementContainerNode | null;
7510 tViews: null;
7511 projection: null;
7512}
7513
7514/** Static data for an element */
7515declare interface TElementNode extends TNode {
7516 /** Index in the data[] array */
7517 index: number;
7518 child: TElementNode | TTextNode | TElementContainerNode | TContainerNode | TProjectionNode | null;
7519 /**
7520 * Element nodes will have parents unless they are the first node of a component or
7521 * embedded view (which means their parent is in a different view and must be
7522 * retrieved using viewData[HOST_NODE]).
7523 */
7524 parent: TElementNode | TElementContainerNode | null;
7525 tViews: null;
7526 /**
7527 * If this is a component TNode with projection, this will be an array of projected
7528 * TNodes or native nodes (see TNode.projection for more info). If it's a regular element node
7529 * or a component without projection, it will be null.
7530 */
7531 projection: (TNode | RNode[])[] | null;
7532 /**
7533 * Stores TagName
7534 */
7535 value: string;
7536}
7537
7538/**
7539 * Represents an embedded template that can be used to instantiate embedded views.
7540 * To instantiate embedded views based on a template, use the `ViewContainerRef`
7541 * method `createEmbeddedView()`.
7542 *
7543 * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`
7544 * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view
7545 * is injected into the constructor of the directive,
7546 * using the `TemplateRef` token.
7547 *
7548 * You can also use a `Query` to find a `TemplateRef` associated with
7549 * a component or a directive.
7550 *
7551 * @see `ViewContainerRef`
7552 * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)
7553 *
7554 * @publicApi
7555 */
7556export declare abstract class TemplateRef<C> {
7557 /**
7558 * The anchor element in the parent view for this embedded view.
7559 *
7560 * The data-binding and injection contexts of embedded views created from this `TemplateRef`
7561 * inherit from the contexts of this location.
7562 *
7563 * Typically new embedded views are attached to the view container of this location, but in
7564 * advanced use-cases, the view can be attached to a different container while keeping the
7565 * data-binding and injection context from the original location.
7566 *
7567 */
7568 abstract get elementRef(): ElementRef;
7569 /**
7570 * Instantiates an embedded view based on this template,
7571 * and attaches it to the view container.
7572 * @param context The data-binding context of the embedded view, as declared
7573 * in the `<ng-template>` usage.
7574 * @returns The new embedded view object.
7575 */
7576 abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
7577}
7578
7579/**
7580 * The Testability service provides testing hooks that can be accessed from
7581 * the browser. Each bootstrapped Angular application on the page will have
7582 * an instance of Testability.
7583 * @publicApi
7584 */
7585export declare class Testability implements PublicTestability {
7586 private _ngZone;
7587 private _pendingCount;
7588 private _isZoneStable;
7589 private _callbacks;
7590 private taskTrackingZone;
7591 constructor(_ngZone: NgZone);
7592 private _watchAngularEvents;
7593 /**
7594 * Increases the number of pending request
7595 * @deprecated pending requests are now tracked with zones.
7596 */
7597 increasePendingRequestCount(): number;
7598 /**
7599 * Decreases the number of pending request
7600 * @deprecated pending requests are now tracked with zones
7601 */
7602 decreasePendingRequestCount(): number;
7603 /**
7604 * Whether an associated application is stable
7605 */
7606 isStable(): boolean;
7607 private _runCallbacksIfReady;
7608 private getPendingTasks;
7609 private addCallback;
7610 /**
7611 * Wait for the application to be stable with a timeout. If the timeout is reached before that
7612 * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
7613 *
7614 * @param doneCb The callback to invoke when Angular is stable or the timeout expires
7615 * whichever comes first.
7616 * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
7617 * specified, whenStable() will wait forever.
7618 * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
7619 * pending macrotasks changes. If this callback returns true doneCb will not be invoked
7620 * and no further updates will be issued.
7621 */
7622 whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void;
7623 /**
7624 * Get the number of pending requests
7625 * @deprecated pending requests are now tracked with zones
7626 */
7627 getPendingRequestCount(): number;
7628 /**
7629 * Find providers by name
7630 * @param using The root element to search from
7631 * @param provider The name of binding variable
7632 * @param exactMatch Whether using exactMatch
7633 */
7634 findProviders(using: any, provider: string, exactMatch: boolean): any[];
7635 static ɵfac: i0.ɵɵFactoryDeclaration<Testability, never>;
7636 static ɵprov: i0.ɵɵInjectableDeclaration<Testability>;
7637}
7638
7639/**
7640 * A global registry of {@link Testability} instances for specific elements.
7641 * @publicApi
7642 */
7643export declare class TestabilityRegistry {
7644 constructor();
7645 /**
7646 * Registers an application with a testability hook so that it can be tracked
7647 * @param token token of application, root element
7648 * @param testability Testability hook
7649 */
7650 registerApplication(token: any, testability: Testability): void;
7651 /**
7652 * Unregisters an application.
7653 * @param token token of application, root element
7654 */
7655 unregisterApplication(token: any): void;
7656 /**
7657 * Unregisters all applications
7658 */
7659 unregisterAllApplications(): void;
7660 /**
7661 * Get a testability hook associated with the application
7662 * @param elem root element
7663 */
7664 getTestability(elem: any): Testability | null;
7665 /**
7666 * Get all registered testabilities
7667 */
7668 getAllTestabilities(): Testability[];
7669 /**
7670 * Get all registered applications(root elements)
7671 */
7672 getAllRootElements(): any[];
7673 /**
7674 * Find testability of a node in the Tree
7675 * @param elem node
7676 * @param findInAncestors whether finding testability in ancestors if testability was not found in
7677 * current node
7678 */
7679 findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability | null;
7680 static ɵfac: i0.ɵɵFactoryDeclaration<TestabilityRegistry, never>;
7681 static ɵprov: i0.ɵɵInjectableDeclaration<TestabilityRegistry>;
7682}
7683
7684declare interface TextDef {
7685 prefix: string;
7686}
7687
7688/**
7689 * Store information for the i18n translation block.
7690 */
7691declare interface TI18n {
7692 /**
7693 * A set of OpCodes which will create the Text Nodes and ICU anchors for the translation blocks.
7694 *
7695 * NOTE: The ICU anchors are filled in with ICU Update OpCode.
7696 */
7697 create: I18nCreateOpCodes;
7698 /**
7699 * A set of OpCodes which will be executed on each change detection to determine if any changes to
7700 * DOM are required.
7701 */
7702 update: I18nUpdateOpCodes;
7703}
7704
7705declare interface TIcu {
7706 /**
7707 * Defines the ICU type of `select` or `plural`
7708 */
7709 type: IcuType;
7710 /**
7711 * Index in `LView` where the anchor node is stored. `<!-- ICU 0:0 -->`
7712 */
7713 anchorIdx: number;
7714 /**
7715 * Currently selected ICU case pointer.
7716 *
7717 * `lView[currentCaseLViewIndex]` stores the currently selected case. This is needed to know how
7718 * to clean up the current case when transitioning no the new case.
7719 *
7720 * If the value stored is:
7721 * `null`: No current case selected.
7722 * `<0`: A flag which means that the ICU just switched and that `icuUpdate` must be executed
7723 * regardless of the `mask`. (After the execution the flag is cleared)
7724 * `>=0` A currently selected case index.
7725 */
7726 currentCaseLViewIndex: number;
7727 /**
7728 * A list of case values which the current ICU will try to match.
7729 *
7730 * The last value is `other`
7731 */
7732 cases: any[];
7733 /**
7734 * A set of OpCodes to apply in order to build up the DOM render tree for the ICU
7735 */
7736 create: IcuCreateOpCodes[];
7737 /**
7738 * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.
7739 */
7740 remove: I18nRemoveOpCodes[];
7741 /**
7742 * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.
7743 */
7744 update: I18nUpdateOpCodes[];
7745}
7746
7747/**
7748 * Binding data (flyweight) for a particular node that is shared between all templates
7749 * of a specific type.
7750 *
7751 * If a property is:
7752 * - PropertyAliases: that property's data was generated and this is it
7753 * - Null: that property's data was already generated and nothing was found.
7754 * - Undefined: that property's data has not yet been generated
7755 *
7756 * see: https://en.wikipedia.org/wiki/Flyweight_pattern for more on the Flyweight pattern
7757 */
7758declare interface TNode {
7759 /** The type of the TNode. See TNodeType. */
7760 type: TNodeType;
7761 /**
7762 * Index of the TNode in TView.data and corresponding native element in LView.
7763 *
7764 * This is necessary to get from any TNode to its corresponding native element when
7765 * traversing the node tree.
7766 *
7767 * If index is -1, this is a dynamically created container node or embedded view node.
7768 */
7769 index: number;
7770 /**
7771 * Insert before existing DOM node index.
7772 *
7773 * When DOM nodes are being inserted, normally they are being appended as they are created.
7774 * Under i18n case, the translated text nodes are created ahead of time as part of the
7775 * `ɵɵi18nStart` instruction which means that this `TNode` can't just be appended and instead
7776 * needs to be inserted using `insertBeforeIndex` semantics.
7777 *
7778 * Additionally sometimes it is necessary to insert new text nodes as a child of this `TNode`. In
7779 * such a case the value stores an array of text nodes to insert.
7780 *
7781 * Example:
7782 * ```
7783 * <div i18n>
7784 * Hello <span>World</span>!
7785 * </div>
7786 * ```
7787 * In the above example the `ɵɵi18nStart` instruction can create `Hello `, `World` and `!` text
7788 * nodes. It can also insert `Hello ` and `!` text node as a child of `<div>`, but it can't
7789 * insert `World` because the `<span>` node has not yet been created. In such a case the
7790 * `<span>` `TNode` will have an array which will direct the `<span>` to not only insert
7791 * itself in front of `!` but also to insert the `World` (created by `ɵɵi18nStart`) into
7792 * `<span>` itself.
7793 *
7794 * Pseudo code:
7795 * ```
7796 * if (insertBeforeIndex === null) {
7797 * // append as normal
7798 * } else if (Array.isArray(insertBeforeIndex)) {
7799 * // First insert current `TNode` at correct location
7800 * const currentNode = lView[this.index];
7801 * parentNode.insertBefore(currentNode, lView[this.insertBeforeIndex[0]]);
7802 * // Now append all of the children
7803 * for(let i=1; i<this.insertBeforeIndex; i++) {
7804 * currentNode.appendChild(lView[this.insertBeforeIndex[i]]);
7805 * }
7806 * } else {
7807 * parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])
7808 * }
7809 * ```
7810 * - null: Append as normal using `parentNode.appendChild`
7811 * - `number`: Append using
7812 * `parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])`
7813 *
7814 * *Initialization*
7815 *
7816 * Because `ɵɵi18nStart` executes before nodes are created, on `TView.firstCreatePass` it is not
7817 * possible for `ɵɵi18nStart` to set the `insertBeforeIndex` value as the corresponding `TNode`
7818 * has not yet been created. For this reason the `ɵɵi18nStart` creates a `TNodeType.Placeholder`
7819 * `TNode` at that location. See `TNodeType.Placeholder` for more information.
7820 */
7821 insertBeforeIndex: InsertBeforeIndex;
7822 /**
7823 * The index of the closest injector in this node's LView.
7824 *
7825 * If the index === -1, there is no injector on this node or any ancestor node in this view.
7826 *
7827 * If the index !== -1, it is the index of this node's injector OR the index of a parent
7828 * injector in the same view. We pass the parent injector index down the node tree of a view so
7829 * it's possible to find the parent injector without walking a potentially deep node tree.
7830 * Injector indices are not set across view boundaries because there could be multiple component
7831 * hosts.
7832 *
7833 * If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent
7834 * injector.
7835 */
7836 injectorIndex: number;
7837 /**
7838 * Stores starting index of the directives.
7839 *
7840 * NOTE: The first directive is always component (if present).
7841 */
7842 directiveStart: number;
7843 /**
7844 * Stores final exclusive index of the directives.
7845 *
7846 * The area right behind the `directiveStart-directiveEnd` range is used to allocate the
7847 * `HostBindingFunction` `vars` (or null if no bindings.) Therefore `directiveEnd` is used to set
7848 * `LFrame.bindingRootIndex` before `HostBindingFunction` is executed.
7849 */
7850 directiveEnd: number;
7851 /**
7852 * Stores the last directive which had a styling instruction.
7853 *
7854 * Initial value of this is `-1` which means that no `hostBindings` styling instruction has
7855 * executed. As `hostBindings` instructions execute they set the value to the index of the
7856 * `DirectiveDef` which contained the last `hostBindings` styling instruction.
7857 *
7858 * Valid values are:
7859 * - `-1` No `hostBindings` instruction has executed.
7860 * - `directiveStart <= directiveStylingLast < directiveEnd`: Points to the `DirectiveDef` of
7861 * the last styling instruction which executed in the `hostBindings`.
7862 *
7863 * This data is needed so that styling instructions know which static styling data needs to be
7864 * collected from the `DirectiveDef.hostAttrs`. A styling instruction needs to collect all data
7865 * since last styling instruction.
7866 */
7867 directiveStylingLast: number;
7868 /**
7869 * Stores indexes of property bindings. This field is only set in the ngDevMode and holds
7870 * indexes of property bindings so TestBed can get bound property metadata for a given node.
7871 */
7872 propertyBindings: number[] | null;
7873 /**
7874 * Stores if Node isComponent, isProjected, hasContentQuery, hasClassInput and hasStyleInput
7875 * etc.
7876 */
7877 flags: TNodeFlags;
7878 /**
7879 * This number stores two values using its bits:
7880 *
7881 * - the index of the first provider on that node (first 16 bits)
7882 * - the count of view providers from the component on this node (last 16 bits)
7883 */
7884 providerIndexes: TNodeProviderIndexes;
7885 /**
7886 * The value name associated with this node.
7887 * if type:
7888 * `TNodeType.Text`: text value
7889 * `TNodeType.Element`: tag name
7890 * `TNodeType.ICUContainer`: `TIcu`
7891 */
7892 value: any;
7893 /**
7894 * Attributes associated with an element. We need to store attributes to support various
7895 * use-cases (attribute injection, content projection with selectors, directives matching).
7896 * Attributes are stored statically because reading them from the DOM would be way too slow for
7897 * content projection and queries.
7898 *
7899 * Since attrs will always be calculated first, they will never need to be marked undefined by
7900 * other instructions.
7901 *
7902 * For regular attributes a name of an attribute and its value alternate in the array.
7903 * e.g. ['role', 'checkbox']
7904 * This array can contain flags that will indicate "special attributes" (attributes with
7905 * namespaces, attributes extracted from bindings and outputs).
7906 */
7907 attrs: TAttributes | null;
7908 /**
7909 * Same as `TNode.attrs` but contains merged data across all directive host bindings.
7910 *
7911 * We need to keep `attrs` as unmerged so that it can be used for attribute selectors.
7912 * We merge attrs here so that it can be used in a performant way for initial rendering.
7913 *
7914 * The `attrs` are merged in first pass in following order:
7915 * - Component's `hostAttrs`
7916 * - Directives' `hostAttrs`
7917 * - Template `TNode.attrs` associated with the current `TNode`.
7918 */
7919 mergedAttrs: TAttributes | null;
7920 /**
7921 * A set of local names under which a given element is exported in a template and
7922 * visible to queries. An entry in this array can be created for different reasons:
7923 * - an element itself is referenced, ex.: `<div #foo>`
7924 * - a component is referenced, ex.: `<my-cmpt #foo>`
7925 * - a directive is referenced, ex.: `<my-cmpt #foo="directiveExportAs">`.
7926 *
7927 * A given element might have different local names and those names can be associated
7928 * with a directive. We store local names at even indexes while odd indexes are reserved
7929 * for directive index in a view (or `-1` if there is no associated directive).
7930 *
7931 * Some examples:
7932 * - `<div #foo>` => `["foo", -1]`
7933 * - `<my-cmpt #foo>` => `["foo", myCmptIdx]`
7934 * - `<my-cmpt #foo #bar="directiveExportAs">` => `["foo", myCmptIdx, "bar", directiveIdx]`
7935 * - `<div #foo #bar="directiveExportAs">` => `["foo", -1, "bar", directiveIdx]`
7936 */
7937 localNames: (string | number)[] | null;
7938 /** Information about input properties that need to be set once from attribute data. */
7939 initialInputs: InitialInputData | null | undefined;
7940 /**
7941 * Input data for all directives on this node. `null` means that there are no directives with
7942 * inputs on this node.
7943 */
7944 inputs: PropertyAliases | null;
7945 /**
7946 * Output data for all directives on this node. `null` means that there are no directives with
7947 * outputs on this node.
7948 */
7949 outputs: PropertyAliases | null;
7950 /**
7951 * The TView or TViews attached to this node.
7952 *
7953 * If this TNode corresponds to an LContainer with inline views, the container will
7954 * need to store separate static data for each of its view blocks (TView[]). Otherwise,
7955 * nodes in inline views with the same index as nodes in their parent views will overwrite
7956 * each other, as they are in the same template.
7957 *
7958 * Each index in this array corresponds to the static data for a certain
7959 * view. So if you had V(0) and V(1) in a container, you might have:
7960 *
7961 * [
7962 * [{tagName: 'div', attrs: ...}, null], // V(0) TView
7963 * [{tagName: 'button', attrs ...}, null] // V(1) TView
7964 *
7965 * If this TNode corresponds to an LContainer with a template (e.g. structural
7966 * directive), the template's TView will be stored here.
7967 *
7968 * If this TNode corresponds to an element, tViews will be null .
7969 */
7970 tViews: TView | TView[] | null;
7971 /**
7972 * The next sibling node. Necessary so we can propagate through the root nodes of a view
7973 * to insert them or remove them from the DOM.
7974 */
7975 next: TNode | null;
7976 /**
7977 * The next projected sibling. Since in Angular content projection works on the node-by-node
7978 * basis the act of projecting nodes might change nodes relationship at the insertion point
7979 * (target view). At the same time we need to keep initial relationship between nodes as
7980 * expressed in content view.
7981 */
7982 projectionNext: TNode | null;
7983 /**
7984 * First child of the current node.
7985 *
7986 * For component nodes, the child will always be a ContentChild (in same view).
7987 * For embedded view nodes, the child will be in their child view.
7988 */
7989 child: TNode | null;
7990 /**
7991 * Parent node (in the same view only).
7992 *
7993 * We need a reference to a node's parent so we can append the node to its parent's native
7994 * element at the appropriate time.
7995 *
7996 * If the parent would be in a different view (e.g. component host), this property will be null.
7997 * It's important that we don't try to cross component boundaries when retrieving the parent
7998 * because the parent will change (e.g. index, attrs) depending on where the component was
7999 * used (and thus shouldn't be stored on TNode). In these cases, we retrieve the parent through
8000 * LView.node instead (which will be instance-specific).
8001 *
8002 * If this is an inline view node (V), the parent will be its container.
8003 */
8004 parent: TElementNode | TContainerNode | null;
8005 /**
8006 * List of projected TNodes for a given component host element OR index into the said nodes.
8007 *
8008 * For easier discussion assume this example:
8009 * `<parent>`'s view definition:
8010 * ```
8011 * <child id="c1">content1</child>
8012 * <child id="c2"><span>content2</span></child>
8013 * ```
8014 * `<child>`'s view definition:
8015 * ```
8016 * <ng-content id="cont1"></ng-content>
8017 * ```
8018 *
8019 * If `Array.isArray(projection)` then `TNode` is a host element:
8020 * - `projection` stores the content nodes which are to be projected.
8021 * - The nodes represent categories defined by the selector: For example:
8022 * `<ng-content/><ng-content select="abc"/>` would represent the heads for `<ng-content/>`
8023 * and `<ng-content select="abc"/>` respectively.
8024 * - The nodes we store in `projection` are heads only, we used `.next` to get their
8025 * siblings.
8026 * - The nodes `.next` is sorted/rewritten as part of the projection setup.
8027 * - `projection` size is equal to the number of projections `<ng-content>`. The size of
8028 * `c1` will be `1` because `<child>` has only one `<ng-content>`.
8029 * - we store `projection` with the host (`c1`, `c2`) rather than the `<ng-content>` (`cont1`)
8030 * because the same component (`<child>`) can be used in multiple locations (`c1`, `c2`) and
8031 * as a result have different set of nodes to project.
8032 * - without `projection` it would be difficult to efficiently traverse nodes to be projected.
8033 *
8034 * If `typeof projection == 'number'` then `TNode` is a `<ng-content>` element:
8035 * - `projection` is an index of the host's `projection`Nodes.
8036 * - This would return the first head node to project:
8037 * `getHost(currentTNode).projection[currentTNode.projection]`.
8038 * - When projecting nodes the parent node retrieved may be a `<ng-content>` node, in which case
8039 * the process is recursive in nature.
8040 *
8041 * If `projection` is of type `RNode[][]` than we have a collection of native nodes passed as
8042 * projectable nodes during dynamic component creation.
8043 */
8044 projection: (TNode | RNode[])[] | number | null;
8045 /**
8046 * A collection of all `style` static values for an element (including from host).
8047 *
8048 * This field will be populated if and when:
8049 *
8050 * - There are one or more initial `style`s on an element (e.g. `<div style="width:200px;">`)
8051 * - There are one or more initial `style`s on a directive/component host
8052 * (e.g. `@Directive({host: {style: "width:200px;" } }`)
8053 */
8054 styles: string | null;
8055 /**
8056 * A collection of all `style` static values for an element excluding host sources.
8057 *
8058 * Populated when there are one or more initial `style`s on an element
8059 * (e.g. `<div style="width:200px;">`)
8060 * Must be stored separately from `tNode.styles` to facilitate setting directive
8061 * inputs that shadow the `style` property. If we used `tNode.styles` as is for shadowed inputs,
8062 * we would feed host styles back into directives as "inputs". If we used `tNode.attrs`, we
8063 * would have to concatenate the attributes on every template pass. Instead, we process once on
8064 * first create pass and store here.
8065 */
8066 stylesWithoutHost: string | null;
8067 /**
8068 * A `KeyValueArray` version of residual `styles`.
8069 *
8070 * When there are styling instructions than each instruction stores the static styling
8071 * which is of lower priority than itself. This means that there may be a higher priority
8072 * styling than the instruction.
8073 *
8074 * Imagine:
8075 * ```
8076 * <div style="color: highest;" my-dir>
8077 *
8078 * @Directive({
8079 * host: {
8080 * style: 'color: lowest; ',
8081 * '[styles.color]': 'exp' // ɵɵstyleProp('color', ctx.exp);
8082 * }
8083 * })
8084 * ```
8085 *
8086 * In the above case:
8087 * - `color: lowest` is stored with `ɵɵstyleProp('color', ctx.exp);` instruction
8088 * - `color: highest` is the residual and is stored here.
8089 *
8090 * - `undefined': not initialized.
8091 * - `null`: initialized but `styles` is `null`
8092 * - `KeyValueArray`: parsed version of `styles`.
8093 */
8094 residualStyles: KeyValueArray<any> | undefined | null;
8095 /**
8096 * A collection of all class static values for an element (including from host).
8097 *
8098 * This field will be populated if and when:
8099 *
8100 * - There are one or more initial classes on an element (e.g. `<div class="one two three">`)
8101 * - There are one or more initial classes on an directive/component host
8102 * (e.g. `@Directive({host: {class: "SOME_CLASS" } }`)
8103 */
8104 classes: string | null;
8105 /**
8106 * A collection of all class static values for an element excluding host sources.
8107 *
8108 * Populated when there are one or more initial classes on an element
8109 * (e.g. `<div class="SOME_CLASS">`)
8110 * Must be stored separately from `tNode.classes` to facilitate setting directive
8111 * inputs that shadow the `class` property. If we used `tNode.classes` as is for shadowed
8112 * inputs, we would feed host classes back into directives as "inputs". If we used
8113 * `tNode.attrs`, we would have to concatenate the attributes on every template pass. Instead,
8114 * we process once on first create pass and store here.
8115 */
8116 classesWithoutHost: string | null;
8117 /**
8118 * A `KeyValueArray` version of residual `classes`.
8119 *
8120 * Same as `TNode.residualStyles` but for classes.
8121 *
8122 * - `undefined': not initialized.
8123 * - `null`: initialized but `classes` is `null`
8124 * - `KeyValueArray`: parsed version of `classes`.
8125 */
8126 residualClasses: KeyValueArray<any> | undefined | null;
8127 /**
8128 * Stores the head/tail index of the class bindings.
8129 *
8130 * - If no bindings, the head and tail will both be 0.
8131 * - If there are template bindings, stores the head/tail of the class bindings in the template.
8132 * - If no template bindings but there are host bindings, the head value will point to the last
8133 * host binding for "class" (not the head of the linked list), tail will be 0.
8134 *
8135 * See: `style_binding_list.ts` for details.
8136 *
8137 * This is used by `insertTStylingBinding` to know where the next styling binding should be
8138 * inserted so that they can be sorted in priority order.
8139 */
8140 classBindings: TStylingRange;
8141 /**
8142 * Stores the head/tail index of the class bindings.
8143 *
8144 * - If no bindings, the head and tail will both be 0.
8145 * - If there are template bindings, stores the head/tail of the style bindings in the template.
8146 * - If no template bindings but there are host bindings, the head value will point to the last
8147 * host binding for "style" (not the head of the linked list), tail will be 0.
8148 *
8149 * See: `style_binding_list.ts` for details.
8150 *
8151 * This is used by `insertTStylingBinding` to know where the next styling binding should be
8152 * inserted so that they can be sorted in priority order.
8153 */
8154 styleBindings: TStylingRange;
8155}
8156
8157/**
8158 * Corresponds to the TNode.flags property.
8159 */
8160declare const enum TNodeFlags {
8161 /** Bit #1 - This bit is set if the node is a host for any directive (including a component) */
8162 isDirectiveHost = 1,
8163 /**
8164 * Bit #2 - This bit is set if the node is a host for a component.
8165 *
8166 * Setting this bit implies that the `isDirectiveHost` bit is set as well.
8167 * */
8168 isComponentHost = 2,
8169 /** Bit #3 - This bit is set if the node has been projected */
8170 isProjected = 4,
8171 /** Bit #4 - This bit is set if any directive on this node has content queries */
8172 hasContentQuery = 8,
8173 /** Bit #5 - This bit is set if the node has any "class" inputs */
8174 hasClassInput = 16,
8175 /** Bit #6 - This bit is set if the node has any "style" inputs */
8176 hasStyleInput = 32,
8177 /** Bit #7 This bit is set if the node has been detached by i18n */
8178 isDetached = 64,
8179 /**
8180 * Bit #8 - This bit is set if the node has directives with host bindings.
8181 *
8182 * This flags allows us to guard host-binding logic and invoke it only on nodes
8183 * that actually have directives with host bindings.
8184 */
8185 hasHostBindings = 128
8186}
8187
8188/**
8189 * Corresponds to the TNode.providerIndexes property.
8190 */
8191declare const enum TNodeProviderIndexes {
8192 /** The index of the first provider on this node is encoded on the least significant bits. */
8193 ProvidersStartIndexMask = 1048575,
8194 /**
8195 * The count of view providers from the component on this node is
8196 * encoded on the 20 most significant bits.
8197 */
8198 CptViewProvidersCountShift = 20,
8199 CptViewProvidersCountShifter = 1048576
8200}
8201
8202/**
8203 * TNodeType corresponds to the {@link TNode} `type` property.
8204 *
8205 * NOTE: type IDs are such that we use each bit to denote a type. This is done so that we can easily
8206 * check if the `TNode` is of more than one type.
8207 *
8208 * `if (tNode.type === TNodeType.Text || tNode.type === TNode.Element)`
8209 * can be written as:
8210 * `if (tNode.type & (TNodeType.Text | TNodeType.Element))`
8211 *
8212 * However any given `TNode` can only be of one type.
8213 */
8214declare const enum TNodeType {
8215 /**
8216 * The TNode contains information about a DOM element aka {@link RText}.
8217 */
8218 Text = 1,
8219 /**
8220 * The TNode contains information about a DOM element aka {@link RElement}.
8221 */
8222 Element = 2,
8223 /**
8224 * The TNode contains information about an {@link LContainer} for embedded views.
8225 */
8226 Container = 4,
8227 /**
8228 * The TNode contains information about an `<ng-container>` element {@link RNode}.
8229 */
8230 ElementContainer = 8,
8231 /**
8232 * The TNode contains information about an `<ng-content>` projection
8233 */
8234 Projection = 16,
8235 /**
8236 * The TNode contains information about an ICU comment used in `i18n`.
8237 */
8238 Icu = 32,
8239 /**
8240 * Special node type representing a placeholder for future `TNode` at this location.
8241 *
8242 * I18n translation blocks are created before the element nodes which they contain. (I18n blocks
8243 * can span over many elements.) Because i18n `TNode`s (representing text) are created first they
8244 * often may need to point to element `TNode`s which are not yet created. In such a case we create
8245 * a `Placeholder` `TNode`. This allows the i18n to structurally link the `TNode`s together
8246 * without knowing any information about the future nodes which will be at that location.
8247 *
8248 * On `firstCreatePass` When element instruction executes it will try to create a `TNode` at that
8249 * location. Seeing a `Placeholder` `TNode` already there tells the system that it should reuse
8250 * existing `TNode` (rather than create a new one) and just update the missing information.
8251 */
8252 Placeholder = 64,
8253 AnyRNode = 3,
8254 AnyContainer = 12
8255}
8256
8257/**
8258 * Type representing a set of TNodes that can have local refs (`#foo`) placed on them.
8259 */
8260declare type TNodeWithLocalRefs = TContainerNode | TElementNode | TElementContainerNode;
8261
8262/** Static data for an LProjectionNode */
8263declare interface TProjectionNode extends TNode {
8264 /** Index in the data[] array */
8265 child: null;
8266 /**
8267 * Projection nodes will have parents unless they are the first node of a component
8268 * or embedded view (which means their parent is in a different view and must be
8269 * retrieved using LView.node).
8270 */
8271 parent: TElementNode | TElementContainerNode | null;
8272 tViews: null;
8273 /** Index of the projection node. (See TNode.projection for more info.) */
8274 projection: number;
8275 value: null;
8276}
8277
8278/**
8279 * TQueries represent a collection of individual TQuery objects tracked in a given view. Most of the
8280 * methods on this interface are simple proxy methods to the corresponding functionality on TQuery.
8281 */
8282declare interface TQueries {
8283 /**
8284 * Adds a new TQuery to a collection of queries tracked in a given view.
8285 * @param tQuery
8286 */
8287 track(tQuery: TQuery): void;
8288 /**
8289 * Returns a TQuery instance for at the given index in the queries array.
8290 * @param index
8291 */
8292 getByIndex(index: number): TQuery;
8293 /**
8294 * Returns the number of queries tracked in a given view.
8295 */
8296 length: number;
8297 /**
8298 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8299 * `elementStart` on each and every TQuery.
8300 * @param tView
8301 * @param tNode
8302 */
8303 elementStart(tView: TView, tNode: TNode): void;
8304 /**
8305 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8306 * `elementEnd` on each and every TQuery.
8307 * @param tNode
8308 */
8309 elementEnd(tNode: TNode): void;
8310 /**
8311 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8312 * `template` on each and every TQuery.
8313 * @param tView
8314 * @param tNode
8315 */
8316 template(tView: TView, tNode: TNode): void;
8317 /**
8318 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8319 * `embeddedTView` on each and every TQuery.
8320 * @param tNode
8321 */
8322 embeddedTView(tNode: TNode): TQueries | null;
8323}
8324
8325/**
8326 * TQuery objects represent all the query-related data that remain the same from one view instance
8327 * to another and can be determined on the very first template pass. Most notably TQuery holds all
8328 * the matches for a given view.
8329 */
8330declare interface TQuery {
8331 /**
8332 * Query metadata extracted from query annotations.
8333 */
8334 metadata: TQueryMetadata;
8335 /**
8336 * Index of a query in a declaration view in case of queries propagated to en embedded view, -1
8337 * for queries declared in a given view. We are storing this index so we can find a parent query
8338 * to clone for an embedded view (when an embedded view is created).
8339 */
8340 indexInDeclarationView: number;
8341 /**
8342 * Matches collected on the first template pass. Each match is a pair of:
8343 * - TNode index;
8344 * - match index;
8345 *
8346 * A TNode index can be either:
8347 * - a positive number (the most common case) to indicate a matching TNode;
8348 * - a negative number to indicate that a given query is crossing a <ng-template> element and
8349 * results from views created based on TemplateRef should be inserted at this place.
8350 *
8351 * A match index is a number used to find an actual value (for a given node) when query results
8352 * are materialized. This index can have one of the following values:
8353 * - -2 - indicates that we need to read a special token (TemplateRef, ViewContainerRef etc.);
8354 * - -1 - indicates that we need to read a default value based on the node type (TemplateRef for
8355 * ng-template and ElementRef for other elements);
8356 * - a positive number - index of an injectable to be read from the element injector.
8357 */
8358 matches: number[] | null;
8359 /**
8360 * A flag indicating if a given query crosses an <ng-template> element. This flag exists for
8361 * performance reasons: we can notice that queries not crossing any <ng-template> elements will
8362 * have matches from a given view only (and adapt processing accordingly).
8363 */
8364 crossesNgTemplate: boolean;
8365 /**
8366 * A method call when a given query is crossing an element (or element container). This is where a
8367 * given TNode is matched against a query predicate.
8368 * @param tView
8369 * @param tNode
8370 */
8371 elementStart(tView: TView, tNode: TNode): void;
8372 /**
8373 * A method called when processing the elementEnd instruction - this is mostly useful to determine
8374 * if a given content query should match any nodes past this point.
8375 * @param tNode
8376 */
8377 elementEnd(tNode: TNode): void;
8378 /**
8379 * A method called when processing the template instruction. This is where a
8380 * given TContainerNode is matched against a query predicate.
8381 * @param tView
8382 * @param tNode
8383 */
8384 template(tView: TView, tNode: TNode): void;
8385 /**
8386 * A query-related method called when an embedded TView is created based on the content of a
8387 * <ng-template> element. We call this method to determine if a given query should be propagated
8388 * to the embedded view and if so - return a cloned TQuery for this embedded view.
8389 * @param tNode
8390 * @param childQueryIndex
8391 */
8392 embeddedTView(tNode: TNode, childQueryIndex: number): TQuery | null;
8393}
8394
8395/**
8396 * An object representing query metadata extracted from query annotations.
8397 */
8398declare interface TQueryMetadata {
8399 predicate: ProviderToken<unknown> | string[];
8400 read: any;
8401 flags: QueryFlags;
8402}
8403
8404/**
8405 * A function optionally passed into the `NgForOf` directive to customize how `NgForOf` uniquely
8406 * identifies items in an iterable.
8407 *
8408 * `NgForOf` needs to uniquely identify items in the iterable to correctly perform DOM updates
8409 * when items in the iterable are reordered, new items are added, or existing items are removed.
8410 *
8411 *
8412 * In all of these scenarios it is usually desirable to only update the DOM elements associated
8413 * with the items affected by the change. This behavior is important to:
8414 *
8415 * - preserve any DOM-specific UI state (like cursor position, focus, text selection) when the
8416 * iterable is modified
8417 * - enable animation of item addition, removal, and iterable reordering
8418 * - preserve the value of the `<select>` element when nested `<option>` elements are dynamically
8419 * populated using `NgForOf` and the bound iterable is updated
8420 *
8421 * A common use for custom `trackBy` functions is when the model that `NgForOf` iterates over
8422 * contains a property with a unique identifier. For example, given a model:
8423 *
8424 * ```ts
8425 * class User {
8426 * id: number;
8427 * name: string;
8428 * ...
8429 * }
8430 * ```
8431 * a custom `trackBy` function could look like the following:
8432 * ```ts
8433 * function userTrackBy(index, user) {
8434 * return user.id;
8435 * }
8436 * ```
8437 *
8438 * A custom `trackBy` function must have several properties:
8439 *
8440 * - be [idempotent](https://en.wikipedia.org/wiki/Idempotence) (be without side effects, and always
8441 * return the same value for a given input)
8442 * - return unique value for all unique inputs
8443 * - be fast
8444 *
8445 * @see [`NgForOf#ngForTrackBy`](api/common/NgForOf#ngForTrackBy)
8446 * @publicApi
8447 */
8448export declare interface TrackByFunction<T> {
8449 /**
8450 * @param index The index of the item within the iterable.
8451 * @param item The item in the iterable.
8452 */
8453 <U extends T>(index: number, item: T & U): any;
8454}
8455
8456/**
8457 * Use this token at bootstrap to provide the content of your translation file (`xtb`,
8458 * `xlf` or `xlf2`) when you want to translate your application in another language.
8459 *
8460 * See the [i18n guide](guide/i18n-common-merge) for more information.
8461 *
8462 * @usageNotes
8463 * ### Example
8464 *
8465 * ```typescript
8466 * import { TRANSLATIONS } from '@angular/core';
8467 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
8468 * import { AppModule } from './app/app.module';
8469 *
8470 * // content of your translation file
8471 * const translations = '....';
8472 *
8473 * platformBrowserDynamic().bootstrapModule(AppModule, {
8474 * providers: [{provide: TRANSLATIONS, useValue: translations }]
8475 * });
8476 * ```
8477 *
8478 * @publicApi
8479 */
8480export declare const TRANSLATIONS: InjectionToken<string>;
8481
8482/**
8483 * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,
8484 * `xlf` or `xlf2`.
8485 *
8486 * See the [i18n guide](guide/i18n-common-merge) for more information.
8487 *
8488 * @usageNotes
8489 * ### Example
8490 *
8491 * ```typescript
8492 * import { TRANSLATIONS_FORMAT } from '@angular/core';
8493 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
8494 * import { AppModule } from './app/app.module';
8495 *
8496 * platformBrowserDynamic().bootstrapModule(AppModule, {
8497 * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]
8498 * });
8499 * ```
8500 *
8501 * @publicApi
8502 */
8503export declare const TRANSLATIONS_FORMAT: InjectionToken<string>;
8504
8505declare const TRANSPLANTED_VIEWS_TO_REFRESH = 5;
8506
8507
8508/**
8509 * @fileoverview
8510 * While Angular only uses Trusted Types internally for the time being,
8511 * references to Trusted Types could leak into our core.d.ts, which would force
8512 * anyone compiling against @angular/core to provide the @types/trusted-types
8513 * package in their compilation unit.
8514 *
8515 * Until https://github.com/microsoft/TypeScript/issues/30024 is resolved, we
8516 * will keep Angular's public API surface free of references to Trusted Types.
8517 * For internal and semi-private APIs that need to reference Trusted Types, the
8518 * minimal type definitions for the Trusted Types API provided by this module
8519 * should be used instead. They are marked as "declare" to prevent them from
8520 * being renamed by compiler optimization.
8521 *
8522 * Adapted from
8523 * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/trusted-types/index.d.ts
8524 * but restricted to the API surface used within Angular.
8525 */
8526declare interface TrustedHTML {
8527 __brand__: 'TrustedHTML';
8528}
8529
8530declare interface TrustedScript {
8531 __brand__: 'TrustedScript';
8532}
8533
8534declare interface TrustedScriptURL {
8535 __brand__: 'TrustedScriptURL';
8536}
8537
8538/**
8539 * Value stored in the `TData` which is needed to re-concatenate the styling.
8540 *
8541 * See: `TStylingKeyPrimitive` and `TStylingStatic`
8542 */
8543declare type TStylingKey = TStylingKeyPrimitive | TStylingStatic;
8544
8545/**
8546 * The primitive portion (`TStylingStatic` removed) of the value stored in the `TData` which is
8547 * needed to re-concatenate the styling.
8548 *
8549 * - `string`: Stores the property name. Used with `ɵɵstyleProp`/`ɵɵclassProp` instruction.
8550 * - `null`: Represents map, so there is no name. Used with `ɵɵstyleMap`/`ɵɵclassMap`.
8551 * - `false`: Represents an ignore case. This happens when `ɵɵstyleProp`/`ɵɵclassProp` instruction
8552 * is combined with directive which shadows its input `@Input('class')`. That way the binding
8553 * should not participate in the styling resolution.
8554 */
8555declare type TStylingKeyPrimitive = string | null | false;
8556
8557/**
8558 * This is a branded number which contains previous and next index.
8559 *
8560 * When we come across styling instructions we need to store the `TStylingKey` in the correct
8561 * order so that we can re-concatenate the styling value in the desired priority.
8562 *
8563 * The insertion can happen either at the:
8564 * - end of template as in the case of coming across additional styling instruction in the template
8565 * - in front of the template in the case of coming across additional instruction in the
8566 * `hostBindings`.
8567 *
8568 * We use `TStylingRange` to store the previous and next index into the `TData` where the template
8569 * bindings can be found.
8570 *
8571 * - bit 0 is used to mark that the previous index has a duplicate for current value.
8572 * - bit 1 is used to mark that the next index has a duplicate for the current value.
8573 * - bits 2-16 are used to encode the next/tail of the template.
8574 * - bits 17-32 are used to encode the previous/head of template.
8575 *
8576 * NODE: *duplicate* false implies that it is statically known that this binding will not collide
8577 * with other bindings and therefore there is no need to check other bindings. For example the
8578 * bindings in `<div [style.color]="exp" [style.width]="exp">` will never collide and will have
8579 * their bits set accordingly. Previous duplicate means that we may need to check previous if the
8580 * current binding is `null`. Next duplicate means that we may need to check next bindings if the
8581 * current binding is not `null`.
8582 *
8583 * NOTE: `0` has special significance and represents `null` as in no additional pointer.
8584 */
8585declare interface TStylingRange {
8586 __brand__: 'TStylingRange';
8587}
8588
8589/**
8590 * Store the static values for the styling binding.
8591 *
8592 * The `TStylingStatic` is just `KeyValueArray` where key `""` (stored at location 0) contains the
8593 * `TStylingKey` (stored at location 1). In other words this wraps the `TStylingKey` such that the
8594 * `""` contains the wrapped value.
8595 *
8596 * When instructions are resolving styling they may need to look forward or backwards in the linked
8597 * list to resolve the value. For this reason we have to make sure that he linked list also contains
8598 * the static values. However the list only has space for one item per styling instruction. For this
8599 * reason we store the static values here as part of the `TStylingKey`. This means that the
8600 * resolution function when looking for a value needs to first look at the binding value, and than
8601 * at `TStylingKey` (if it exists).
8602 *
8603 * Imagine we have:
8604 *
8605 * ```
8606 * <div class="TEMPLATE" my-dir>
8607 *
8608 * @Directive({
8609 * host: {
8610 * class: 'DIR',
8611 * '[class.dynamic]': 'exp' // ɵɵclassProp('dynamic', ctx.exp);
8612 * }
8613 * })
8614 * ```
8615 *
8616 * In the above case the linked list will contain one item:
8617 *
8618 * ```
8619 * // assume binding location: 10 for `ɵɵclassProp('dynamic', ctx.exp);`
8620 * tData[10] = <TStylingStatic>[
8621 * '': 'dynamic', // This is the wrapped value of `TStylingKey`
8622 * 'DIR': true, // This is the default static value of directive binding.
8623 * ];
8624 * tData[10 + 1] = 0; // We don't have prev/next.
8625 *
8626 * lView[10] = undefined; // assume `ctx.exp` is `undefined`
8627 * lView[10 + 1] = undefined; // Just normalized `lView[10]`
8628 * ```
8629 *
8630 * So when the function is resolving styling value, it first needs to look into the linked list
8631 * (there is none) and than into the static `TStylingStatic` too see if there is a default value for
8632 * `dynamic` (there is not). Therefore it is safe to remove it.
8633 *
8634 * If setting `true` case:
8635 * ```
8636 * lView[10] = true; // assume `ctx.exp` is `true`
8637 * lView[10 + 1] = true; // Just normalized `lView[10]`
8638 * ```
8639 * So when the function is resolving styling value, it first needs to look into the linked list
8640 * (there is none) and than into `TNode.residualClass` (TNode.residualStyle) which contains
8641 * ```
8642 * tNode.residualClass = [
8643 * 'TEMPLATE': true,
8644 * ];
8645 * ```
8646 *
8647 * This means that it is safe to add class.
8648 */
8649declare interface TStylingStatic extends KeyValueArray<any> {
8650}
8651
8652/** Static data for a text node */
8653declare interface TTextNode extends TNode {
8654 /** Index in the data[] array */
8655 index: number;
8656 child: null;
8657 /**
8658 * Text nodes will have parents unless they are the first node of a component or
8659 * embedded view (which means their parent is in a different view and must be
8660 * retrieved using LView.node).
8661 */
8662 parent: TElementNode | TElementContainerNode | null;
8663 tViews: null;
8664 projection: null;
8665}
8666
8667declare const TVIEW = 1;
8668
8669/**
8670 * The static data for an LView (shared between all templates of a
8671 * given type).
8672 *
8673 * Stored on the `ComponentDef.tView`.
8674 */
8675declare interface TView {
8676 /**
8677 * Type of `TView` (`Root`|`Component`|`Embedded`).
8678 */
8679 type: TViewType;
8680 /**
8681 * This is a blueprint used to generate LView instances for this TView. Copying this
8682 * blueprint is faster than creating a new LView from scratch.
8683 */
8684 blueprint: LView;
8685 /**
8686 * The template function used to refresh the view of dynamically created views
8687 * and components. Will be null for inline views.
8688 */
8689 template: ComponentTemplate<{}> | null;
8690 /**
8691 * A function containing query-related instructions.
8692 */
8693 viewQuery: ViewQueriesFunction<{}> | null;
8694 /**
8695 * A `TNode` representing the declaration location of this `TView` (not part of this TView).
8696 */
8697 declTNode: TNode | null;
8698 /** Whether or not this template has been processed in creation mode. */
8699 firstCreatePass: boolean;
8700 /**
8701 * Whether or not this template has been processed in update mode (e.g. change detected)
8702 *
8703 * `firstUpdatePass` is used by styling to set up `TData` to contain metadata about the styling
8704 * instructions. (Mainly to build up a linked list of styling priority order.)
8705 *
8706 * Typically this function gets cleared after first execution. If exception is thrown then this
8707 * flag can remain turned un until there is first successful (no exception) pass. This means that
8708 * individual styling instructions keep track of if they have already been added to the linked
8709 * list to prevent double adding.
8710 */
8711 firstUpdatePass: boolean;
8712 /** Static data equivalent of LView.data[]. Contains TNodes, PipeDefInternal or TI18n. */
8713 data: TData;
8714 /**
8715 * The binding start index is the index at which the data array
8716 * starts to store bindings only. Saving this value ensures that we
8717 * will begin reading bindings at the correct point in the array when
8718 * we are in update mode.
8719 *
8720 * -1 means that it has not been initialized.
8721 */
8722 bindingStartIndex: number;
8723 /**
8724 * The index where the "expando" section of `LView` begins. The expando
8725 * section contains injectors, directive instances, and host binding values.
8726 * Unlike the "decls" and "vars" sections of `LView`, the length of this
8727 * section cannot be calculated at compile-time because directives are matched
8728 * at runtime to preserve locality.
8729 *
8730 * We store this start index so we know where to start checking host bindings
8731 * in `setHostBindings`.
8732 */
8733 expandoStartIndex: number;
8734 /**
8735 * Whether or not there are any static view queries tracked on this view.
8736 *
8737 * We store this so we know whether or not we should do a view query
8738 * refresh after creation mode to collect static query results.
8739 */
8740 staticViewQueries: boolean;
8741 /**
8742 * Whether or not there are any static content queries tracked on this view.
8743 *
8744 * We store this so we know whether or not we should do a content query
8745 * refresh after creation mode to collect static query results.
8746 */
8747 staticContentQueries: boolean;
8748 /**
8749 * A reference to the first child node located in the view.
8750 */
8751 firstChild: TNode | null;
8752 /**
8753 * Stores the OpCodes to be replayed during change-detection to process the `HostBindings`
8754 *
8755 * See `HostBindingOpCodes` for encoding details.
8756 */
8757 hostBindingOpCodes: HostBindingOpCodes | null;
8758 /**
8759 * Full registry of directives and components that may be found in this view.
8760 *
8761 * It's necessary to keep a copy of the full def list on the TView so it's possible
8762 * to render template functions without a host component.
8763 */
8764 directiveRegistry: DirectiveDefList | null;
8765 /**
8766 * Full registry of pipes that may be found in this view.
8767 *
8768 * The property is either an array of `PipeDefs`s or a function which returns the array of
8769 * `PipeDefs`s. The function is necessary to be able to support forward declarations.
8770 *
8771 * It's necessary to keep a copy of the full def list on the TView so it's possible
8772 * to render template functions without a host component.
8773 */
8774 pipeRegistry: PipeDefList | null;
8775 /**
8776 * Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in
8777 * creation mode.
8778 *
8779 * This array has a flat structure and contains TNode indices, directive indices (where an
8780 * instance can be found in `LView`) and hook functions. TNode index is followed by the directive
8781 * index and a hook function. If there are multiple hooks for a given TNode, the TNode index is
8782 * not repeated and the next lifecycle hook information is stored right after the previous hook
8783 * function. This is done so that at runtime the system can efficiently iterate over all of the
8784 * functions to invoke without having to make any decisions/lookups.
8785 */
8786 preOrderHooks: HookData | null;
8787 /**
8788 * Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.
8789 *
8790 * This array has the same structure as the `preOrderHooks` one.
8791 */
8792 preOrderCheckHooks: HookData | null;
8793 /**
8794 * Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed
8795 * for this view in creation mode.
8796 *
8797 * Even indices: Directive index
8798 * Odd indices: Hook function
8799 */
8800 contentHooks: HookData | null;
8801 /**
8802 * Array of ngAfterContentChecked hooks that should be executed for this view in update
8803 * mode.
8804 *
8805 * Even indices: Directive index
8806 * Odd indices: Hook function
8807 */
8808 contentCheckHooks: HookData | null;
8809 /**
8810 * Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for
8811 * this view in creation mode.
8812 *
8813 * Even indices: Directive index
8814 * Odd indices: Hook function
8815 */
8816 viewHooks: HookData | null;
8817 /**
8818 * Array of ngAfterViewChecked hooks that should be executed for this view in
8819 * update mode.
8820 *
8821 * Even indices: Directive index
8822 * Odd indices: Hook function
8823 */
8824 viewCheckHooks: HookData | null;
8825 /**
8826 * Array of ngOnDestroy hooks that should be executed when this view is destroyed.
8827 *
8828 * Even indices: Directive index
8829 * Odd indices: Hook function
8830 */
8831 destroyHooks: DestroyHookData | null;
8832 /**
8833 * When a view is destroyed, listeners need to be released and outputs need to be
8834 * unsubscribed. This cleanup array stores both listener data (in chunks of 4)
8835 * and output data (in chunks of 2) for a particular view. Combining the arrays
8836 * saves on memory (70 bytes per array) and on a few bytes of code size (for two
8837 * separate for loops).
8838 *
8839 * If it's a native DOM listener or output subscription being stored:
8840 * 1st index is: event name `name = tView.cleanup[i+0]`
8841 * 2nd index is: index of native element or a function that retrieves global target (window,
8842 * document or body) reference based on the native element:
8843 * `typeof idxOrTargetGetter === 'function'`: global target getter function
8844 * `typeof idxOrTargetGetter === 'number'`: index of native element
8845 *
8846 * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`
8847 * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`
8848 * `typeof useCaptureOrIndx == 'boolean' : useCapture boolean
8849 * `typeof useCaptureOrIndx == 'number':
8850 * `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`
8851 * `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`
8852 *
8853 * If it's an output subscription or query list destroy hook:
8854 * 1st index is: output unsubscribe function / query list destroy function
8855 * 2nd index is: index of function context in LView.cleanupInstances[]
8856 * `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`
8857 */
8858 cleanup: any[] | null;
8859 /**
8860 * A list of element indices for child components that will need to be
8861 * refreshed when the current view has finished its check. These indices have
8862 * already been adjusted for the HEADER_OFFSET.
8863 *
8864 */
8865 components: number[] | null;
8866 /**
8867 * A collection of queries tracked in a given view.
8868 */
8869 queries: TQueries | null;
8870 /**
8871 * An array of indices pointing to directives with content queries alongside with the
8872 * corresponding query index. Each entry in this array is a tuple of:
8873 * - index of the first content query index declared by a given directive;
8874 * - index of a directive.
8875 *
8876 * We are storing those indexes so we can refresh content queries as part of a view refresh
8877 * process.
8878 */
8879 contentQueries: number[] | null;
8880 /**
8881 * Set of schemas that declare elements to be allowed inside the view.
8882 */
8883 schemas: SchemaMetadata[] | null;
8884 /**
8885 * Array of constants for the view. Includes attribute arrays, local definition arrays etc.
8886 * Used for directive matching, attribute bindings, local definitions and more.
8887 */
8888 consts: TConstants | null;
8889 /**
8890 * Indicates that there was an error before we managed to complete the first create pass of the
8891 * view. This means that the view is likely corrupted and we should try to recover it.
8892 */
8893 incompleteFirstPass: boolean;
8894}
8895
8896/**
8897 * Explicitly marks `TView` as a specific type in `ngDevMode`
8898 *
8899 * It is useful to know conceptually what time of `TView` we are dealing with when
8900 * debugging an application (even if the runtime does not need it.) For this reason
8901 * we store this information in the `ngDevMode` `TView` and than use it for
8902 * better debugging experience.
8903 */
8904declare const enum TViewType {
8905 /**
8906 * Root `TView` is the used to bootstrap components into. It is used in conjunction with
8907 * `LView` which takes an existing DOM node not owned by Angular and wraps it in `TView`/`LView`
8908 * so that other components can be loaded into it.
8909 */
8910 Root = 0,
8911 /**
8912 * `TView` associated with a Component. This would be the `TView` directly associated with the
8913 * component view (as opposed an `Embedded` `TView` which would be a child of `Component` `TView`)
8914 */
8915 Component = 1,
8916 /**
8917 * `TView` associated with a template. Such as `*ngIf`, `<ng-template>` etc... A `Component`
8918 * can have zero or more `Embedede` `TView`s.
8919 */
8920 Embedded = 2
8921}
8922
8923/**
8924 * Special location which allows easy identification of type. If we have an array which was
8925 * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is
8926 * `LContainer`.
8927 */
8928declare const TYPE = 1;
8929
8930/**
8931 * @description
8932 *
8933 * Represents a type that a Component or other object is instances of.
8934 *
8935 * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by
8936 * the `MyCustomComponent` constructor function.
8937 *
8938 * @publicApi
8939 */
8940export declare const Type: FunctionConstructor;
8941
8942export declare interface Type<T> extends Function {
8943 new (...args: any[]): T;
8944}
8945
8946declare type Type_2 = Function;
8947
8948/**
8949 * An interface implemented by all Angular type decorators, which allows them to be used as
8950 * decorators as well as Angular syntax.
8951 *
8952 * ```
8953 * @ng.Component({...})
8954 * class MyClass {...}
8955 * ```
8956 *
8957 * @publicApi
8958 */
8959export declare interface TypeDecorator {
8960 /**
8961 * Invoke as decorator.
8962 */
8963 <T extends Type<any>>(type: T): T;
8964 (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
8965}
8966
8967/**
8968 * Configures the `Injector` to return an instance of `Type` when `Type' is used as the token.
8969 *
8970 * Create an instance by invoking the `new` operator and supplying additional arguments.
8971 * This form is a short form of `TypeProvider`;
8972 *
8973 * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
8974 *
8975 * @usageNotes
8976 *
8977 * {@example core/di/ts/provider_spec.ts region='TypeProvider'}
8978 *
8979 * @publicApi
8980 */
8981export declare interface TypeProvider extends Type<any> {
8982}
8983
8984/**
8985 * Configures the `Injector` to return a value for a token.
8986 * @see ["Dependency Injection Guide"](guide/dependency-injection).
8987 *
8988 * @usageNotes
8989 *
8990 * ### Example
8991 *
8992 * {@example core/di/ts/provider_spec.ts region='ValueProvider'}
8993 *
8994 * ### Multi-value example
8995 *
8996 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
8997 *
8998 * @publicApi
8999 */
9000export declare interface ValueProvider extends ValueSansProvider {
9001 /**
9002 * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
9003 */
9004 provide: any;
9005 /**
9006 * When true, injector returns an array of instances. This is useful to allow multiple
9007 * providers spread across many files to provide configuration information to a common token.
9008 */
9009 multi?: boolean;
9010}
9011
9012/**
9013 * Configures the `Injector` to return a value for a token.
9014 * Base for `ValueProvider` decorator.
9015 *
9016 * @publicApi
9017 */
9018export declare interface ValueSansProvider {
9019 /**
9020 * The value to inject.
9021 */
9022 useValue: any;
9023}
9024
9025/**
9026 * @publicApi
9027 */
9028export declare const VERSION: Version;
9029
9030
9031/**
9032 * @description Represents the version of Angular
9033 *
9034 * @publicApi
9035 */
9036export declare class Version {
9037 full: string;
9038 readonly major: string;
9039 readonly minor: string;
9040 readonly patch: string;
9041 constructor(full: string);
9042}
9043
9044declare const VIEW_REFS = 8;
9045
9046/**
9047 * Type of the ViewChild metadata.
9048 *
9049 * @publicApi
9050 */
9051export declare type ViewChild = Query;
9052
9053/**
9054 * ViewChild decorator and metadata.
9055 *
9056 * @Annotation
9057 * @publicApi
9058 */
9059export declare const ViewChild: ViewChildDecorator;
9060
9061/**
9062 * Type of the ViewChild decorator / constructor function.
9063 *
9064 * @see `ViewChild`.
9065 * @publicApi
9066 */
9067export declare interface ViewChildDecorator {
9068 /**
9069 * @description
9070 * Property decorator that configures a view query.
9071 * The change detector looks for the first element or the directive matching the selector
9072 * in the view DOM. If the view DOM changes, and a new child matches the selector,
9073 * the property is updated.
9074 *
9075 * View queries are set before the `ngAfterViewInit` callback is called.
9076 *
9077 * **Metadata Properties**:
9078 *
9079 * * **selector** - The directive type or the name used for querying.
9080 * * **read** - Used to read a different token from the queried elements.
9081 * * **static** - True to resolve query results before change detection runs,
9082 * false to resolve after change detection. Defaults to false.
9083 *
9084 *
9085 * The following selectors are supported.
9086 * * Any class with the `@Component` or `@Directive` decorator
9087 * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
9088 * with `@ViewChild('cmp')`)
9089 * * Any provider defined in the child component tree of the current component (e.g.
9090 * `@ViewChild(SomeService) someService: SomeService`)
9091 * * Any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:
9092 * any`)
9093 * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)
9094 * template;`)
9095 *
9096 * The following values are supported by `read`:
9097 * * Any class with the `@Component` or `@Directive` decorator
9098 * * Any provider defined on the injector of the component that is matched by the `selector` of
9099 * this query
9100 * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
9101 * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
9102 *
9103 * @usageNotes
9104 *
9105 * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}
9106 *
9107 * ### Example 2
9108 *
9109 * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}
9110 *
9111 * @Annotation
9112 */
9113 (selector: ProviderToken<unknown> | Function | string, opts?: {
9114 read?: any;
9115 static?: boolean;
9116 }): any;
9117 new (selector: ProviderToken<unknown> | Function | string, opts?: {
9118 read?: any;
9119 static?: boolean;
9120 }): ViewChild;
9121}
9122
9123/**
9124 * Type of the ViewChildren metadata.
9125 *
9126 * @publicApi
9127 */
9128export declare type ViewChildren = Query;
9129
9130/**
9131 * ViewChildren decorator and metadata.
9132 *
9133 * @Annotation
9134 * @publicApi
9135 */
9136export declare const ViewChildren: ViewChildrenDecorator;
9137
9138/**
9139 * Type of the ViewChildren decorator / constructor function.
9140 *
9141 * @see `ViewChildren`.
9142 *
9143 * @publicApi
9144 */
9145export declare interface ViewChildrenDecorator {
9146 /**
9147 * @description
9148 * Property decorator that configures a view query.
9149 *
9150 * Use to get the `QueryList` of elements or directives from the view DOM.
9151 * Any time a child element is added, removed, or moved, the query list will be updated,
9152 * and the changes observable of the query list will emit a new value.
9153 *
9154 * View queries are set before the `ngAfterViewInit` callback is called.
9155 *
9156 * **Metadata Properties**:
9157 *
9158 * * **selector** - The directive type or the name used for querying.
9159 * * **read** - Used to read a different token from the queried elements.
9160 * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only
9161 * if the QueryList result has changed. When `false` the `changes` observable might emit even
9162 * if the QueryList has not changed.
9163 * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and
9164 * removed in future versions of Angular.
9165 *
9166 * The following selectors are supported.
9167 * * Any class with the `@Component` or `@Directive` decorator
9168 * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
9169 * with `@ViewChildren('cmp')`)
9170 * * Any provider defined in the child component tree of the current component (e.g.
9171 * `@ViewChildren(SomeService) someService!: SomeService`)
9172 * * Any provider defined through a string token (e.g. `@ViewChildren('someToken')
9173 * someTokenVal!: any`)
9174 * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChildren(TemplateRef)
9175 * template;`)
9176 *
9177 * In addition, multiple string selectors can be separated with a comma (e.g.
9178 * `@ViewChildren('cmp1,cmp2')`)
9179 *
9180 * The following values are supported by `read`:
9181 * * Any class with the `@Component` or `@Directive` decorator
9182 * * Any provider defined on the injector of the component that is matched by the `selector` of
9183 * this query
9184 * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
9185 * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
9186 *
9187 * @usageNotes
9188 *
9189 * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}
9190 *
9191 * ### Another example
9192 *
9193 * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'}
9194 *
9195 * @Annotation
9196 */
9197 (selector: ProviderToken<unknown> | Function | string, opts?: {
9198 read?: any;
9199 emitDistinctChangesOnly?: boolean;
9200 }): any;
9201 new (selector: ProviderToken<unknown> | Function | string, opts?: {
9202 read?: any;
9203 emitDistinctChangesOnly?: boolean;
9204 }): ViewChildren;
9205}
9206
9207/**
9208 * Represents a container where one or more views can be attached to a component.
9209 *
9210 * Can contain *host views* (created by instantiating a
9211 * component with the `createComponent()` method), and *embedded views*
9212 * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
9213 *
9214 * A view container instance can contain other view containers,
9215 * creating a [view hierarchy](guide/glossary#view-tree).
9216 *
9217 * @see `ComponentRef`
9218 * @see `EmbeddedViewRef`
9219 *
9220 * @publicApi
9221 */
9222export declare abstract class ViewContainerRef {
9223 /**
9224 * Anchor element that specifies the location of this container in the containing view.
9225 * Each view container can have only one anchor element, and each anchor element
9226 * can have only a single view container.
9227 *
9228 * Root elements of views attached to this container become siblings of the anchor element in
9229 * the rendered view.
9230 *
9231 * Access the `ViewContainerRef` of an element by placing a `Directive` injected
9232 * with `ViewContainerRef` on the element, or use a `ViewChild` query.
9233 *
9234 * <!-- TODO: rename to anchorElement -->
9235 */
9236 abstract get element(): ElementRef;
9237 /**
9238 * The [dependency injector](guide/glossary#injector) for this view container.
9239 */
9240 abstract get injector(): Injector;
9241 /** @deprecated No replacement */
9242 abstract get parentInjector(): Injector;
9243 /**
9244 * Destroys all views in this container.
9245 */
9246 abstract clear(): void;
9247 /**
9248 * Retrieves a view from this container.
9249 * @param index The 0-based index of the view to retrieve.
9250 * @returns The `ViewRef` instance, or null if the index is out of range.
9251 */
9252 abstract get(index: number): ViewRef | null;
9253 /**
9254 * Reports how many views are currently attached to this container.
9255 * @returns The number of views.
9256 */
9257 abstract get length(): number;
9258 /**
9259 * Instantiates an embedded view and inserts it
9260 * into this container.
9261 * @param templateRef The HTML template that defines the view.
9262 * @param context The data-binding context of the embedded view, as declared
9263 * in the `<ng-template>` usage.
9264 * @param index The 0-based index at which to insert the new view into this container.
9265 * If not specified, appends the new view as the last entry.
9266 *
9267 * @returns The `ViewRef` instance for the newly created view.
9268 */
9269 abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
9270 /**
9271 * Instantiates a single component and inserts its host view into this container.
9272 *
9273 * @param componentType Component Type to use.
9274 * @param options An object that contains extra parameters:
9275 * * index: the index at which to insert the new component's host view into this container.
9276 * If not specified, appends the new view as the last entry.
9277 * * injector: the injector to use as the parent for the new component.
9278 * * ngModuleRef: an NgModuleRef of the component's NgModule, you should almost always provide
9279 * this to ensure that all expected providers are available for the component
9280 * instantiation.
9281 * * projectableNodes: list of DOM nodes that should be projected through
9282 * [`<ng-content>`](api/core/ng-content) of the new component instance.
9283 *
9284 * @returns The new `ComponentRef` which contains the component instance and the host view.
9285 */
9286 abstract createComponent<C>(componentType: Type<C>, options?: {
9287 index?: number;
9288 injector?: Injector;
9289 ngModuleRef?: NgModuleRef<unknown>;
9290 projectableNodes?: Node[][];
9291 }): ComponentRef<C>;
9292 /**
9293 * Instantiates a single component and inserts its host view into this container.
9294 *
9295 * @param componentFactory Component factory to use.
9296 * @param index The index at which to insert the new component's host view into this container.
9297 * If not specified, appends the new view as the last entry.
9298 * @param injector The injector to use as the parent for the new component.
9299 * @param projectableNodes List of DOM nodes that should be projected through
9300 * [`<ng-content>`](api/core/ng-content) of the new component instance.
9301 * @param ngModuleRef An instance of the NgModuleRef that represent an NgModule.
9302 * This information is used to retrieve corresponding NgModule injector.
9303 *
9304 * @returns The new `ComponentRef` which contains the component instance and the host view.
9305 *
9306 * @deprecated Angular no longer requires component factories to dynamically create components.
9307 * Use different signature of the `createComponent` method, which allows passing
9308 * Component class directly.
9309 */
9310 abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], ngModuleRef?: NgModuleRef<any>): ComponentRef<C>;
9311 /**
9312 * Inserts a view into this container.
9313 * @param viewRef The view to insert.
9314 * @param index The 0-based index at which to insert the view.
9315 * If not specified, appends the new view as the last entry.
9316 * @returns The inserted `ViewRef` instance.
9317 *
9318 */
9319 abstract insert(viewRef: ViewRef, index?: number): ViewRef;
9320 /**
9321 * Moves a view to a new location in this container.
9322 * @param viewRef The view to move.
9323 * @param index The 0-based index of the new location.
9324 * @returns The moved `ViewRef` instance.
9325 */
9326 abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;
9327 /**
9328 * Returns the index of a view within the current container.
9329 * @param viewRef The view to query.
9330 * @returns The 0-based index of the view's position in this container,
9331 * or `-1` if this container doesn't contain the view.
9332 */
9333 abstract indexOf(viewRef: ViewRef): number;
9334 /**
9335 * Destroys a view attached to this container
9336 * @param index The 0-based index of the view to destroy.
9337 * If not specified, the last view in the container is removed.
9338 */
9339 abstract remove(index?: number): void;
9340 /**
9341 * Detaches a view from this container without destroying it.
9342 * Use along with `insert()` to move a view within the current container.
9343 * @param index The 0-based index of the view to detach.
9344 * If not specified, the last view in the container is detached.
9345 */
9346 abstract detach(index?: number): ViewRef | null;
9347}
9348
9349/**
9350 * View instance data.
9351 * Attention: Adding fields to this is performance sensitive!
9352 */
9353declare interface ViewData {
9354 def: ɵViewDefinition;
9355 root: RootData;
9356 renderer: Renderer2;
9357 parentNodeDef: NodeDef | null;
9358 parent: ViewData | null;
9359 viewContainerParent: ViewData | null;
9360 component: any;
9361 context: any;
9362 nodes: {
9363 [key: number]: NodeData;
9364 };
9365 state: ViewState;
9366 oldValues: any[];
9367 disposables: DisposableFn[] | null;
9368 initIndex: number;
9369}
9370
9371declare interface ViewDefinitionFactory extends DefinitionFactory<ɵViewDefinition> {
9372}
9373
9374
9375/**
9376 * Defines template and style encapsulation options available for Component's {@link Component}.
9377 *
9378 * See {@link Component#encapsulation encapsulation}.
9379 *
9380 * @usageNotes
9381 * ### Example
9382 *
9383 * {@example core/ts/metadata/encapsulation.ts region='longform'}
9384 *
9385 * @publicApi
9386 */
9387export declare enum ViewEncapsulation {
9388 /**
9389 * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
9390 * Element and pre-processing the style rules provided via {@link Component#styles styles} or
9391 * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all
9392 * selectors.
9393 *
9394 * This is the default option.
9395 */
9396 Emulated = 0,
9397 /**
9398 * Don't provide any template or style encapsulation.
9399 */
9400 None = 2,
9401 /**
9402 * Use Shadow DOM to encapsulate styles.
9403 *
9404 * For the DOM this means using modern [Shadow
9405 * DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and
9406 * creating a ShadowRoot for Component's Host Element.
9407 */
9408 ShadowDom = 3
9409}
9410
9411declare enum ViewEncapsulation_2 {
9412 Emulated = 0,
9413 None = 2,
9414 ShadowDom = 3
9415}
9416
9417declare interface viewEngine_ChangeDetectorRef_interface extends ChangeDetectorRef {
9418}
9419
9420declare interface ViewHandleEventFn {
9421 (view: ViewData, nodeIndex: number, eventName: string, event: any): boolean;
9422}
9423
9424/**
9425 * Definition of what a view queries function should look like.
9426 */
9427declare type ViewQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U) => void;
9428
9429/**
9430 * Represents an Angular [view](guide/glossary#view "Definition").
9431 *
9432 * @see {@link ChangeDetectorRef#usage-notes Change detection usage}
9433 *
9434 * @publicApi
9435 */
9436export declare abstract class ViewRef extends ChangeDetectorRef {
9437 /**
9438 * Destroys this view and all of the data structures associated with it.
9439 */
9440 abstract destroy(): void;
9441 /**
9442 * Reports whether this view has been destroyed.
9443 * @returns True after the `destroy()` method has been called, false otherwise.
9444 */
9445 abstract get destroyed(): boolean;
9446 /**
9447 * A lifecycle hook that provides additional developer-defined cleanup
9448 * functionality for views.
9449 * @param callback A handler function that cleans up developer-defined data
9450 * associated with a view. Called when the `destroy()` method is invoked.
9451 */
9452 abstract onDestroy(callback: Function): any /** TODO #9100 */;
9453}
9454
9455declare class ViewRef_2<T> implements EmbeddedViewRef<T>, InternalViewRef, viewEngine_ChangeDetectorRef_interface {
9456 /**
9457 * This represents the `LView` associated with the point where `ChangeDetectorRef` was
9458 * requested.
9459 *
9460 * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
9461 */
9462 private _cdRefInjectingView?;
9463 private _appRef;
9464 private _attachedToViewContainer;
9465 get rootNodes(): any[];
9466 constructor(
9467 /**
9468 * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.
9469 *
9470 * When ViewRef is created for a dynamic component, this also represents the `LView` for the
9471 * component.
9472 *
9473 * For a "regular" ViewRef created for an embedded view, this is the `LView` for the embedded
9474 * view.
9475 *
9476 * @internal
9477 */
9478 _lView: LView,
9479 /**
9480 * This represents the `LView` associated with the point where `ChangeDetectorRef` was
9481 * requested.
9482 *
9483 * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
9484 */
9485 _cdRefInjectingView?: LView | undefined);
9486 get context(): T;
9487 set context(value: T);
9488 get destroyed(): boolean;
9489 destroy(): void;
9490 onDestroy(callback: Function): void;
9491 /**
9492 * Marks a view and all of its ancestors dirty.
9493 *
9494 * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is
9495 * checked when it needs to be re-rendered but the two normal triggers haven't marked it
9496 * dirty (i.e. inputs haven't changed and events haven't fired in the view).
9497 *
9498 * <!-- TODO: Add a link to a chapter on OnPush components -->
9499 *
9500 * @usageNotes
9501 * ### Example
9502 *
9503 * ```typescript
9504 * @Component({
9505 * selector: 'app-root',
9506 * template: `Number of ticks: {{numberOfTicks}}`
9507 * changeDetection: ChangeDetectionStrategy.OnPush,
9508 * })
9509 * class AppComponent {
9510 * numberOfTicks = 0;
9511 *
9512 * constructor(private ref: ChangeDetectorRef) {
9513 * setInterval(() => {
9514 * this.numberOfTicks++;
9515 * // the following is required, otherwise the view will not be updated
9516 * this.ref.markForCheck();
9517 * }, 1000);
9518 * }
9519 * }
9520 * ```
9521 */
9522 markForCheck(): void;
9523 /**
9524 * Detaches the view from the change detection tree.
9525 *
9526 * Detached views will not be checked during change detection runs until they are
9527 * re-attached, even if they are dirty. `detach` can be used in combination with
9528 * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
9529 * detection checks.
9530 *
9531 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
9532 * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
9533 *
9534 * @usageNotes
9535 * ### Example
9536 *
9537 * The following example defines a component with a large list of readonly data.
9538 * Imagine the data changes constantly, many times per second. For performance reasons,
9539 * we want to check and update the list every five seconds. We can do that by detaching
9540 * the component's change detector and doing a local check every five seconds.
9541 *
9542 * ```typescript
9543 * class DataProvider {
9544 * // in a real application the returned data will be different every time
9545 * get data() {
9546 * return [1,2,3,4,5];
9547 * }
9548 * }
9549 *
9550 * @Component({
9551 * selector: 'giant-list',
9552 * template: `
9553 * <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
9554 * `,
9555 * })
9556 * class GiantList {
9557 * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
9558 * ref.detach();
9559 * setInterval(() => {
9560 * this.ref.detectChanges();
9561 * }, 5000);
9562 * }
9563 * }
9564 *
9565 * @Component({
9566 * selector: 'app',
9567 * providers: [DataProvider],
9568 * template: `
9569 * <giant-list><giant-list>
9570 * `,
9571 * })
9572 * class App {
9573 * }
9574 * ```
9575 */
9576 detach(): void;
9577 /**
9578 * Re-attaches a view to the change detection tree.
9579 *
9580 * This can be used to re-attach views that were previously detached from the tree
9581 * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
9582 *
9583 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
9584 *
9585 * @usageNotes
9586 * ### Example
9587 *
9588 * The following example creates a component displaying `live` data. The component will detach
9589 * its change detector from the main change detector tree when the component's live property
9590 * is set to false.
9591 *
9592 * ```typescript
9593 * class DataProvider {
9594 * data = 1;
9595 *
9596 * constructor() {
9597 * setInterval(() => {
9598 * this.data = this.data * 2;
9599 * }, 500);
9600 * }
9601 * }
9602 *
9603 * @Component({
9604 * selector: 'live-data',
9605 * inputs: ['live'],
9606 * template: 'Data: {{dataProvider.data}}'
9607 * })
9608 * class LiveData {
9609 * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
9610 *
9611 * set live(value) {
9612 * if (value) {
9613 * this.ref.reattach();
9614 * } else {
9615 * this.ref.detach();
9616 * }
9617 * }
9618 * }
9619 *
9620 * @Component({
9621 * selector: 'app-root',
9622 * providers: [DataProvider],
9623 * template: `
9624 * Live Update: <input type="checkbox" [(ngModel)]="live">
9625 * <live-data [live]="live"><live-data>
9626 * `,
9627 * })
9628 * class AppComponent {
9629 * live = true;
9630 * }
9631 * ```
9632 */
9633 reattach(): void;
9634 /**
9635 * Checks the view and its children.
9636 *
9637 * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement
9638 * local change detection checks.
9639 *
9640 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
9641 * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
9642 *
9643 * @usageNotes
9644 * ### Example
9645 *
9646 * The following example defines a component with a large list of readonly data.
9647 * Imagine, the data changes constantly, many times per second. For performance reasons,
9648 * we want to check and update the list every five seconds.
9649 *
9650 * We can do that by detaching the component's change detector and doing a local change detection
9651 * check every five seconds.
9652 *
9653 * See {@link ChangeDetectorRef#detach detach} for more information.
9654 */
9655 detectChanges(): void;
9656 /**
9657 * Checks the change detector and its children, and throws if any changes are detected.
9658 *
9659 * This is used in development mode to verify that running change detection doesn't
9660 * introduce other changes.
9661 */
9662 checkNoChanges(): void;
9663 attachToViewContainerRef(): void;
9664 detachFromAppRef(): void;
9665 attachToAppRef(appRef: ViewRefTracker): void;
9666}
9667
9668/**
9669 * Interface for tracking root `ViewRef`s in `ApplicationRef`.
9670 *
9671 * NOTE: Importing `ApplicationRef` here directly creates circular dependency, which is why we have
9672 * a subset of the `ApplicationRef` interface `ViewRefTracker` here.
9673 */
9674declare interface ViewRefTracker {
9675 detachView(viewRef: ViewRef): void;
9676}
9677
9678/**
9679 * Bitmask of states
9680 */
9681declare const enum ViewState {
9682 BeforeFirstCheck = 1,
9683 FirstCheck = 2,
9684 Attached = 4,
9685 ChecksEnabled = 8,
9686 IsProjectedView = 16,
9687 CheckProjectedView = 32,
9688 CheckProjectedViews = 64,
9689 Destroyed = 128,
9690 InitState_Mask = 1792,
9691 InitState_BeforeInit = 0,
9692 InitState_CallingOnInit = 256,
9693 InitState_CallingAfterContentInit = 512,
9694 InitState_CallingAfterViewInit = 768,
9695 InitState_AfterInit = 1024,
9696 CatDetectChanges = 12,
9697 CatInit = 13
9698}
9699
9700declare interface ViewUpdateFn {
9701 (check: NodeCheckFn, view: ViewData): void;
9702}
9703
9704/**
9705 * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to
9706 * the DOM in a browser environment.
9707 */
9708export declare function ɵ_sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): TrustedHTML | string;
9709
9710
9711export declare function ɵ_sanitizeUrl(url: string): string;
9712
9713export declare const ɵALLOW_MULTIPLE_PLATFORMS: InjectionToken<boolean>;
9714
9715export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Html): value is ɵSafeHtml;
9716
9717export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.ResourceUrl): value is ɵSafeResourceUrl;
9718
9719export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Script): value is ɵSafeScript;
9720
9721export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Style): value is ɵSafeStyle;
9722
9723export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Url): value is ɵSafeUrl;
9724
9725export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType): boolean;
9726
9727export declare function ɵand(flags: ɵNodeFlags, matchedQueriesDsl: null | [string | number, ɵQueryValueType][], ngContentIndex: null | number, childCount: number, handleEvent?: null | ElementHandleEventFn, templateFactory?: ViewDefinitionFactory): NodeDef;
9728
9729/**
9730 * Providers that generate a random `APP_ID_TOKEN`.
9731 * @publicApi
9732 */
9733export declare const ɵAPP_ID_RANDOM_PROVIDER: {
9734 provide: InjectionToken<string>;
9735 useFactory: typeof _appIdRandomProviderFactory;
9736 deps: any[];
9737};
9738
9739export declare const enum ɵArgumentType {
9740 Inline = 0,
9741 Dynamic = 1
9742}
9743
9744/**
9745 * A set of marker values to be used in the attributes arrays. These markers indicate that some
9746 * items are not regular attributes and the processing should be adapted accordingly.
9747 */
9748export declare const enum ɵAttributeMarker {
9749 /**
9750 * An implicit marker which indicates that the value in the array are of `attributeKey`,
9751 * `attributeValue` format.
9752 *
9753 * NOTE: This is implicit as it is the type when no marker is present in array. We indicate that
9754 * it should not be present at runtime by the negative number.
9755 */
9756 ImplicitAttributes = -1,
9757 /**
9758 * Marker indicates that the following 3 values in the attributes array are:
9759 * namespaceUri, attributeName, attributeValue
9760 * in that order.
9761 */
9762 NamespaceURI = 0,
9763 /**
9764 * Signals class declaration.
9765 *
9766 * Each value following `Classes` designates a class name to include on the element.
9767 * ## Example:
9768 *
9769 * Given:
9770 * ```
9771 * <div class="foo bar baz">...<d/vi>
9772 * ```
9773 *
9774 * the generated code is:
9775 * ```
9776 * var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];
9777 * ```
9778 */
9779 Classes = 1,
9780 /**
9781 * Signals style declaration.
9782 *
9783 * Each pair of values following `Styles` designates a style name and value to include on the
9784 * element.
9785 * ## Example:
9786 *
9787 * Given:
9788 * ```
9789 * <div style="width:100px; height:200px; color:red">...</div>
9790 * ```
9791 *
9792 * the generated code is:
9793 * ```
9794 * var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];
9795 * ```
9796 */
9797 Styles = 2,
9798 /**
9799 * Signals that the following attribute names were extracted from input or output bindings.
9800 *
9801 * For example, given the following HTML:
9802 *
9803 * ```
9804 * <div moo="car" [foo]="exp" (bar)="doSth()">
9805 * ```
9806 *
9807 * the generated code is:
9808 *
9809 * ```
9810 * var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];
9811 * ```
9812 */
9813 Bindings = 3,
9814 /**
9815 * Signals that the following attribute names were hoisted from an inline-template declaration.
9816 *
9817 * For example, given the following HTML:
9818 *
9819 * ```
9820 * <div *ngFor="let value of values; trackBy:trackBy" dirA [dirB]="value">
9821 * ```
9822 *
9823 * the generated code for the `template()` instruction would include:
9824 *
9825 * ```
9826 * ['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf',
9827 * 'ngForTrackBy', 'let-value']
9828 * ```
9829 *
9830 * while the generated code for the `element()` instruction inside the template function would
9831 * include:
9832 *
9833 * ```
9834 * ['dirA', '', AttributeMarker.Bindings, 'dirB']
9835 * ```
9836 */
9837 Template = 4,
9838 /**
9839 * Signals that the following attribute is `ngProjectAs` and its value is a parsed
9840 * `CssSelector`.
9841 *
9842 * For example, given the following HTML:
9843 *
9844 * ```
9845 * <h1 attr="value" ngProjectAs="[title]">
9846 * ```
9847 *
9848 * the generated code for the `element()` instruction would include:
9849 *
9850 * ```
9851 * ['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]
9852 * ```
9853 */
9854 ProjectAs = 5,
9855 /**
9856 * Signals that the following attribute will be translated by runtime i18n
9857 *
9858 * For example, given the following HTML:
9859 *
9860 * ```
9861 * <div moo="car" foo="value" i18n-foo [bar]="binding" i18n-bar>
9862 * ```
9863 *
9864 * the generated code is:
9865 *
9866 * ```
9867 * var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];
9868 */
9869 I18n = 6
9870}
9871
9872export declare const enum ɵBindingFlags {
9873 TypeElementAttribute = 1,
9874 TypeElementClass = 2,
9875 TypeElementStyle = 4,
9876 TypeProperty = 8,
9877 SyntheticProperty = 16,
9878 SyntheticHostProperty = 32,
9879 CatSyntheticProperty = 48,
9880 Types = 15
9881}
9882
9883/**
9884 * Mark `html` string as trusted.
9885 *
9886 * This function wraps the trusted string in `String` and brands it in a way which makes it
9887 * recognizable to {@link htmlSanitizer} to be trusted implicitly.
9888 *
9889 * @param trustedHtml `html` string which needs to be implicitly trusted.
9890 * @returns a `html` which has been branded to be implicitly trusted.
9891 */
9892export declare function ɵbypassSanitizationTrustHtml(trustedHtml: string): ɵSafeHtml;
9893
9894/**
9895 * Mark `url` string as trusted.
9896 *
9897 * This function wraps the trusted string in `String` and brands it in a way which makes it
9898 * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.
9899 *
9900 * @param trustedResourceUrl `url` string which needs to be implicitly trusted.
9901 * @returns a `url` which has been branded to be implicitly trusted.
9902 */
9903export declare function ɵbypassSanitizationTrustResourceUrl(trustedResourceUrl: string): ɵSafeResourceUrl;
9904
9905/**
9906 * Mark `script` string as trusted.
9907 *
9908 * This function wraps the trusted string in `String` and brands it in a way which makes it
9909 * recognizable to {@link scriptSanitizer} to be trusted implicitly.
9910 *
9911 * @param trustedScript `script` string which needs to be implicitly trusted.
9912 * @returns a `script` which has been branded to be implicitly trusted.
9913 */
9914export declare function ɵbypassSanitizationTrustScript(trustedScript: string): ɵSafeScript;
9915
9916/**
9917 * Mark `style` string as trusted.
9918 *
9919 * This function wraps the trusted string in `String` and brands it in a way which makes it
9920 * recognizable to {@link styleSanitizer} to be trusted implicitly.
9921 *
9922 * @param trustedStyle `style` string which needs to be implicitly trusted.
9923 * @returns a `style` hich has been branded to be implicitly trusted.
9924 */
9925export declare function ɵbypassSanitizationTrustStyle(trustedStyle: string): ɵSafeStyle;
9926
9927/**
9928 * Mark `url` string as trusted.
9929 *
9930 * This function wraps the trusted string in `String` and brands it in a way which makes it
9931 * recognizable to {@link urlSanitizer} to be trusted implicitly.
9932 *
9933 * @param trustedUrl `url` string which needs to be implicitly trusted.
9934 * @returns a `url` which has been branded to be implicitly trusted.
9935 */
9936export declare function ɵbypassSanitizationTrustUrl(trustedUrl: string): ɵSafeUrl;
9937
9938
9939export declare const enum ɵBypassType {
9940 Url = "URL",
9941 Html = "HTML",
9942 ResourceUrl = "ResourceURL",
9943 Script = "Script",
9944 Style = "Style"
9945}
9946
9947export declare function ɵccf(selector: string, componentType: Type<any>, viewDefFactory: ViewDefinitionFactory, inputs: {
9948 [propName: string]: string;
9949} | null, outputs: {
9950 [propName: string]: string;
9951}, ngContentSelectors: string[]): ComponentFactory<any>;
9952
9953/**
9954 * Defines the possible states of the default change detector.
9955 * @see `ChangeDetectorRef`
9956 */
9957export declare enum ɵChangeDetectorStatus {
9958 /**
9959 * A state in which, after calling `detectChanges()`, the change detector
9960 * state becomes `Checked`, and must be explicitly invoked or reactivated.
9961 */
9962 CheckOnce = 0,
9963 /**
9964 * A state in which change detection is skipped until the change detector mode
9965 * becomes `CheckOnce`.
9966 */
9967 Checked = 1,
9968 /**
9969 * A state in which change detection continues automatically until explicitly
9970 * deactivated.
9971 */
9972 CheckAlways = 2,
9973 /**
9974 * A state in which a change detector sub tree is not a part of the main tree and
9975 * should be skipped.
9976 */
9977 Detached = 3,
9978 /**
9979 * Indicates that the change detector encountered an error checking a binding
9980 * or calling a directive lifecycle method and is now in an inconsistent state. Change
9981 * detectors in this state do not detect changes.
9982 */
9983 Errored = 4,
9984 /**
9985 * Indicates that the change detector has been destroyed.
9986 */
9987 Destroyed = 5
9988}
9989
9990export declare function ɵclearOverrides(): void;
9991
9992export declare function ɵclearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component>;
9993
9994export declare function ɵcmf(ngModuleType: Type<any>, bootstrapComponents: Type<any>[], defFactory: NgModuleDefinitionFactory): NgModuleFactory<any>;
9995
9996export declare class ɵCodegenComponentFactoryResolver implements ComponentFactoryResolver {
9997 private _parent;
9998 private _ngModule;
9999 private _factories;
10000 constructor(factories: ComponentFactory<any>[], _parent: ComponentFactoryResolver, _ngModule: NgModuleRef<any>);
10001 resolveComponentFactory<T>(component: {
10002 new (...args: any[]): T;
10003 }): ComponentFactory<T>;
10004}
10005
10006/**
10007 * Compile an Angular component according to its decorator metadata, and patch the resulting
10008 * component def (ɵcmp) onto the component type.
10009 *
10010 * Compilation may be asynchronous (due to the need to resolve URLs for the component template or
10011 * other resources, for example). In the event that compilation is not immediate, `compileComponent`
10012 * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`
10013 * until the global queue has been resolved with a call to `resolveComponentResources`.
10014 */
10015export declare function ɵcompileComponent(type: Type<any>, metadata: Component): void;
10016
10017/**
10018 * Compile an Angular directive according to its decorator metadata, and patch the resulting
10019 * directive def onto the component type.
10020 *
10021 * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which
10022 * will resolve when compilation completes and the directive becomes usable.
10023 */
10024export declare function ɵcompileDirective(type: Type<any>, directive: Directive | null): void;
10025
10026/**
10027 * Compiles a module in JIT mode.
10028 *
10029 * This function automatically gets called when a class has a `@NgModule` decorator.
10030 */
10031export declare function ɵcompileNgModule(moduleType: Type<any>, ngModule?: NgModule): void;
10032
10033/**
10034 * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.
10035 *
10036 * It's possible to compile a module via this API which will allow duplicate declarations in its
10037 * root.
10038 */
10039export declare function ɵcompileNgModuleDefs(moduleType: ɵNgModuleType, ngModule: NgModule, allowDuplicateDeclarationsInRoot?: boolean): void;
10040
10041export declare function ɵcompileNgModuleFactory__POST_R3__<M>(injector: Injector, options: CompilerOptions, moduleType: Type<M>): Promise<NgModuleFactory<M>>;
10042
10043export declare function ɵcompilePipe(type: Type<any>, meta: Pipe): void;
10044
10045export declare const ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__: <T>(moduleType: Type<T>) => Promise<ModuleWithComponentFactories<T>>;
10046
10047export declare const ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__: <T>(moduleType: Type<T>) => ModuleWithComponentFactories<T>;
10048
10049export declare const ɵCompiler_compileModuleAsync__POST_R3__: <T>(moduleType: Type<T>) => Promise<NgModuleFactory<T>>;
10050
10051export declare const ɵCompiler_compileModuleSync__POST_R3__: <T>(moduleType: Type<T>) => NgModuleFactory<T>;
10052
10053/**
10054 * Runtime link information for Components.
10055 *
10056 * This is an internal data structure used by the render to link
10057 * components into templates.
10058 *
10059 * NOTE: Always use `defineComponent` function to create this object,
10060 * never create the object directly since the shape of this object
10061 * can change between versions.
10062 *
10063 * See: {@link defineComponent}
10064 */
10065export declare interface ɵComponentDef<T> extends ɵDirectiveDef<T> {
10066 /**
10067 * Runtime unique component ID.
10068 */
10069 readonly id: string;
10070 /**
10071 * The View template of the component.
10072 */
10073 readonly template: ComponentTemplate<T>;
10074 /** Constants associated with the component's view. */
10075 readonly consts: TConstantsOrFactory | null;
10076 /**
10077 * An array of `ngContent[selector]` values that were found in the template.
10078 */
10079 readonly ngContentSelectors?: string[];
10080 /**
10081 * A set of styles that the component needs to be present for component to render correctly.
10082 */
10083 readonly styles: string[];
10084 /**
10085 * The number of nodes, local refs, and pipes in this component template.
10086 *
10087 * Used to calculate the length of the component's LView array, so we
10088 * can pre-fill the array and set the binding start index.
10089 */
10090 readonly decls: number;
10091 /**
10092 * The number of bindings in this component template (including pure fn bindings).
10093 *
10094 * Used to calculate the length of the component's LView array, so we
10095 * can pre-fill the array and set the host binding start index.
10096 */
10097 readonly vars: number;
10098 /**
10099 * Query-related instructions for a component.
10100 */
10101 viewQuery: ViewQueriesFunction<T> | null;
10102 /**
10103 * The view encapsulation type, which determines how styles are applied to
10104 * DOM elements. One of
10105 * - `Emulated` (default): Emulate native scoping of styles.
10106 * - `Native`: Use the native encapsulation mechanism of the renderer.
10107 * - `ShadowDom`: Use modern [ShadowDOM](https://w3c.github.io/webcomponents/spec/shadow/) and
10108 * create a ShadowRoot for component's host element.
10109 * - `None`: Do not provide any template or style encapsulation.
10110 */
10111 readonly encapsulation: ViewEncapsulation;
10112 /**
10113 * Defines arbitrary developer-defined data to be stored on a renderer instance.
10114 * This is useful for renderers that delegate to other renderers.
10115 */
10116 readonly data: {
10117 [kind: string]: any;
10118 };
10119 /** Whether or not this component's ChangeDetectionStrategy is OnPush */
10120 readonly onPush: boolean;
10121 /**
10122 * Registry of directives and components that may be found in this view.
10123 *
10124 * The property is either an array of `DirectiveDef`s or a function which returns the array of
10125 * `DirectiveDef`s. The function is necessary to be able to support forward declarations.
10126 */
10127 directiveDefs: DirectiveDefListOrFactory | null;
10128 /**
10129 * Registry of pipes that may be found in this view.
10130 *
10131 * The property is either an array of `PipeDefs`s or a function which returns the array of
10132 * `PipeDefs`s. The function is necessary to be able to support forward declarations.
10133 */
10134 pipeDefs: PipeDefListOrFactory | null;
10135 /**
10136 * The set of schemas that declare elements to be allowed in the component's template.
10137 */
10138 schemas: SchemaMetadata[] | null;
10139 /**
10140 * Ivy runtime uses this place to store the computed tView for the component. This gets filled on
10141 * the first run of component.
10142 */
10143 tView: TView | null;
10144 /**
10145 * Used to store the result of `noSideEffects` function so that it is not removed by closure
10146 * compiler. The property should never be read.
10147 */
10148 readonly _?: unknown;
10149}
10150
10151/**
10152 * A subclass of `Type` which has a static `ɵcmp`:`ComponentDef` field making it
10153 * consumable for rendering.
10154 */
10155export declare interface ɵComponentType<T> extends Type<T> {
10156 ɵcmp: unknown;
10157}
10158
10159export declare class ɵConsole {
10160 log(message: string): void;
10161 warn(message: string): void;
10162 static ɵfac: i0.ɵɵFactoryDeclaration<ɵConsole, never>;
10163 static ɵprov: i0.ɵɵInjectableDeclaration<ɵConsole>;
10164}
10165
10166export declare function ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__(): AttributeDecorator;
10167
10168/**
10169 * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
10170 *
10171 * @publicApi
10172 */
10173export declare function ɵcreateInjector(defType: any, parent?: Injector | null, additionalProviders?: StaticProvider[] | null, name?: string): Injector;
10174
10175export declare function ɵcrt(values: {
10176 styles: (string | any[])[];
10177 encapsulation: ViewEncapsulation;
10178 data: {
10179 [kind: string]: any[];
10180 };
10181}): RendererType2;
10182
10183/**
10184 * A list of CssSelectors.
10185 *
10186 * A directive or component can have multiple selectors. This type is used for
10187 * directive defs so any of the selectors in the list will match that directive.
10188 *
10189 * Original: 'form, [ngForm]'
10190 * Parsed: [['form'], ['', 'ngForm', '']]
10191 */
10192export declare type ɵCssSelectorList = CssSelector[];
10193
10194/**
10195 * Index of each value in currency data (used to describe CURRENCIES_EN in currencies.ts)
10196 */
10197export declare const enum ɵCurrencyIndex {
10198 Symbol = 0,
10199 SymbolNarrow = 1,
10200 NbOfDigits = 2
10201}
10202
10203/**
10204 * The locale id that the application is using by default (for translations and ICU expressions).
10205 */
10206export declare const ɵDEFAULT_LOCALE_ID = "en-US";
10207
10208export declare const ɵdefaultIterableDiffers: IterableDiffers;
10209
10210export declare const ɵdefaultKeyValueDiffers: KeyValueDiffers;
10211
10212/**
10213 * Bitmask for DI flags
10214 */
10215export declare const enum ɵDepFlags {
10216 None = 0,
10217 SkipSelf = 1,
10218 Optional = 2,
10219 Self = 4,
10220 Value = 8
10221}
10222
10223
10224/**
10225 * Synchronously perform change detection on a component (and possibly its sub-components).
10226 *
10227 * This function triggers change detection in a synchronous way on a component.
10228 *
10229 * @param component The component which the change detection should be performed on.
10230 */
10231export declare function ɵdetectChanges(component: {}): void;
10232
10233
10234export declare function ɵdevModeEqual(a: any, b: any): boolean;
10235
10236export declare function ɵdid(checkIndex: number, flags: ɵNodeFlags, matchedQueries: null | [string | number, ɵQueryValueType][], childCount: number, ctor: any, deps: ([ɵDepFlags, any] | any)[], props?: null | {
10237 [name: string]: [number, string];
10238}, outputs?: null | {
10239 [name: string]: string;
10240}): NodeDef;
10241
10242/**
10243 * Runtime link information for Directives.
10244 *
10245 * This is an internal data structure used by the render to link
10246 * directives into templates.
10247 *
10248 * NOTE: Always use `defineDirective` function to create this object,
10249 * never create the object directly since the shape of this object
10250 * can change between versions.
10251 *
10252 * @param Selector type metadata specifying the selector of the directive or component
10253 *
10254 * See: {@link defineDirective}
10255 */
10256export declare interface ɵDirectiveDef<T> {
10257 /**
10258 * A dictionary mapping the inputs' minified property names to their public API names, which
10259 * are their aliases if any, or their original unminified property names
10260 * (as in `@Input('alias') propertyName: any;`).
10261 */
10262 readonly inputs: {
10263 [P in keyof T]: string;
10264 };
10265 /**
10266 * @deprecated This is only here because `NgOnChanges` incorrectly uses declared name instead of
10267 * public or minified name.
10268 */
10269 readonly declaredInputs: {
10270 [P in keyof T]: string;
10271 };
10272 /**
10273 * A dictionary mapping the outputs' minified property names to their public API names, which
10274 * are their aliases if any, or their original unminified property names
10275 * (as in `@Output('alias') propertyName: any;`).
10276 */
10277 readonly outputs: {
10278 [P in keyof T]: string;
10279 };
10280 /**
10281 * Function to create and refresh content queries associated with a given directive.
10282 */
10283 contentQueries: ContentQueriesFunction<T> | null;
10284 /**
10285 * Query-related instructions for a directive. Note that while directives don't have a
10286 * view and as such view queries won't necessarily do anything, there might be
10287 * components that extend the directive.
10288 */
10289 viewQuery: ViewQueriesFunction<T> | null;
10290 /**
10291 * Refreshes host bindings on the associated directive.
10292 */
10293 readonly hostBindings: HostBindingsFunction<T> | null;
10294 /**
10295 * The number of bindings in this directive `hostBindings` (including pure fn bindings).
10296 *
10297 * Used to calculate the length of the component's LView array, so we
10298 * can pre-fill the array and set the host binding start index.
10299 */
10300 readonly hostVars: number;
10301 /**
10302 * Assign static attribute values to a host element.
10303 *
10304 * This property will assign static attribute values as well as class and style
10305 * values to a host element. Since attribute values can consist of different types of values, the
10306 * `hostAttrs` array must include the values in the following format:
10307 *
10308 * attrs = [
10309 * // static attributes (like `title`, `name`, `id`...)
10310 * attr1, value1, attr2, value,
10311 *
10312 * // a single namespace value (like `x:id`)
10313 * NAMESPACE_MARKER, namespaceUri1, name1, value1,
10314 *
10315 * // another single namespace value (like `x:name`)
10316 * NAMESPACE_MARKER, namespaceUri2, name2, value2,
10317 *
10318 * // a series of CSS classes that will be applied to the element (no spaces)
10319 * CLASSES_MARKER, class1, class2, class3,
10320 *
10321 * // a series of CSS styles (property + value) that will be applied to the element
10322 * STYLES_MARKER, prop1, value1, prop2, value2
10323 * ]
10324 *
10325 * All non-class and non-style attributes must be defined at the start of the list
10326 * first before all class and style values are set. When there is a change in value
10327 * type (like when classes and styles are introduced) a marker must be used to separate
10328 * the entries. The marker values themselves are set via entries found in the
10329 * [AttributeMarker] enum.
10330 */
10331 readonly hostAttrs: TAttributes | null;
10332 /** Token representing the directive. Used by DI. */
10333 readonly type: Type<T>;
10334 /** Function that resolves providers and publishes them into the DI system. */
10335 providersResolver: (<U extends T>(def: ɵDirectiveDef<U>, processProvidersFn?: ProcessProvidersFunction) => void) | null;
10336 /** The selectors that will be used to match nodes to this directive. */
10337 readonly selectors: ɵCssSelectorList;
10338 /**
10339 * Name under which the directive is exported (for use with local references in template)
10340 */
10341 readonly exportAs: string[] | null;
10342 /**
10343 * Factory function used to create a new directive instance. Will be null initially.
10344 * Populated when the factory is first requested by directive instantiation logic.
10345 */
10346 readonly factory: FactoryFn<T> | null;
10347 /**
10348 * The features applied to this directive
10349 */
10350 readonly features: DirectiveDefFeature[] | null;
10351 setInput: (<U extends T>(this: ɵDirectiveDef<U>, instance: U, value: any, publicName: string, privateName: string) => void) | null;
10352}
10353
10354/**
10355 * A subclass of `Type` which has a static `ɵdir`:`DirectiveDef` field making it
10356 * consumable for rendering.
10357 */
10358export declare interface ɵDirectiveType<T> extends Type<T> {
10359 ɵdir: unknown;
10360 ɵfac: unknown;
10361}
10362
10363export declare function ɵeld(checkIndex: number, flags: ɵNodeFlags, matchedQueriesDsl: null | [string | number, ɵQueryValueType][], ngContentIndex: null | number, childCount: number, namespaceAndName: string | null, fixedAttrs?: null | [string, string][], bindings?: null | [ɵBindingFlags, string, string | SecurityContext | null][], outputs?: null | ([string, string])[], handleEvent?: null | ElementHandleEventFn, componentView?: null | ViewDefinitionFactory, componentRendererType?: RendererType2 | null): NodeDef;
10364
10365export declare const ɵEMPTY_ARRAY: any[];
10366
10367export declare const ɵEMPTY_MAP: {
10368 [key: string]: any;
10369};
10370
10371/**
10372 * Index of each type of locale data from the extra locale data array
10373 */
10374export declare const enum ɵExtraLocaleDataIndex {
10375 ExtraDayPeriodFormats = 0,
10376 ExtraDayPeriodStandalone = 1,
10377 ExtraDayPeriodsRules = 2
10378}
10379
10380/**
10381 * Finds the locale data for a given locale.
10382 *
10383 * @param locale The locale code.
10384 * @returns The locale data.
10385 * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
10386 */
10387export declare function ɵfindLocaleData(locale: string): any;
10388
10389/**
10390 * Loops over queued module definitions, if a given module definition has all of its
10391 * declarations resolved, it dequeues that module definition and sets the scope on
10392 * its declarations.
10393 */
10394export declare function ɵflushModuleScopingQueueAsMuchAsPossible(): void;
10395
10396export declare function ɵgetComponentViewDefinitionFactory(componentFactory: ComponentFactory<any>): ViewDefinitionFactory;
10397
10398export declare function ɵgetDebugNode__POST_R3__(nativeNode: Element): DebugElement__POST_R3__;
10399
10400export declare function ɵgetDebugNode__POST_R3__(nativeNode: Node): DebugNode__POST_R3__;
10401
10402export declare function ɵgetDebugNode__POST_R3__(nativeNode: null): null;
10403
10404export declare const ɵgetDebugNodeR2: (nativeNode: any) => DebugNode | null;
10405
10406/**
10407 * Retrieves directive instances associated with a given DOM node. Does not include
10408 * component instances.
10409 *
10410 * @usageNotes
10411 * Given the following DOM structure:
10412 *
10413 * ```html
10414 * <app-root>
10415 * <button my-button></button>
10416 * <my-comp></my-comp>
10417 * </app-root>
10418 * ```
10419 *
10420 * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`
10421 * directive that is associated with the DOM node.
10422 *
10423 * Calling `getDirectives` on `<my-comp>` will return an empty array.
10424 *
10425 * @param node DOM node for which to get the directives.
10426 * @returns Array of directives associated with the node.
10427 *
10428 * @publicApi
10429 * @globalApi ng
10430 */
10431export declare function ɵgetDirectives(node: Node): {}[];
10432
10433/**
10434 * Retrieves the host element of a component or directive instance.
10435 * The host element is the DOM element that matched the selector of the directive.
10436 *
10437 * @param componentOrDirective Component or directive instance for which the host
10438 * element should be retrieved.
10439 * @returns Host element of the target.
10440 *
10441 * @publicApi
10442 * @globalApi ng
10443 */
10444export declare function ɵgetHostElement(componentOrDirective: {}): Element;
10445
10446/**
10447 * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading
10448 * inherited value.
10449 *
10450 * @param type A type which may have its own (non-inherited) `ɵprov`.
10451 */
10452export declare function ɵgetInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null;
10453
10454/**
10455 * Returns the matching `LContext` data for a given DOM node, directive or component instance.
10456 *
10457 * This function will examine the provided DOM element, component, or directive instance\'s
10458 * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched
10459 * value will be that of the newly created `LContext`.
10460 *
10461 * If the monkey-patched value is the `LView` instance then the context value for that
10462 * target will be created and the monkey-patch reference will be updated. Therefore when this
10463 * function is called it may mutate the provided element\'s, component\'s or any of the associated
10464 * directive\'s monkey-patch values.
10465 *
10466 * If the monkey-patch value is not detected then the code will walk up the DOM until an element
10467 * is found which contains a monkey-patch reference. When that occurs then the provided element
10468 * will be updated with a new context (which is then returned). If the monkey-patch value is not
10469 * detected for a component/directive instance then it will throw an error (all components and
10470 * directives should be automatically monkey-patched by ivy).
10471 *
10472 * @param target Component, Directive or DOM Node.
10473 */
10474export declare function ɵgetLContext(target: any): ɵLContext | null;
10475
10476/**
10477 * Retrieves the default currency code for the given locale.
10478 *
10479 * The default is defined as the first currency which is still in use.
10480 *
10481 * @param locale The code of the locale whose currency code we want.
10482 * @returns The code of the default currency for the given locale.
10483 *
10484 */
10485export declare function ɵgetLocaleCurrencyCode(locale: string): string | null;
10486
10487/**
10488 * Retrieves the plural function used by ICU expressions to determine the plural case to use
10489 * for a given locale.
10490 * @param locale A locale code for the locale format rules to use.
10491 * @returns The plural function for the locale.
10492 * @see `NgPlural`
10493 * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
10494 */
10495export declare function ɵgetLocalePluralCase(locale: string): (value: number) => number;
10496
10497export declare function ɵgetModuleFactory__POST_R3__(id: string): NgModuleFactory<any>;
10498
10499export declare function ɵgetNgModuleById__POST_R3__(id: string): ɵNgModuleType;
10500
10501export declare function ɵgetSanitizationBypassType(value: any): ɵBypassType | null;
10502
10503export declare type ɵGetterFn = (obj: any) => any;
10504
10505
10506export declare const ɵglobal: any;
10507
10508export declare function ɵinitServicesIfNeeded(): void;
10509
10510export declare function ɵINJECTOR_IMPL__POST_R3__(providers: StaticProvider[], parent: Injector | undefined, name: string): Injector;
10511
10512/**
10513 * An internal token whose presence in an injector indicates that the injector should treat itself
10514 * as a root scoped injector when processing requests for unknown tokens which may indicate
10515 * they are provided in the root scope.
10516 */
10517export declare const ɵINJECTOR_SCOPE: InjectionToken<"root" | "platform" | null>;
10518
10519export declare function ɵinlineInterpolate(valueCount: number, c0: string, a1: any, c1: string, a2?: any, c2?: string, a3?: any, c3?: string, a4?: any, c4?: string, a5?: any, c5?: string, a6?: any, c6?: string, a7?: any, c7?: string, a8?: any, c8?: string, a9?: any, c9?: string): string;
10520
10521export declare function ɵinterpolate(valueCount: number, constAndInterp: string[]): string;
10522
10523export declare function ɵisBoundToModule__POST_R3__<C>(cf: ComponentFactory<C>): boolean;
10524
10525/**
10526 * Reports whether a given strategy is currently the default for change detection.
10527 * @param changeDetectionStrategy The strategy to check.
10528 * @returns True if the given strategy is the current default, false otherwise.
10529 * @see `ChangeDetectorStatus`
10530 * @see `ChangeDetectorRef`
10531 */
10532export declare function ɵisDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy): boolean;
10533
10534export declare function ɵisListLikeIterable(obj: any): boolean;
10535
10536/**
10537 * Determine if the argument is an Observable
10538 *
10539 * Strictly this tests that the `obj` is `Subscribable`, since `Observable`
10540 * types need additional methods, such as `lift()`. But it is adequate for our
10541 * needs since within the Angular framework code we only ever need to use the
10542 * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects
10543 * into `Observable` as needed.
10544 */
10545export declare const ɵisObservable: (obj: any | Observable<any>) => obj is Observable<any>;
10546
10547/**
10548 * Determine if the argument is shaped like a Promise
10549 */
10550export declare function ɵisPromise<T = any>(obj: any): obj is Promise<T>;
10551
10552/**
10553 * Determine if the argument is a Subscribable
10554 */
10555export declare function ɵisSubscribable(obj: any | Subscribable<any>): obj is Subscribable<any>;
10556
10557export declare const ɵivyEnabled = false;
10558
10559/**
10560 * The internal view context which is specific to a given DOM element, directive or
10561 * component instance. Each value in here (besides the LView and element node details)
10562 * can be present, null or undefined. If undefined then it implies the value has not been
10563 * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
10564 *
10565 * Each value will get filled when the respective value is examined within the getContext
10566 * function. The component, element and each directive instance will share the same instance
10567 * of the context.
10568 */
10569export declare interface ɵLContext {
10570 /**
10571 * The component's parent view data.
10572 */
10573 lView: LView;
10574 /**
10575 * The index instance of the node.
10576 */
10577 nodeIndex: number;
10578 /**
10579 * The instance of the DOM node that is attached to the lNode.
10580 */
10581 native: RNode;
10582 /**
10583 * The instance of the Component node.
10584 */
10585 component: {} | null | undefined;
10586 /**
10587 * The list of active directives that exist on this element.
10588 */
10589 directives: any[] | null | undefined;
10590 /**
10591 * The map of local references (local reference name => element or directive instance) that exist
10592 * on this element.
10593 */
10594 localRefs: {
10595 [key: string]: any;
10596 } | null | undefined;
10597}
10598
10599/**
10600 * Used to enable lifecycle hooks on the root component.
10601 *
10602 * Include this feature when calling `renderComponent` if the root component
10603 * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't
10604 * be called properly.
10605 *
10606 * Example:
10607 *
10608 * ```
10609 * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});
10610 * ```
10611 */
10612export declare function ɵLifecycleHooksFeature(component: any, def: ɵComponentDef<any>): void;
10613
10614/**
10615 * Index of each type of locale data from the locale data array
10616 */
10617export declare enum ɵLocaleDataIndex {
10618 LocaleId = 0,
10619 DayPeriodsFormat = 1,
10620 DayPeriodsStandalone = 2,
10621 DaysFormat = 3,
10622 DaysStandalone = 4,
10623 MonthsFormat = 5,
10624 MonthsStandalone = 6,
10625 Eras = 7,
10626 FirstDayOfWeek = 8,
10627 WeekendRange = 9,
10628 DateFormat = 10,
10629 TimeFormat = 11,
10630 DateTimeFormat = 12,
10631 NumberSymbols = 13,
10632 NumberFormats = 14,
10633 CurrencyCode = 15,
10634 CurrencySymbol = 16,
10635 CurrencyName = 17,
10636 Currencies = 18,
10637 Directionality = 19,
10638 PluralCase = 20,
10639 ExtraData = 21
10640}
10641
10642/**
10643 * @suppress {globalThis}
10644 */
10645export declare function ɵmakeDecorator<T>(name: string, props?: (...args: any[]) => any, parentClass?: any, additionalProcessing?: (type: Type<T>) => void, typeFn?: (type: Type<T>, ...args: any[]) => void): {
10646 new (...args: any[]): any;
10647 (...args: any[]): any;
10648 (...args: any[]): (cls: any) => any;
10649};
10650
10651/**
10652 * Marks the component as dirty (needing change detection). Marking a component dirty will
10653 * schedule a change detection on it at some point in the future.
10654 *
10655 * Marking an already dirty component as dirty won't do anything. Only one outstanding change
10656 * detection can be scheduled per component tree.
10657 *
10658 * @param component Component to mark as dirty.
10659 */
10660export declare function ɵmarkDirty(component: {}): void;
10661
10662export declare type ɵMethodFn = (obj: any, args: any[]) => any;
10663
10664export declare function ɵmod(providers: NgModuleProviderDef[]): NgModuleDefinition;
10665
10666export declare function ɵmpd(flags: ɵNodeFlags, token: any, value: any, deps: ([ɵDepFlags, any] | any)[]): NgModuleProviderDef;
10667
10668export declare function ɵncd(ngContentIndex: null | number, index: number): NodeDef;
10669
10670
10671export declare const ɵNG_COMP_DEF: string;
10672
10673export declare const ɵNG_DIR_DEF: string;
10674
10675/**
10676 * If a directive is diPublic, bloomAdd sets a property on the type with this constant as
10677 * the key and the directive's unique ID as the value. This allows us to map directives to their
10678 * bloom filter bit for DI.
10679 */
10680export declare const ɵNG_ELEMENT_ID: string;
10681
10682export declare const ɵNG_INJ_DEF: string;
10683
10684export declare const ɵNG_MOD_DEF: string;
10685
10686export declare const ɵNG_PIPE_DEF: string;
10687
10688export declare const ɵNG_PROV_DEF: string;
10689
10690/**
10691 * Runtime link information for NgModules.
10692 *
10693 * This is the internal data structure used by the runtime to assemble components, directives,
10694 * pipes, and injectors.
10695 *
10696 * NOTE: Always use `ɵɵdefineNgModule` function to create this object,
10697 * never create the object directly since the shape of this object
10698 * can change between versions.
10699 */
10700export declare interface ɵNgModuleDef<T> {
10701 /** Token representing the module. Used by DI. */
10702 type: T;
10703 /** List of components to bootstrap. */
10704 bootstrap: Type<any>[] | (() => Type<any>[]);
10705 /** List of components, directives, and pipes declared by this module. */
10706 declarations: Type<any>[] | (() => Type<any>[]);
10707 /** List of modules or `ModuleWithProviders` imported by this module. */
10708 imports: Type<any>[] | (() => Type<any>[]);
10709 /**
10710 * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
10711 * module.
10712 */
10713 exports: Type<any>[] | (() => Type<any>[]);
10714 /**
10715 * Cached value of computed `transitiveCompileScopes` for this module.
10716 *
10717 * This should never be read directly, but accessed via `transitiveScopesFor`.
10718 */
10719 transitiveCompileScopes: ɵNgModuleTransitiveScopes | null;
10720 /** The set of schemas that declare elements to be allowed in the NgModule. */
10721 schemas: SchemaMetadata[] | null;
10722 /** Unique ID for the module with which it should be registered. */
10723 id: string | null;
10724}
10725
10726export declare class ɵNgModuleFactory<T> extends NgModuleFactory<T> {
10727 moduleType: Type<T>;
10728 constructor(moduleType: Type<T>);
10729 create(parentInjector: Injector | null): NgModuleRef<T>;
10730}
10731
10732/**
10733 * Represents the expansion of an `NgModule` into its scopes.
10734 *
10735 * A scope is a set of directives and pipes that are visible in a particular context. Each
10736 * `NgModule` has two scopes. The `compilation` scope is the set of directives and pipes that will
10737 * be recognized in the templates of components declared by the module. The `exported` scope is the
10738 * set of directives and pipes exported by a module (that is, module B's exported scope gets added
10739 * to module A's compilation scope when module A imports B).
10740 */
10741export declare interface ɵNgModuleTransitiveScopes {
10742 compilation: {
10743 directives: Set<any>;
10744 pipes: Set<any>;
10745 };
10746 exported: {
10747 directives: Set<any>;
10748 pipes: Set<any>;
10749 };
10750 schemas: SchemaMetadata[] | null;
10751}
10752
10753export declare interface ɵNgModuleType<T = any> extends Type<T> {
10754 ɵmod: ɵNgModuleDef<T>;
10755}
10756
10757
10758export declare interface ɵNO_CHANGE {
10759 __brand__: 'NO_CHANGE';
10760}
10761
10762/** A special value which designates that a value has not changed. */
10763export declare const ɵNO_CHANGE: ɵNO_CHANGE;
10764
10765/**
10766 * Bitmask for NodeDef.flags.
10767 * Naming convention:
10768 * - `Type...`: flags that are mutually exclusive
10769 * - `Cat...`: union of multiple `Type...` (short for category).
10770 */
10771export declare const enum ɵNodeFlags {
10772 None = 0,
10773 TypeElement = 1,
10774 TypeText = 2,
10775 ProjectedTemplate = 4,
10776 CatRenderNode = 3,
10777 TypeNgContent = 8,
10778 TypePipe = 16,
10779 TypePureArray = 32,
10780 TypePureObject = 64,
10781 TypePurePipe = 128,
10782 CatPureExpression = 224,
10783 TypeValueProvider = 256,
10784 TypeClassProvider = 512,
10785 TypeFactoryProvider = 1024,
10786 TypeUseExistingProvider = 2048,
10787 LazyProvider = 4096,
10788 PrivateProvider = 8192,
10789 TypeDirective = 16384,
10790 Component = 32768,
10791 CatProviderNoDirective = 3840,
10792 CatProvider = 20224,
10793 OnInit = 65536,
10794 OnDestroy = 131072,
10795 DoCheck = 262144,
10796 OnChanges = 524288,
10797 AfterContentInit = 1048576,
10798 AfterContentChecked = 2097152,
10799 AfterViewInit = 4194304,
10800 AfterViewChecked = 8388608,
10801 EmbeddedViews = 16777216,
10802 ComponentView = 33554432,
10803 TypeContentQuery = 67108864,
10804 TypeViewQuery = 134217728,
10805 StaticQuery = 268435456,
10806 DynamicQuery = 536870912,
10807 TypeNgModule = 1073741824,
10808 EmitDistinctChangesOnly = -2147483648,
10809 CatQuery = 201326592,
10810 Types = 201347067
10811}
10812
10813/**
10814 * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls
10815 * to framework to perform rendering.
10816 */
10817export declare class ɵNoopNgZone implements NgZone {
10818 readonly hasPendingMicrotasks: boolean;
10819 readonly hasPendingMacrotasks: boolean;
10820 readonly isStable: boolean;
10821 readonly onUnstable: EventEmitter<any>;
10822 readonly onMicrotaskEmpty: EventEmitter<any>;
10823 readonly onStable: EventEmitter<any>;
10824 readonly onError: EventEmitter<any>;
10825 run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any): T;
10826 runGuarded<T>(fn: (...args: any[]) => any, applyThis?: any, applyArgs?: any): T;
10827 runOutsideAngular<T>(fn: (...args: any[]) => T): T;
10828 runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any, name?: string): T;
10829}
10830
10831
10832/**
10833 * Convince closure compiler that the wrapped function has no side-effects.
10834 *
10835 * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to
10836 * allow us to execute a function but have closure compiler mark the call as no-side-effects.
10837 * It is important that the return value for the `noSideEffects` function be assigned
10838 * to something which is retained otherwise the call to `noSideEffects` will be removed by closure
10839 * compiler.
10840 */
10841export declare function ɵnoSideEffects<T>(fn: () => T): T;
10842
10843
10844export declare const ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR: {};
10845
10846export declare function ɵnov(view: ViewData, index: number): any;
10847
10848export declare function ɵoverrideComponentView(comp: Type<any>, componentFactory: ComponentFactory<any>): void;
10849
10850export declare function ɵoverrideProvider(override: ProviderOverride): void;
10851
10852export declare function ɵpad(checkIndex: number, argCount: number): NodeDef;
10853
10854/**
10855 * Patch the definition of a component with directives and pipes from the compilation scope of
10856 * a given module.
10857 */
10858export declare function ɵpatchComponentDefWithScope<C>(componentDef: ɵComponentDef<C>, transitiveScopes: ɵNgModuleTransitiveScopes): void;
10859
10860export declare function ɵpid(flags: ɵNodeFlags, ctor: any, deps: ([ɵDepFlags, any] | any)[]): NodeDef;
10861
10862/**
10863 * Runtime link information for Pipes.
10864 *
10865 * This is an internal data structure used by the renderer to link
10866 * pipes into templates.
10867 *
10868 * NOTE: Always use `definePipe` function to create this object,
10869 * never create the object directly since the shape of this object
10870 * can change between versions.
10871 *
10872 * See: {@link definePipe}
10873 */
10874export declare interface ɵPipeDef<T> {
10875 /** Token representing the pipe. */
10876 type: Type<T>;
10877 /**
10878 * Pipe name.
10879 *
10880 * Used to resolve pipe in templates.
10881 */
10882 readonly name: string;
10883 /**
10884 * Factory function used to create a new pipe instance. Will be null initially.
10885 * Populated when the factory is first requested by pipe instantiation logic.
10886 */
10887 factory: FactoryFn<T> | null;
10888 /**
10889 * Whether or not the pipe is pure.
10890 *
10891 * Pure pipes result only depends on the pipe input and not on internal
10892 * state of the pipe.
10893 */
10894 readonly pure: boolean;
10895 onDestroy: (() => void) | null;
10896}
10897
10898
10899/**
10900 * A shared interface which contains an animation player
10901 */
10902export declare interface ɵPlayer {
10903 parent?: ɵPlayer | null;
10904 state: ɵPlayState;
10905 play(): void;
10906 pause(): void;
10907 finish(): void;
10908 destroy(): void;
10909 addEventListener(state: ɵPlayState | string, cb: (data?: any) => any): void;
10910}
10911
10912/**
10913 * Used as a reference to build a player from a styling template binding
10914 * (`[style]` and `[class]`).
10915 *
10916 * The `fn` function will be called once any styling-related changes are
10917 * evaluated on an element and is expected to return a player that will
10918 * be then run on the element.
10919 *
10920 * `[style]`, `[style.prop]`, `[class]` and `[class.name]` template bindings
10921 * all accept a `PlayerFactory` as input and this player factories.
10922 */
10923export declare interface ɵPlayerFactory {
10924 '__brand__': 'Brand for PlayerFactory that nothing will match';
10925}
10926
10927/**
10928 * Designed to be used as an injection service to capture all animation players.
10929 *
10930 * When present all animation players will be passed into the flush method below.
10931 * This feature is designed to service application-wide animation testing, live
10932 * debugging as well as custom animation choreographing tools.
10933 */
10934export declare interface ɵPlayerHandler {
10935 /**
10936 * Designed to kick off the player at the end of change detection
10937 */
10938 flushPlayers(): void;
10939 /**
10940 * @param player The player that has been scheduled to run within the application.
10941 * @param context The context as to where the player was bound to
10942 */
10943 queuePlayer(player: ɵPlayer, context: ComponentInstance | DirectiveInstance | HTMLElement): void;
10944}
10945
10946/**
10947 * The state of a given player
10948 *
10949 * Do not change the increasing nature of the numbers since the player
10950 * code may compare state by checking if a number is higher or lower than
10951 * a certain numeric value.
10952 */
10953export declare const enum ɵPlayState {
10954 Pending = 0,
10955 Running = 1,
10956 Paused = 2,
10957 Finished = 100,
10958 Destroyed = 200
10959}
10960
10961export declare function ɵpod(checkIndex: number, propToIndex: {
10962 [p: string]: number;
10963}): NodeDef;
10964
10965export declare function ɵppd(checkIndex: number, argCount: number): NodeDef;
10966
10967export declare function ɵprd(flags: ɵNodeFlags, matchedQueries: null | [string | number, ɵQueryValueType][], token: any, value: any, deps: ([ɵDepFlags, any] | any)[]): NodeDef;
10968
10969/**
10970 * Profiler function which the runtime will invoke before and after user code.
10971 */
10972export declare interface ɵProfiler {
10973 (event: ɵProfilerEvent, instance: {} | null, hookOrListener?: (e?: any) => any): void;
10974}
10975
10976
10977/**
10978 * Profiler events is an enum used by the profiler to distinguish between different calls of user
10979 * code invoked throughout the application lifecycle.
10980 */
10981export declare const enum ɵProfilerEvent {
10982 /**
10983 * Corresponds to the point in time before the runtime has called the template function of a
10984 * component with `RenderFlags.Create`.
10985 */
10986 TemplateCreateStart = 0,
10987 /**
10988 * Corresponds to the point in time after the runtime has called the template function of a
10989 * component with `RenderFlags.Create`.
10990 */
10991 TemplateCreateEnd = 1,
10992 /**
10993 * Corresponds to the point in time before the runtime has called the template function of a
10994 * component with `RenderFlags.Update`.
10995 */
10996 TemplateUpdateStart = 2,
10997 /**
10998 * Corresponds to the point in time after the runtime has called the template function of a
10999 * component with `RenderFlags.Update`.
11000 */
11001 TemplateUpdateEnd = 3,
11002 /**
11003 * Corresponds to the point in time before the runtime has called a lifecycle hook of a component
11004 * or directive.
11005 */
11006 LifecycleHookStart = 4,
11007 /**
11008 * Corresponds to the point in time after the runtime has called a lifecycle hook of a component
11009 * or directive.
11010 */
11011 LifecycleHookEnd = 5,
11012 /**
11013 * Corresponds to the point in time before the runtime has evaluated an expression associated with
11014 * an event or an output.
11015 */
11016 OutputStart = 6,
11017 /**
11018 * Corresponds to the point in time after the runtime has evaluated an expression associated with
11019 * an event or an output.
11020 */
11021 OutputEnd = 7
11022}
11023
11024/**
11025 * Publishes a collection of default debug tools onto`window.ng`.
11026 *
11027 * These functions are available globally when Angular is in development
11028 * mode and are automatically stripped away from prod mode is on.
11029 */
11030export declare function ɵpublishDefaultGlobalUtils(): void;
11031
11032/**
11033 * Publishes the given function to `window.ng` so that it can be
11034 * used from the browser console when an application is not in production.
11035 */
11036export declare function ɵpublishGlobalUtil(name: string, fn: Function): void;
11037
11038export declare function ɵqud(flags: ɵNodeFlags, id: number, bindings: {
11039 [propName: string]: ɵQueryBindingType;
11040}): NodeDef;
11041
11042export declare const enum ɵQueryBindingType {
11043 First = 0,
11044 All = 1
11045}
11046
11047export declare const enum ɵQueryValueType {
11048 ElementRef = 0,
11049 RenderElement = 1,
11050 TemplateRef = 2,
11051 ViewContainerRef = 3,
11052 Provider = 4
11053}
11054
11055export declare class ɵReflectionCapabilities implements PlatformReflectionCapabilities {
11056 private _reflect;
11057 constructor(reflect?: any);
11058 isReflectionEnabled(): boolean;
11059 factory<T>(t: Type<T>): (args: any[]) => T;
11060 private _ownParameters;
11061 parameters(type: Type<any>): any[][];
11062 private _ownAnnotations;
11063 annotations(typeOrFunc: Type<any>): any[];
11064 private _ownPropMetadata;
11065 propMetadata(typeOrFunc: any): {
11066 [key: string]: any[];
11067 };
11068 ownPropMetadata(typeOrFunc: any): {
11069 [key: string]: any[];
11070 };
11071 hasLifecycleHook(type: any, lcProperty: string): boolean;
11072 guards(type: any): {
11073 [key: string]: any;
11074 };
11075 getter(name: string): ɵGetterFn;
11076 setter(name: string): ɵSetterFn;
11077 method(name: string): ɵMethodFn;
11078 importUri(type: any): string;
11079 resourceUri(type: any): string;
11080 resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any;
11081 resolveEnum(enumIdentifier: any, name: string): any;
11082}
11083
11084/**
11085 * Register locale data to be used internally by Angular. See the
11086 * ["I18n guide"](guide/i18n-common-format-data-locale) to know how to import additional locale
11087 * data.
11088 *
11089 * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1
11090 */
11091export declare function ɵregisterLocaleData(data: any, localeId?: string | any, extraData?: any): void;
11092
11093/**
11094 * Registers a loaded module. Should only be called from generated NgModuleFactory code.
11095 * @publicApi
11096 */
11097export declare function ɵregisterModuleFactory(id: string, factory: NgModuleFactory<any>): void;
11098
11099export declare function ɵregisterNgModuleType(ngModuleType: ɵNgModuleType): void;
11100
11101/**
11102 * Render3 implementation of {@link viewEngine_ComponentFactory}.
11103 */
11104export declare class ɵRender3ComponentFactory<T> extends ComponentFactory<T> {
11105 private componentDef;
11106 private ngModule?;
11107 selector: string;
11108 componentType: Type<any>;
11109 ngContentSelectors: string[];
11110 isBoundToModule: boolean;
11111 get inputs(): {
11112 propName: string;
11113 templateName: string;
11114 }[];
11115 get outputs(): {
11116 propName: string;
11117 templateName: string;
11118 }[];
11119 /**
11120 * @param componentDef The component definition.
11121 * @param ngModule The NgModuleRef to which the factory is bound.
11122 */
11123 constructor(componentDef: ɵComponentDef<any>, ngModule?: NgModuleRef<any> | undefined);
11124 create(injector: Injector, projectableNodes?: any[][] | undefined, rootSelectorOrNode?: any, ngModule?: NgModuleRef<any> | undefined): ComponentRef<T>;
11125}
11126
11127/**
11128 * Represents an instance of a Component created via a {@link ComponentFactory}.
11129 *
11130 * `ComponentRef` provides access to the Component Instance as well other objects related to this
11131 * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}
11132 * method.
11133 *
11134 */
11135export declare class ɵRender3ComponentRef<T> extends ComponentRef<T> {
11136 location: ElementRef;
11137 private _rootLView;
11138 private _tNode;
11139 instance: T;
11140 hostView: ViewRef_2<T>;
11141 changeDetectorRef: ChangeDetectorRef;
11142 componentType: Type<T>;
11143 constructor(componentType: Type<T>, instance: T, location: ElementRef, _rootLView: LView, _tNode: TElementNode | TContainerNode | TElementContainerNode);
11144 get injector(): Injector;
11145 destroy(): void;
11146 onDestroy(callback: () => void): void;
11147}
11148
11149export declare class ɵRender3NgModuleRef<T> extends NgModuleRef<T> implements InternalNgModuleRef<T> {
11150 _parent: Injector | null;
11151 _bootstrapComponents: Type<any>[];
11152 _r3Injector: R3Injector;
11153 injector: Injector;
11154 instance: T;
11155 destroyCbs: (() => void)[] | null;
11156 readonly componentFactoryResolver: ComponentFactoryResolver_2;
11157 constructor(ngModuleType: Type<T>, _parent: Injector | null);
11158 get(token: any, notFoundValue?: any, injectFlags?: InjectFlags): any;
11159 destroy(): void;
11160 onDestroy(callback: () => void): void;
11161}
11162
11163/**
11164 * Bootstraps a Component into an existing host element and returns an instance
11165 * of the component.
11166 *
11167 * Use this function to bootstrap a component into the DOM tree. Each invocation
11168 * of this function will create a separate tree of components, injectors and
11169 * change detection cycles and lifetimes. To dynamically insert a new component
11170 * into an existing tree such that it shares the same injection, change detection
11171 * and object lifetime, use {@link ViewContainer#createComponent}.
11172 *
11173 * @param componentType Component to bootstrap
11174 * @param options Optional parameters which control bootstrapping
11175 */
11176export declare function ɵrenderComponent<T>(componentType: ɵComponentType<T> | Type<T>, opts?: CreateComponentOptions): T;
11177
11178/**
11179 * Flags passed into template functions to determine which blocks (i.e. creation, update)
11180 * should be executed.
11181 *
11182 * Typically, a template runs both the creation block and the update block on initialization and
11183 * subsequent runs only execute the update block. However, dynamically created views require that
11184 * the creation block be executed separately from the update block (for backwards compat).
11185 */
11186export declare const enum ɵRenderFlags {
11187 Create = 1,
11188 Update = 2
11189}
11190
11191export declare function ɵresetCompiledComponents(): void;
11192
11193export declare function ɵresetJitOptions(): void;
11194
11195/**
11196 * Used to resolve resource URLs on `@Component` when used with JIT compilation.
11197 *
11198 * Example:
11199 * ```
11200 * @Component({
11201 * selector: 'my-comp',
11202 * templateUrl: 'my-comp.html', // This requires asynchronous resolution
11203 * })
11204 * class MyComponent{
11205 * }
11206 *
11207 * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process
11208 * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.
11209 *
11210 * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into
11211 * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.
11212 *
11213 * // Use browser's `fetch()` function as the default resource resolution strategy.
11214 * resolveComponentResources(fetch).then(() => {
11215 * // After resolution all URLs have been converted into `template` strings.
11216 * renderComponent(MyComponent);
11217 * });
11218 *
11219 * ```
11220 *
11221 * NOTE: In AOT the resolution happens during compilation, and so there should be no need
11222 * to call this method outside JIT mode.
11223 *
11224 * @param resourceResolver a function which is responsible for returning a `Promise` to the
11225 * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.
11226 */
11227export declare function ɵresolveComponentResources(resourceResolver: (url: string) => (Promise<string | {
11228 text(): Promise<string>;
11229}>)): Promise<void>;
11230
11231export declare class ɵRuntimeError extends Error {
11232 code: ɵRuntimeErrorCode;
11233 constructor(code: ɵRuntimeErrorCode, message: string);
11234}
11235
11236
11237export declare const enum ɵRuntimeErrorCode {
11238 EXPRESSION_CHANGED_AFTER_CHECKED = "100",
11239 CYCLIC_DI_DEPENDENCY = "200",
11240 PROVIDER_NOT_FOUND = "201",
11241 MULTIPLE_COMPONENTS_MATCH = "300",
11242 EXPORT_NOT_FOUND = "301",
11243 PIPE_NOT_FOUND = "302",
11244 UNKNOWN_BINDING = "303",
11245 UNKNOWN_ELEMENT = "304",
11246 TEMPLATE_STRUCTURE_ERROR = "305"
11247}
11248
11249/**
11250 * Marker interface for a value that's safe to use as HTML.
11251 *
11252 * @publicApi
11253 */
11254export declare interface ɵSafeHtml extends ɵSafeValue {
11255}
11256
11257/**
11258 * Marker interface for a value that's safe to use as a URL to load executable code from.
11259 *
11260 * @publicApi
11261 */
11262export declare interface ɵSafeResourceUrl extends ɵSafeValue {
11263}
11264
11265/**
11266 * Marker interface for a value that's safe to use as JavaScript.
11267 *
11268 * @publicApi
11269 */
11270export declare interface ɵSafeScript extends ɵSafeValue {
11271}
11272
11273/**
11274 * Marker interface for a value that's safe to use as style (CSS).
11275 *
11276 * @publicApi
11277 */
11278export declare interface ɵSafeStyle extends ɵSafeValue {
11279}
11280
11281/**
11282 * Marker interface for a value that's safe to use as a URL linking to a document.
11283 *
11284 * @publicApi
11285 */
11286export declare interface ɵSafeUrl extends ɵSafeValue {
11287}
11288
11289/**
11290 * Marker interface for a value that's safe to use in a particular context.
11291 *
11292 * @publicApi
11293 */
11294export declare interface ɵSafeValue {
11295}
11296
11297/**
11298 * Adds decorator, constructor, and property metadata to a given type via static metadata fields
11299 * on the type.
11300 *
11301 * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.
11302 *
11303 * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments
11304 * being tree-shaken away during production builds.
11305 */
11306export declare function ɵsetClassMetadata(type: Type<any>, decorators: any[] | null, ctorParameters: (() => any[]) | null, propDecorators: {
11307 [field: string]: any;
11308} | null): void;
11309
11310export declare function ɵsetCurrentInjector(injector: Injector | null | undefined): Injector | undefined | null;
11311
11312
11313/**
11314 * Tell ivy what the `document` is for this platform.
11315 *
11316 * It is only necessary to call this if the current platform is not a browser.
11317 *
11318 * @param document The object representing the global `document` in this environment.
11319 */
11320export declare function ɵsetDocument(document: Document | undefined): void;
11321
11322
11323/**
11324 * Sets the locale id that will be used for translations and ICU expressions.
11325 * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
11326 * but is now defined as a global value.
11327 *
11328 * @param localeId
11329 */
11330export declare function ɵsetLocaleId(localeId: string): void;
11331
11332
11333export declare type ɵSetterFn = (obj: any, value: any) => void;
11334
11335/** Store a value in the `data` at a given `index`. */
11336export declare function ɵstore<T>(tView: TView, lView: LView, index: number, value: T): void;
11337
11338
11339export declare function ɵstringify(token: any): string;
11340
11341export declare const ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__: typeof injectChangeDetectorRef;
11342
11343export declare const ɵSWITCH_COMPILE_COMPONENT__POST_R3__: typeof ɵcompileComponent;
11344
11345export declare const ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__: typeof ɵcompileDirective;
11346
11347export declare const ɵSWITCH_COMPILE_INJECTABLE__POST_R3__: typeof compileInjectable;
11348
11349export declare const ɵSWITCH_COMPILE_NGMODULE__POST_R3__: typeof ɵcompileNgModule;
11350
11351export declare const ɵSWITCH_COMPILE_PIPE__POST_R3__: typeof ɵcompilePipe;
11352
11353export declare const ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__: typeof injectElementRef;
11354
11355
11356export declare const ɵSWITCH_IVY_ENABLED__POST_R3__ = true;
11357
11358export declare const ɵSWITCH_RENDERER2_FACTORY__POST_R3__: typeof injectRenderer2;
11359
11360export declare const ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__: typeof injectTemplateRef;
11361
11362export declare const ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__: typeof injectViewContainerRef;
11363
11364export declare function ɵted(checkIndex: number, ngContentIndex: number | null, staticText: string[]): NodeDef;
11365
11366/**
11367 * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.
11368 *
11369 * This operation is memoized and the result is cached on the module's definition. This function can
11370 * be called on modules with components that have not fully compiled yet, but the result should not
11371 * be used until they have.
11372 *
11373 * @param moduleType module that transitive scope should be calculated for.
11374 */
11375export declare function ɵtransitiveScopesFor<T>(moduleType: Type<T>): ɵNgModuleTransitiveScopes;
11376
11377/**
11378 * Helper function to remove all the locale data from `LOCALE_DATA`.
11379 */
11380export declare function ɵunregisterLocaleData(): void;
11381
11382export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
11383
11384export declare function ɵunwrapSafeValue<T>(value: T): T;
11385
11386export declare function ɵvid(flags: ɵViewFlags, nodes: NodeDef[], updateDirectives?: null | ViewUpdateFn, updateRenderer?: null | ViewUpdateFn): ɵViewDefinition;
11387
11388export declare interface ɵViewDefinition extends Definition<ViewDefinitionFactory> {
11389 flags: ɵViewFlags;
11390 updateDirectives: ViewUpdateFn;
11391 updateRenderer: ViewUpdateFn;
11392 handleEvent: ViewHandleEventFn;
11393 /**
11394 * Order: Depth first.
11395 * Especially providers are before elements / anchors.
11396 */
11397 nodes: NodeDef[];
11398 /** aggregated NodeFlags for all nodes **/
11399 nodeFlags: ɵNodeFlags;
11400 rootNodeFlags: ɵNodeFlags;
11401 lastRenderRootNode: NodeDef | null;
11402 bindingCount: number;
11403 outputCount: number;
11404 /**
11405 * Binary or of all query ids that are matched by one of the nodes.
11406 * This includes query ids from templates as well.
11407 * Used as a bloom filter.
11408 */
11409 nodeMatchedQueries: number;
11410}
11411
11412/**
11413 * Bitmask for ViewDefinition.flags.
11414 */
11415export declare const enum ɵViewFlags {
11416 None = 0,
11417 OnPush = 2
11418}
11419
11420/**
11421 * Wait on component until it is rendered.
11422 *
11423 * This function returns a `Promise` which is resolved when the component's
11424 * change detection is executed. This is determined by finding the scheduler
11425 * associated with the `component`'s render tree and waiting until the scheduler
11426 * flushes. If nothing is scheduled, the function returns a resolved promise.
11427 *
11428 * Example:
11429 * ```
11430 * await whenRendered(myComponent);
11431 * ```
11432 *
11433 * @param component Component to wait upon
11434 * @returns Promise which resolves when the component is rendered.
11435 */
11436export declare function ɵwhenRendered(component: any): Promise<null>;
11437
11438/**
11439 * Advances to an element for later binding instructions.
11440 *
11441 * Used in conjunction with instructions like {@link property} to act on elements with specified
11442 * indices, for example those created with {@link element} or {@link elementStart}.
11443 *
11444 * ```ts
11445 * (rf: RenderFlags, ctx: any) => {
11446 * if (rf & 1) {
11447 * text(0, 'Hello');
11448 * text(1, 'Goodbye')
11449 * element(2, 'div');
11450 * }
11451 * if (rf & 2) {
11452 * advance(2); // Advance twice to the <div>.
11453 * property('title', 'test');
11454 * }
11455 * }
11456 * ```
11457 * @param delta Number of elements to advance forwards by.
11458 *
11459 * @codeGenApi
11460 */
11461export declare function ɵɵadvance(delta: number): void;
11462
11463/**
11464 * Updates the value of or removes a bound attribute on an Element.
11465 *
11466 * Used in the case of `[attr.title]="value"`
11467 *
11468 * @param name name The name of the attribute.
11469 * @param value value The attribute is removed when value is `null` or `undefined`.
11470 * Otherwise the attribute value is set to the stringified value.
11471 * @param sanitizer An optional function used to sanitize the value.
11472 * @param namespace Optional namespace to use when setting the attribute.
11473 *
11474 * @codeGenApi
11475 */
11476export declare function ɵɵattribute(name: string, value: any, sanitizer?: SanitizerFn | null, namespace?: string): typeof ɵɵattribute;
11477
11478/**
11479 *
11480 * Update an interpolated attribute on an element with single bound value surrounded by text.
11481 *
11482 * Used when the value passed to a property has 1 interpolated value in it:
11483 *
11484 * ```html
11485 * <div attr.title="prefix{{v0}}suffix"></div>
11486 * ```
11487 *
11488 * Its compiled representation is::
11489 *
11490 * ```ts
11491 * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');
11492 * ```
11493 *
11494 * @param attrName The name of the attribute to update
11495 * @param prefix Static value used for concatenation only.
11496 * @param v0 Value checked for change.
11497 * @param suffix Static value used for concatenation only.
11498 * @param sanitizer An optional sanitizer function
11499 * @returns itself, so that it may be chained.
11500 * @codeGenApi
11501 */
11502export declare function ɵɵattributeInterpolate1(attrName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate1;
11503
11504/**
11505 *
11506 * Update an interpolated attribute on an element with 2 bound values surrounded by text.
11507 *
11508 * Used when the value passed to a property has 2 interpolated values in it:
11509 *
11510 * ```html
11511 * <div attr.title="prefix{{v0}}-{{v1}}suffix"></div>
11512 * ```
11513 *
11514 * Its compiled representation is::
11515 *
11516 * ```ts
11517 * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
11518 * ```
11519 *
11520 * @param attrName The name of the attribute to update
11521 * @param prefix Static value used for concatenation only.
11522 * @param v0 Value checked for change.
11523 * @param i0 Static value used for concatenation only.
11524 * @param v1 Value checked for change.
11525 * @param suffix Static value used for concatenation only.
11526 * @param sanitizer An optional sanitizer function
11527 * @returns itself, so that it may be chained.
11528 * @codeGenApi
11529 */
11530export declare function ɵɵattributeInterpolate2(attrName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate2;
11531
11532/**
11533 *
11534 * Update an interpolated attribute on an element with 3 bound values surrounded by text.
11535 *
11536 * Used when the value passed to a property has 3 interpolated values in it:
11537 *
11538 * ```html
11539 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
11540 * ```
11541 *
11542 * Its compiled representation is::
11543 *
11544 * ```ts
11545 * ɵɵattributeInterpolate3(
11546 * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
11547 * ```
11548 *
11549 * @param attrName The name of the attribute to update
11550 * @param prefix Static value used for concatenation only.
11551 * @param v0 Value checked for change.
11552 * @param i0 Static value used for concatenation only.
11553 * @param v1 Value checked for change.
11554 * @param i1 Static value used for concatenation only.
11555 * @param v2 Value checked for change.
11556 * @param suffix Static value used for concatenation only.
11557 * @param sanitizer An optional sanitizer function
11558 * @returns itself, so that it may be chained.
11559 * @codeGenApi
11560 */
11561export 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;
11562
11563/**
11564 *
11565 * Update an interpolated attribute on an element with 4 bound values surrounded by text.
11566 *
11567 * Used when the value passed to a property has 4 interpolated values in it:
11568 *
11569 * ```html
11570 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
11571 * ```
11572 *
11573 * Its compiled representation is::
11574 *
11575 * ```ts
11576 * ɵɵattributeInterpolate4(
11577 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
11578 * ```
11579 *
11580 * @param attrName The name of the attribute to update
11581 * @param prefix Static value used for concatenation only.
11582 * @param v0 Value checked for change.
11583 * @param i0 Static value used for concatenation only.
11584 * @param v1 Value checked for change.
11585 * @param i1 Static value used for concatenation only.
11586 * @param v2 Value checked for change.
11587 * @param i2 Static value used for concatenation only.
11588 * @param v3 Value checked for change.
11589 * @param suffix Static value used for concatenation only.
11590 * @param sanitizer An optional sanitizer function
11591 * @returns itself, so that it may be chained.
11592 * @codeGenApi
11593 */
11594export 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;
11595
11596/**
11597 *
11598 * Update an interpolated attribute on an element with 5 bound values surrounded by text.
11599 *
11600 * Used when the value passed to a property has 5 interpolated values in it:
11601 *
11602 * ```html
11603 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
11604 * ```
11605 *
11606 * Its compiled representation is::
11607 *
11608 * ```ts
11609 * ɵɵattributeInterpolate5(
11610 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
11611 * ```
11612 *
11613 * @param attrName The name of the attribute to update
11614 * @param prefix Static value used for concatenation only.
11615 * @param v0 Value checked for change.
11616 * @param i0 Static value used for concatenation only.
11617 * @param v1 Value checked for change.
11618 * @param i1 Static value used for concatenation only.
11619 * @param v2 Value checked for change.
11620 * @param i2 Static value used for concatenation only.
11621 * @param v3 Value checked for change.
11622 * @param i3 Static value used for concatenation only.
11623 * @param v4 Value checked for change.
11624 * @param suffix Static value used for concatenation only.
11625 * @param sanitizer An optional sanitizer function
11626 * @returns itself, so that it may be chained.
11627 * @codeGenApi
11628 */
11629export 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;
11630
11631/**
11632 *
11633 * Update an interpolated attribute on an element with 6 bound values surrounded by text.
11634 *
11635 * Used when the value passed to a property has 6 interpolated values in it:
11636 *
11637 * ```html
11638 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
11639 * ```
11640 *
11641 * Its compiled representation is::
11642 *
11643 * ```ts
11644 * ɵɵattributeInterpolate6(
11645 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
11646 * ```
11647 *
11648 * @param attrName The name of the attribute to update
11649 * @param prefix Static value used for concatenation only.
11650 * @param v0 Value checked for change.
11651 * @param i0 Static value used for concatenation only.
11652 * @param v1 Value checked for change.
11653 * @param i1 Static value used for concatenation only.
11654 * @param v2 Value checked for change.
11655 * @param i2 Static value used for concatenation only.
11656 * @param v3 Value checked for change.
11657 * @param i3 Static value used for concatenation only.
11658 * @param v4 Value checked for change.
11659 * @param i4 Static value used for concatenation only.
11660 * @param v5 Value checked for change.
11661 * @param suffix Static value used for concatenation only.
11662 * @param sanitizer An optional sanitizer function
11663 * @returns itself, so that it may be chained.
11664 * @codeGenApi
11665 */
11666export 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;
11667
11668/**
11669 *
11670 * Update an interpolated attribute on an element with 7 bound values surrounded by text.
11671 *
11672 * Used when the value passed to a property has 7 interpolated values in it:
11673 *
11674 * ```html
11675 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
11676 * ```
11677 *
11678 * Its compiled representation is::
11679 *
11680 * ```ts
11681 * ɵɵattributeInterpolate7(
11682 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
11683 * ```
11684 *
11685 * @param attrName The name of the attribute to update
11686 * @param prefix Static value used for concatenation only.
11687 * @param v0 Value checked for change.
11688 * @param i0 Static value used for concatenation only.
11689 * @param v1 Value checked for change.
11690 * @param i1 Static value used for concatenation only.
11691 * @param v2 Value checked for change.
11692 * @param i2 Static value used for concatenation only.
11693 * @param v3 Value checked for change.
11694 * @param i3 Static value used for concatenation only.
11695 * @param v4 Value checked for change.
11696 * @param i4 Static value used for concatenation only.
11697 * @param v5 Value checked for change.
11698 * @param i5 Static value used for concatenation only.
11699 * @param v6 Value checked for change.
11700 * @param suffix Static value used for concatenation only.
11701 * @param sanitizer An optional sanitizer function
11702 * @returns itself, so that it may be chained.
11703 * @codeGenApi
11704 */
11705export 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;
11706
11707/**
11708 *
11709 * Update an interpolated attribute on an element with 8 bound values surrounded by text.
11710 *
11711 * Used when the value passed to a property has 8 interpolated values in it:
11712 *
11713 * ```html
11714 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
11715 * ```
11716 *
11717 * Its compiled representation is::
11718 *
11719 * ```ts
11720 * ɵɵattributeInterpolate8(
11721 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
11722 * ```
11723 *
11724 * @param attrName The name of the attribute to update
11725 * @param prefix Static value used for concatenation only.
11726 * @param v0 Value checked for change.
11727 * @param i0 Static value used for concatenation only.
11728 * @param v1 Value checked for change.
11729 * @param i1 Static value used for concatenation only.
11730 * @param v2 Value checked for change.
11731 * @param i2 Static value used for concatenation only.
11732 * @param v3 Value checked for change.
11733 * @param i3 Static value used for concatenation only.
11734 * @param v4 Value checked for change.
11735 * @param i4 Static value used for concatenation only.
11736 * @param v5 Value checked for change.
11737 * @param i5 Static value used for concatenation only.
11738 * @param v6 Value checked for change.
11739 * @param i6 Static value used for concatenation only.
11740 * @param v7 Value checked for change.
11741 * @param suffix Static value used for concatenation only.
11742 * @param sanitizer An optional sanitizer function
11743 * @returns itself, so that it may be chained.
11744 * @codeGenApi
11745 */
11746export 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;
11747
11748/**
11749 * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.
11750 *
11751 * Used when the number of interpolated values exceeds 8.
11752 *
11753 * ```html
11754 * <div
11755 * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
11756 * ```
11757 *
11758 * Its compiled representation is::
11759 *
11760 * ```ts
11761 * ɵɵattributeInterpolateV(
11762 * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
11763 * 'suffix']);
11764 * ```
11765 *
11766 * @param attrName The name of the attribute to update.
11767 * @param values The collection of values and the strings in-between those values, beginning with
11768 * a string prefix and ending with a string suffix.
11769 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
11770 * @param sanitizer An optional sanitizer function
11771 * @returns itself, so that it may be chained.
11772 * @codeGenApi
11773 */
11774export declare function ɵɵattributeInterpolateV(attrName: string, values: any[], sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolateV;
11775
11776/**
11777 * Update class bindings using an object literal or class-string on an element.
11778 *
11779 * This instruction is meant to apply styling via the `[class]="exp"` template bindings.
11780 * When classes are applied to the element they will then be updated with
11781 * respect to any styles/classes set via `classProp`. If any
11782 * classes are set to falsy then they will be removed from the element.
11783 *
11784 * Note that the styling instruction will not be applied until `stylingApply` is called.
11785 * Note that this will the provided classMap value to the host element if this function is called
11786 * within a host binding.
11787 *
11788 * @param classes A key/value map or string of CSS classes that will be added to the
11789 * given element. Any missing classes (that have already been applied to the element
11790 * beforehand) will be removed (unset) from the element's list of CSS classes.
11791 *
11792 * @codeGenApi
11793 */
11794export declare function ɵɵclassMap(classes: {
11795 [className: string]: boolean | undefined | null;
11796} | string | undefined | null): void;
11797
11798
11799/**
11800 *
11801 * Update an interpolated class on an element with single bound value surrounded by text.
11802 *
11803 * Used when the value passed to a property has 1 interpolated value in it:
11804 *
11805 * ```html
11806 * <div class="prefix{{v0}}suffix"></div>
11807 * ```
11808 *
11809 * Its compiled representation is:
11810 *
11811 * ```ts
11812 * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');
11813 * ```
11814 *
11815 * @param prefix Static value used for concatenation only.
11816 * @param v0 Value checked for change.
11817 * @param suffix Static value used for concatenation only.
11818 * @codeGenApi
11819 */
11820export declare function ɵɵclassMapInterpolate1(prefix: string, v0: any, suffix: string): void;
11821
11822/**
11823 *
11824 * Update an interpolated class on an element with 2 bound values surrounded by text.
11825 *
11826 * Used when the value passed to a property has 2 interpolated values in it:
11827 *
11828 * ```html
11829 * <div class="prefix{{v0}}-{{v1}}suffix"></div>
11830 * ```
11831 *
11832 * Its compiled representation is:
11833 *
11834 * ```ts
11835 * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');
11836 * ```
11837 *
11838 * @param prefix Static value used for concatenation only.
11839 * @param v0 Value checked for change.
11840 * @param i0 Static value used for concatenation only.
11841 * @param v1 Value checked for change.
11842 * @param suffix Static value used for concatenation only.
11843 * @codeGenApi
11844 */
11845export declare function ɵɵclassMapInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): void;
11846
11847/**
11848 *
11849 * Update an interpolated class on an element with 3 bound values surrounded by text.
11850 *
11851 * Used when the value passed to a property has 3 interpolated values in it:
11852 *
11853 * ```html
11854 * <div class="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
11855 * ```
11856 *
11857 * Its compiled representation is:
11858 *
11859 * ```ts
11860 * ɵɵclassMapInterpolate3(
11861 * 'prefix', v0, '-', v1, '-', v2, 'suffix');
11862 * ```
11863 *
11864 * @param prefix Static value used for concatenation only.
11865 * @param v0 Value checked for change.
11866 * @param i0 Static value used for concatenation only.
11867 * @param v1 Value checked for change.
11868 * @param i1 Static value used for concatenation only.
11869 * @param v2 Value checked for change.
11870 * @param suffix Static value used for concatenation only.
11871 * @codeGenApi
11872 */
11873export declare function ɵɵclassMapInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void;
11874
11875/**
11876 *
11877 * Update an interpolated class on an element with 4 bound values surrounded by text.
11878 *
11879 * Used when the value passed to a property has 4 interpolated values in it:
11880 *
11881 * ```html
11882 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
11883 * ```
11884 *
11885 * Its compiled representation is:
11886 *
11887 * ```ts
11888 * ɵɵclassMapInterpolate4(
11889 * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
11890 * ```
11891 *
11892 * @param prefix Static value used for concatenation only.
11893 * @param v0 Value checked for change.
11894 * @param i0 Static value used for concatenation only.
11895 * @param v1 Value checked for change.
11896 * @param i1 Static value used for concatenation only.
11897 * @param v2 Value checked for change.
11898 * @param i2 Static value used for concatenation only.
11899 * @param v3 Value checked for change.
11900 * @param suffix Static value used for concatenation only.
11901 * @codeGenApi
11902 */
11903export declare function ɵɵclassMapInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): void;
11904
11905/**
11906 *
11907 * Update an interpolated class on an element with 5 bound values surrounded by text.
11908 *
11909 * Used when the value passed to a property has 5 interpolated values in it:
11910 *
11911 * ```html
11912 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
11913 * ```
11914 *
11915 * Its compiled representation is:
11916 *
11917 * ```ts
11918 * ɵɵclassMapInterpolate5(
11919 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
11920 * ```
11921 *
11922 * @param prefix Static value used for concatenation only.
11923 * @param v0 Value checked for change.
11924 * @param i0 Static value used for concatenation only.
11925 * @param v1 Value checked for change.
11926 * @param i1 Static value used for concatenation only.
11927 * @param v2 Value checked for change.
11928 * @param i2 Static value used for concatenation only.
11929 * @param v3 Value checked for change.
11930 * @param i3 Static value used for concatenation only.
11931 * @param v4 Value checked for change.
11932 * @param suffix Static value used for concatenation only.
11933 * @codeGenApi
11934 */
11935export 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;
11936
11937/**
11938 *
11939 * Update an interpolated class on an element with 6 bound values surrounded by text.
11940 *
11941 * Used when the value passed to a property has 6 interpolated values in it:
11942 *
11943 * ```html
11944 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
11945 * ```
11946 *
11947 * Its compiled representation is:
11948 *
11949 * ```ts
11950 * ɵɵclassMapInterpolate6(
11951 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
11952 * ```
11953 *
11954 * @param prefix Static value used for concatenation only.
11955 * @param v0 Value checked for change.
11956 * @param i0 Static value used for concatenation only.
11957 * @param v1 Value checked for change.
11958 * @param i1 Static value used for concatenation only.
11959 * @param v2 Value checked for change.
11960 * @param i2 Static value used for concatenation only.
11961 * @param v3 Value checked for change.
11962 * @param i3 Static value used for concatenation only.
11963 * @param v4 Value checked for change.
11964 * @param i4 Static value used for concatenation only.
11965 * @param v5 Value checked for change.
11966 * @param suffix Static value used for concatenation only.
11967 * @codeGenApi
11968 */
11969export 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;
11970
11971/**
11972 *
11973 * Update an interpolated class on an element with 7 bound values surrounded by text.
11974 *
11975 * Used when the value passed to a property has 7 interpolated values in it:
11976 *
11977 * ```html
11978 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
11979 * ```
11980 *
11981 * Its compiled representation is:
11982 *
11983 * ```ts
11984 * ɵɵclassMapInterpolate7(
11985 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
11986 * ```
11987 *
11988 * @param prefix Static value used for concatenation only.
11989 * @param v0 Value checked for change.
11990 * @param i0 Static value used for concatenation only.
11991 * @param v1 Value checked for change.
11992 * @param i1 Static value used for concatenation only.
11993 * @param v2 Value checked for change.
11994 * @param i2 Static value used for concatenation only.
11995 * @param v3 Value checked for change.
11996 * @param i3 Static value used for concatenation only.
11997 * @param v4 Value checked for change.
11998 * @param i4 Static value used for concatenation only.
11999 * @param v5 Value checked for change.
12000 * @param i5 Static value used for concatenation only.
12001 * @param v6 Value checked for change.
12002 * @param suffix Static value used for concatenation only.
12003 * @codeGenApi
12004 */
12005export 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;
12006
12007/**
12008 *
12009 * Update an interpolated class on an element with 8 bound values surrounded by text.
12010 *
12011 * Used when the value passed to a property has 8 interpolated values in it:
12012 *
12013 * ```html
12014 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
12015 * ```
12016 *
12017 * Its compiled representation is:
12018 *
12019 * ```ts
12020 * ɵɵclassMapInterpolate8(
12021 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
12022 * ```
12023 *
12024 * @param prefix Static value used for concatenation only.
12025 * @param v0 Value checked for change.
12026 * @param i0 Static value used for concatenation only.
12027 * @param v1 Value checked for change.
12028 * @param i1 Static value used for concatenation only.
12029 * @param v2 Value checked for change.
12030 * @param i2 Static value used for concatenation only.
12031 * @param v3 Value checked for change.
12032 * @param i3 Static value used for concatenation only.
12033 * @param v4 Value checked for change.
12034 * @param i4 Static value used for concatenation only.
12035 * @param v5 Value checked for change.
12036 * @param i5 Static value used for concatenation only.
12037 * @param v6 Value checked for change.
12038 * @param i6 Static value used for concatenation only.
12039 * @param v7 Value checked for change.
12040 * @param suffix Static value used for concatenation only.
12041 * @codeGenApi
12042 */
12043export 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;
12044
12045/**
12046 * Update an interpolated class on an element with 9 or more bound values surrounded by text.
12047 *
12048 * Used when the number of interpolated values exceeds 8.
12049 *
12050 * ```html
12051 * <div
12052 * class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
12053 * ```
12054 *
12055 * Its compiled representation is:
12056 *
12057 * ```ts
12058 * ɵɵclassMapInterpolateV(
12059 * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
12060 * 'suffix']);
12061 * ```
12062 *.
12063 * @param values The collection of values and the strings in-between those values, beginning with
12064 * a string prefix and ending with a string suffix.
12065 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
12066 * @codeGenApi
12067 */
12068export declare function ɵɵclassMapInterpolateV(values: any[]): void;
12069
12070/**
12071 * Update a class binding on an element with the provided value.
12072 *
12073 * This instruction is meant to handle the `[class.foo]="exp"` case and,
12074 * therefore, the class binding itself must already be allocated using
12075 * `styling` within the creation block.
12076 *
12077 * @param prop A valid CSS class (only one).
12078 * @param value A true/false value which will turn the class on or off.
12079 *
12080 * Note that this will apply the provided class value to the host element if this function
12081 * is called within a host binding function.
12082 *
12083 * @codeGenApi
12084 */
12085export declare function ɵɵclassProp(className: string, value: boolean | undefined | null): typeof ɵɵclassProp;
12086
12087/**
12088 * @publicApi
12089 */
12090export declare type ɵɵComponentDeclaration<T, Selector extends String, ExportAs extends string[], InputMap extends {
12091 [key: string]: string;
12092}, OutputMap extends {
12093 [key: string]: string;
12094}, QueryFields extends string[], NgContentSelectors extends string[]> = unknown;
12095
12096/**
12097 * Registers a QueryList, associated with a content query, for later refresh (part of a view
12098 * refresh).
12099 *
12100 * @param directiveIndex Current directive index
12101 * @param predicate The type for which the query will search
12102 * @param flags Flags associated with the query
12103 * @param read What to save in the query
12104 * @returns QueryList<T>
12105 *
12106 * @codeGenApi
12107 */
12108export declare function ɵɵcontentQuery<T>(directiveIndex: number, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): void;
12109
12110/**
12111 * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a
12112 * definition.
12113 *
12114 * This exists primarily to support ngcc migration of an existing View Engine pattern, where an
12115 * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it
12116 * generates a skeleton definition on the child class, and applies this feature.
12117 *
12118 * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,
12119 * including things like the component template function.
12120 *
12121 * @param definition The definition of a child class which inherits from a parent class with its
12122 * own definition.
12123 *
12124 * @codeGenApi
12125 */
12126export declare function ɵɵCopyDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
12127
12128/**
12129 * Create a component definition object.
12130 *
12131 *
12132 * # Example
12133 * ```
12134 * class MyDirective {
12135 * // Generated by Angular Template Compiler
12136 * // [Symbol] syntax will not be supported by TypeScript until v2.7
12137 * static ɵcmp = defineComponent({
12138 * ...
12139 * });
12140 * }
12141 * ```
12142 * @codeGenApi
12143 */
12144export declare function ɵɵdefineComponent<T>(componentDefinition: {
12145 /**
12146 * Directive type, needed to configure the injector.
12147 */
12148 type: Type<T>;
12149 /** The selectors that will be used to match nodes to this component. */
12150 selectors?: ɵCssSelectorList;
12151 /**
12152 * The number of nodes, local refs, and pipes in this component template.
12153 *
12154 * Used to calculate the length of this component's LView array, so we
12155 * can pre-fill the array and set the binding start index.
12156 */
12157 decls: number;
12158 /**
12159 * The number of bindings in this component template (including pure fn bindings).
12160 *
12161 * Used to calculate the length of this component's LView array, so we
12162 * can pre-fill the array and set the host binding start index.
12163 */
12164 vars: number;
12165 /**
12166 * A map of input names.
12167 *
12168 * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
12169 *
12170 * Given:
12171 * ```
12172 * class MyComponent {
12173 * @Input()
12174 * publicInput1: string;
12175 *
12176 * @Input('publicInput2')
12177 * declaredInput2: string;
12178 * }
12179 * ```
12180 *
12181 * is described as:
12182 * ```
12183 * {
12184 * publicInput1: 'publicInput1',
12185 * declaredInput2: ['publicInput2', 'declaredInput2'],
12186 * }
12187 * ```
12188 *
12189 * Which the minifier may translate to:
12190 * ```
12191 * {
12192 * minifiedPublicInput1: 'publicInput1',
12193 * minifiedDeclaredInput2: ['publicInput2', 'declaredInput2'],
12194 * }
12195 * ```
12196 *
12197 * This allows the render to re-construct the minified, public, and declared names
12198 * of properties.
12199 *
12200 * NOTE:
12201 * - Because declared and public name are usually same we only generate the array
12202 * `['public', 'declared']` format when they differ.
12203 * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
12204 * inconsistent behavior in that it uses declared names rather than minified or public. For
12205 * this reason `NgOnChanges` will be deprecated and removed in future version and this
12206 * API will be simplified to be consistent with `output`.
12207 */
12208 inputs?: {
12209 [P in keyof T]?: string | [string, string];
12210 };
12211 /**
12212 * A map of output names.
12213 *
12214 * The format is in: `{[actualPropertyName: string]:string}`.
12215 *
12216 * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
12217 *
12218 * This allows the render to re-construct the minified and non-minified names
12219 * of properties.
12220 */
12221 outputs?: {
12222 [P in keyof T]?: string;
12223 };
12224 /**
12225 * Function executed by the parent template to allow child directive to apply host bindings.
12226 */
12227 hostBindings?: HostBindingsFunction<T>;
12228 /**
12229 * The number of bindings in this directive `hostBindings` (including pure fn bindings).
12230 *
12231 * Used to calculate the length of the component's LView array, so we
12232 * can pre-fill the array and set the host binding start index.
12233 */
12234 hostVars?: number;
12235 /**
12236 * Assign static attribute values to a host element.
12237 *
12238 * This property will assign static attribute values as well as class and style
12239 * values to a host element. Since attribute values can consist of different types of values, the
12240 * `hostAttrs` array must include the values in the following format:
12241 *
12242 * attrs = [
12243 * // static attributes (like `title`, `name`, `id`...)
12244 * attr1, value1, attr2, value,
12245 *
12246 * // a single namespace value (like `x:id`)
12247 * NAMESPACE_MARKER, namespaceUri1, name1, value1,
12248 *
12249 * // another single namespace value (like `x:name`)
12250 * NAMESPACE_MARKER, namespaceUri2, name2, value2,
12251 *
12252 * // a series of CSS classes that will be applied to the element (no spaces)
12253 * CLASSES_MARKER, class1, class2, class3,
12254 *
12255 * // a series of CSS styles (property + value) that will be applied to the element
12256 * STYLES_MARKER, prop1, value1, prop2, value2
12257 * ]
12258 *
12259 * All non-class and non-style attributes must be defined at the start of the list
12260 * first before all class and style values are set. When there is a change in value
12261 * type (like when classes and styles are introduced) a marker must be used to separate
12262 * the entries. The marker values themselves are set via entries found in the
12263 * [AttributeMarker] enum.
12264 */
12265 hostAttrs?: TAttributes;
12266 /**
12267 * Function to create instances of content queries associated with a given directive.
12268 */
12269 contentQueries?: ContentQueriesFunction<T>;
12270 /**
12271 * Defines the name that can be used in the template to assign this directive to a variable.
12272 *
12273 * See: {@link Directive.exportAs}
12274 */
12275 exportAs?: string[];
12276 /**
12277 * Template function use for rendering DOM.
12278 *
12279 * This function has following structure.
12280 *
12281 * ```
12282 * function Template<T>(ctx:T, creationMode: boolean) {
12283 * if (creationMode) {
12284 * // Contains creation mode instructions.
12285 * }
12286 * // Contains binding update instructions
12287 * }
12288 * ```
12289 *
12290 * Common instructions are:
12291 * Creation mode instructions:
12292 * - `elementStart`, `elementEnd`
12293 * - `text`
12294 * - `container`
12295 * - `listener`
12296 *
12297 * Binding update instructions:
12298 * - `bind`
12299 * - `elementAttribute`
12300 * - `elementProperty`
12301 * - `elementClass`
12302 * - `elementStyle`
12303 *
12304 */
12305 template: ComponentTemplate<T>;
12306 /**
12307 * Constants for the nodes in the component's view.
12308 * Includes attribute arrays, local definition arrays etc.
12309 */
12310 consts?: TConstantsOrFactory;
12311 /**
12312 * An array of `ngContent[selector]` values that were found in the template.
12313 */
12314 ngContentSelectors?: string[];
12315 /**
12316 * Additional set of instructions specific to view query processing. This could be seen as a
12317 * set of instruction to be inserted into the template function.
12318 *
12319 * Query-related instructions need to be pulled out to a specific function as a timing of
12320 * execution is different as compared to all other instructions (after change detection hooks but
12321 * before view hooks).
12322 */
12323 viewQuery?: ViewQueriesFunction<T> | null;
12324 /**
12325 * A list of optional features to apply.
12326 *
12327 * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}
12328 */
12329 features?: ComponentDefFeature[];
12330 /**
12331 * Defines template and style encapsulation options available for Component's {@link Component}.
12332 */
12333 encapsulation?: ViewEncapsulation;
12334 /**
12335 * Defines arbitrary developer-defined data to be stored on a renderer instance.
12336 * This is useful for renderers that delegate to other renderers.
12337 *
12338 * see: animation
12339 */
12340 data?: {
12341 [kind: string]: any;
12342 };
12343 /**
12344 * A set of styles that the component needs to be present for component to render correctly.
12345 */
12346 styles?: string[];
12347 /**
12348 * The strategy that the default change detector uses to detect changes.
12349 * When set, takes effect the next time change detection is triggered.
12350 */
12351 changeDetection?: ChangeDetectionStrategy;
12352 /**
12353 * Registry of directives and components that may be found in this component's view.
12354 *
12355 * The property is either an array of `DirectiveDef`s or a function which returns the array of
12356 * `DirectiveDef`s. The function is necessary to be able to support forward declarations.
12357 */
12358 directives?: DirectiveTypesOrFactory | null;
12359 /**
12360 * Registry of pipes that may be found in this component's view.
12361 *
12362 * The property is either an array of `PipeDefs`s or a function which returns the array of
12363 * `PipeDefs`s. The function is necessary to be able to support forward declarations.
12364 */
12365 pipes?: PipeTypesOrFactory | null;
12366 /**
12367 * The set of schemas that declare elements to be allowed in the component's template.
12368 */
12369 schemas?: SchemaMetadata[] | null;
12370}): unknown;
12371
12372/**
12373 * Create a directive definition object.
12374 *
12375 * # Example
12376 * ```ts
12377 * class MyDirective {
12378 * // Generated by Angular Template Compiler
12379 * // [Symbol] syntax will not be supported by TypeScript until v2.7
12380 * static ɵdir = ɵɵdefineDirective({
12381 * ...
12382 * });
12383 * }
12384 * ```
12385 *
12386 * @codeGenApi
12387 */
12388export declare const ɵɵdefineDirective: <T>(directiveDefinition: {
12389 /**
12390 * Directive type, needed to configure the injector.
12391 */
12392 type: Type<T>;
12393 /** The selectors that will be used to match nodes to this directive. */
12394 selectors?: ɵCssSelectorList | undefined;
12395 /**
12396 * A map of input names.
12397 *
12398 * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
12399 *
12400 * Given:
12401 * ```
12402 * class MyComponent {
12403 * @Input()
12404 * publicInput1: string;
12405 *
12406 * @Input('publicInput2')
12407 * declaredInput2: string;
12408 * }
12409 * ```
12410 *
12411 * is described as:
12412 * ```
12413 * {
12414 * publicInput1: 'publicInput1',
12415 * declaredInput2: ['declaredInput2', 'publicInput2'],
12416 * }
12417 * ```
12418 *
12419 * Which the minifier may translate to:
12420 * ```
12421 * {
12422 * minifiedPublicInput1: 'publicInput1',
12423 * minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],
12424 * }
12425 * ```
12426 *
12427 * This allows the render to re-construct the minified, public, and declared names
12428 * of properties.
12429 *
12430 * NOTE:
12431 * - Because declared and public name are usually same we only generate the array
12432 * `['declared', 'public']` format when they differ.
12433 * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
12434 * inconsistent behavior in that it uses declared names rather than minified or public. For
12435 * this reason `NgOnChanges` will be deprecated and removed in future version and this
12436 * API will be simplified to be consistent with `output`.
12437 */
12438 inputs?: { [P in keyof T]?: string | [string, string] | undefined; } | undefined;
12439 /**
12440 * A map of output names.
12441 *
12442 * The format is in: `{[actualPropertyName: string]:string}`.
12443 *
12444 * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
12445 *
12446 * This allows the render to re-construct the minified and non-minified names
12447 * of properties.
12448 */
12449 outputs?: { [P_1 in keyof T]?: string | undefined; } | undefined;
12450 /**
12451 * A list of optional features to apply.
12452 *
12453 * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}
12454 */
12455 features?: DirectiveDefFeature[] | undefined;
12456 /**
12457 * Function executed by the parent template to allow child directive to apply host bindings.
12458 */
12459 hostBindings?: HostBindingsFunction<T> | undefined;
12460 /**
12461 * The number of bindings in this directive `hostBindings` (including pure fn bindings).
12462 *
12463 * Used to calculate the length of the component's LView array, so we
12464 * can pre-fill the array and set the host binding start index.
12465 */
12466 hostVars?: number | undefined;
12467 /**
12468 * Assign static attribute values to a host element.
12469 *
12470 * This property will assign static attribute values as well as class and style
12471 * values to a host element. Since attribute values can consist of different types of values,
12472 * the `hostAttrs` array must include the values in the following format:
12473 *
12474 * attrs = [
12475 * // static attributes (like `title`, `name`, `id`...)
12476 * attr1, value1, attr2, value,
12477 *
12478 * // a single namespace value (like `x:id`)
12479 * NAMESPACE_MARKER, namespaceUri1, name1, value1,
12480 *
12481 * // another single namespace value (like `x:name`)
12482 * NAMESPACE_MARKER, namespaceUri2, name2, value2,
12483 *
12484 * // a series of CSS classes that will be applied to the element (no spaces)
12485 * CLASSES_MARKER, class1, class2, class3,
12486 *
12487 * // a series of CSS styles (property + value) that will be applied to the element
12488 * STYLES_MARKER, prop1, value1, prop2, value2
12489 * ]
12490 *
12491 * All non-class and non-style attributes must be defined at the start of the list
12492 * first before all class and style values are set. When there is a change in value
12493 * type (like when classes and styles are introduced) a marker must be used to separate
12494 * the entries. The marker values themselves are set via entries found in the
12495 * [AttributeMarker] enum.
12496 */
12497 hostAttrs?: TAttributes | undefined;
12498 /**
12499 * Function to create instances of content queries associated with a given directive.
12500 */
12501 contentQueries?: ContentQueriesFunction<T> | undefined;
12502 /**
12503 * Additional set of instructions specific to view query processing. This could be seen as a
12504 * set of instructions to be inserted into the template function.
12505 */
12506 viewQuery?: ViewQueriesFunction<T> | null | undefined;
12507 /**
12508 * Defines the name that can be used in the template to assign this directive to a variable.
12509 *
12510 * See: {@link Directive.exportAs}
12511 */
12512 exportAs?: string[] | undefined;
12513}) => never;
12514
12515/**
12516 * Construct an injectable definition which defines how a token will be constructed by the DI
12517 * system, and in which injectors (if any) it will be available.
12518 *
12519 * This should be assigned to a static `ɵprov` field on a type, which will then be an
12520 * `InjectableType`.
12521 *
12522 * Options:
12523 * * `providedIn` determines which injectors will include the injectable, by either associating it
12524 * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be
12525 * provided in the `'root'` injector, which will be the application-level injector in most apps.
12526 * * `factory` gives the zero argument function which will create an instance of the injectable.
12527 * The factory can call `inject` to access the `Injector` and request injection of dependencies.
12528 *
12529 * @codeGenApi
12530 * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
12531 */
12532export declare function ɵɵdefineInjectable<T>(opts: {
12533 token: unknown;
12534 providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
12535 factory: () => T;
12536}): unknown;
12537
12538/**
12539 * Construct an `InjectorDef` which configures an injector.
12540 *
12541 * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an
12542 * `InjectorType`.
12543 *
12544 * Options:
12545 *
12546 * * `providers`: an optional array of providers to add to the injector. Each provider must
12547 * either have a factory or point to a type which has a `ɵprov` static property (the
12548 * type must be an `InjectableType`).
12549 * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s
12550 * whose providers will also be added to the injector. Locally provided types will override
12551 * providers from imports.
12552 *
12553 * @codeGenApi
12554 */
12555export declare function ɵɵdefineInjector(options: {
12556 providers?: any[];
12557 imports?: any[];
12558}): unknown;
12559
12560/**
12561 * @codeGenApi
12562 */
12563export declare function ɵɵdefineNgModule<T>(def: {
12564 /** Token representing the module. Used by DI. */
12565 type: T;
12566 /** List of components to bootstrap. */
12567 bootstrap?: Type<any>[] | (() => Type<any>[]);
12568 /** List of components, directives, and pipes declared by this module. */
12569 declarations?: Type<any>[] | (() => Type<any>[]);
12570 /** List of modules or `ModuleWithProviders` imported by this module. */
12571 imports?: Type<any>[] | (() => Type<any>[]);
12572 /**
12573 * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
12574 * module.
12575 */
12576 exports?: Type<any>[] | (() => Type<any>[]);
12577 /** The set of schemas that declare elements to be allowed in the NgModule. */
12578 schemas?: SchemaMetadata[] | null;
12579 /** Unique ID for the module that is used with `getModuleFactory`. */
12580 id?: string | null;
12581}): unknown;
12582
12583/**
12584 * Create a pipe definition object.
12585 *
12586 * # Example
12587 * ```
12588 * class MyPipe implements PipeTransform {
12589 * // Generated by Angular Template Compiler
12590 * static ɵpipe = definePipe({
12591 * ...
12592 * });
12593 * }
12594 * ```
12595 * @param pipeDef Pipe definition generated by the compiler
12596 *
12597 * @codeGenApi
12598 */
12599export declare function ɵɵdefinePipe<T>(pipeDef: {
12600 /** Name of the pipe. Used for matching pipes in template to pipe defs. */
12601 name: string;
12602 /** Pipe class reference. Needed to extract pipe lifecycle hooks. */
12603 type: Type<T>;
12604 /** Whether the pipe is pure. */
12605 pure?: boolean;
12606}): unknown;
12607
12608
12609/**
12610 * @publicApi
12611 */
12612export declare type ɵɵDirectiveDeclaration<T, Selector extends string, ExportAs extends string[], InputMap extends {
12613 [key: string]: string;
12614}, OutputMap extends {
12615 [key: string]: string;
12616}, QueryFields extends string[]> = unknown;
12617
12618/**
12619 * Returns the value associated to the given token from the injectors.
12620 *
12621 * `directiveInject` is intended to be used for directive, component and pipe factories.
12622 * All other injection use `inject` which does not walk the node injector tree.
12623 *
12624 * Usage example (in factory function):
12625 *
12626 * ```ts
12627 * class SomeDirective {
12628 * constructor(directive: DirectiveA) {}
12629 *
12630 * static ɵdir = ɵɵdefineDirective({
12631 * type: SomeDirective,
12632 * factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))
12633 * });
12634 * }
12635 * ```
12636 * @param token the type or token to inject
12637 * @param flags Injection flags
12638 * @returns the value from the injector or `null` when not found
12639 *
12640 * @codeGenApi
12641 */
12642export declare function ɵɵdirectiveInject<T>(token: ProviderToken<T>): T;
12643
12644export declare function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags: InjectFlags): T;
12645
12646/**
12647 * Disables directive matching on element.
12648 *
12649 * * Example:
12650 * ```
12651 * <my-comp my-directive>
12652 * Should match component / directive.
12653 * </my-comp>
12654 * <div ngNonBindable>
12655 * <!-- ɵɵdisableBindings() -->
12656 * <my-comp my-directive>
12657 * Should not match component / directive because we are in ngNonBindable.
12658 * </my-comp>
12659 * <!-- ɵɵenableBindings() -->
12660 * </div>
12661 * ```
12662 *
12663 * @codeGenApi
12664 */
12665export declare function ɵɵdisableBindings(): void;
12666
12667/**
12668 * Creates an empty element using {@link elementStart} and {@link elementEnd}
12669 *
12670 * @param index Index of the element in the data array
12671 * @param name Name of the DOM Node
12672 * @param attrsIndex Index of the element's attributes in the `consts` array.
12673 * @param localRefsIndex Index of the element's local references in the `consts` array.
12674 *
12675 * @codeGenApi
12676 */
12677export declare function ɵɵelement(index: number, name: string, attrsIndex?: number | null, localRefsIndex?: number): void;
12678
12679/**
12680 * Creates an empty logical container using {@link elementContainerStart}
12681 * and {@link elementContainerEnd}
12682 *
12683 * @param index Index of the element in the LView array
12684 * @param attrsIndex Index of the container attributes in the `consts` array.
12685 * @param localRefsIndex Index of the container's local references in the `consts` array.
12686 *
12687 * @codeGenApi
12688 */
12689export declare function ɵɵelementContainer(index: number, attrsIndex?: number | null, localRefsIndex?: number): void;
12690
12691/**
12692 * Mark the end of the <ng-container>.
12693 *
12694 * @codeGenApi
12695 */
12696export declare function ɵɵelementContainerEnd(): void;
12697
12698/**
12699 * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.
12700 * The instruction must later be followed by `elementContainerEnd()` call.
12701 *
12702 * @param index Index of the element in the LView array
12703 * @param attrsIndex Index of the container attributes in the `consts` array.
12704 * @param localRefsIndex Index of the container's local references in the `consts` array.
12705 *
12706 * Even if this instruction accepts a set of attributes no actual attribute values are propagated to
12707 * the DOM (as a comment node can't have attributes). Attributes are here only for directive
12708 * matching purposes and setting initial inputs of directives.
12709 *
12710 * @codeGenApi
12711 */
12712export declare function ɵɵelementContainerStart(index: number, attrsIndex?: number | null, localRefsIndex?: number): void;
12713
12714/**
12715 * Mark the end of the element.
12716 *
12717 * @codeGenApi
12718 */
12719export declare function ɵɵelementEnd(): void;
12720
12721
12722/**
12723 * Create DOM element. The instruction must later be followed by `elementEnd()` call.
12724 *
12725 * @param index Index of the element in the LView array
12726 * @param name Name of the DOM Node
12727 * @param attrsIndex Index of the element's attributes in the `consts` array.
12728 * @param localRefsIndex Index of the element's local references in the `consts` array.
12729 *
12730 * Attributes and localRefs are passed as an array of strings where elements with an even index
12731 * hold an attribute name and elements with an odd index hold an attribute value, ex.:
12732 * ['id', 'warning5', 'class', 'alert']
12733 *
12734 * @codeGenApi
12735 */
12736export declare function ɵɵelementStart(index: number, name: string, attrsIndex?: number | null, localRefsIndex?: number): void;
12737
12738/**
12739 * Enables directive matching on elements.
12740 *
12741 * * Example:
12742 * ```
12743 * <my-comp my-directive>
12744 * Should match component / directive.
12745 * </my-comp>
12746 * <div ngNonBindable>
12747 * <!-- ɵɵdisableBindings() -->
12748 * <my-comp my-directive>
12749 * Should not match component / directive because we are in ngNonBindable.
12750 * </my-comp>
12751 * <!-- ɵɵenableBindings() -->
12752 * </div>
12753 * ```
12754 *
12755 * @codeGenApi
12756 */
12757export declare function ɵɵenableBindings(): void;
12758
12759/**
12760 * @publicApi
12761 */
12762export declare type ɵɵFactoryDeclaration<T, CtorDependencies extends CtorDependency[]> = unknown;
12763
12764export declare enum ɵɵFactoryTarget {
12765 Directive = 0,
12766 Component = 1,
12767 Injectable = 2,
12768 Pipe = 3,
12769 NgModule = 4
12770}
12771
12772/**
12773 * Returns the current OpaqueViewState instance.
12774 *
12775 * Used in conjunction with the restoreView() instruction to save a snapshot
12776 * of the current view and restore it when listeners are invoked. This allows
12777 * walking the declaration view tree in listeners to get vars from parent views.
12778 *
12779 * @codeGenApi
12780 */
12781export declare function ɵɵgetCurrentView(): OpaqueViewState;
12782
12783/**
12784 * @codeGenApi
12785 */
12786export declare function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T;
12787
12788/**
12789 * Update a property on a host element. Only applies to native node properties, not inputs.
12790 *
12791 * Operates on the element selected by index via the {@link select} instruction.
12792 *
12793 * @param propName Name of property. Because it is going to DOM, this is not subject to
12794 * renaming as part of minification.
12795 * @param value New value to write.
12796 * @param sanitizer An optional function used to sanitize the value.
12797 * @returns This function returns itself so that it may be chained
12798 * (e.g. `property('name', ctx.name)('title', ctx.title)`)
12799 *
12800 * @codeGenApi
12801 */
12802export declare function ɵɵhostProperty<T>(propName: string, value: T, sanitizer?: SanitizerFn | null): typeof ɵɵhostProperty;
12803
12804/**
12805 *
12806 * Use this instruction to create a translation block that doesn't contain any placeholder.
12807 * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.
12808 *
12809 * The translation `message` is the value which is locale specific. The translation string may
12810 * contain placeholders which associate inner elements and sub-templates within the translation.
12811 *
12812 * The translation `message` placeholders are:
12813 * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
12814 * interpolated into. The placeholder `index` points to the expression binding index. An optional
12815 * `block` that matches the sub-template in which it was declared.
12816 * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning
12817 * and end of DOM element that were embedded in the original translation block. The placeholder
12818 * `index` points to the element index in the template instructions set. An optional `block` that
12819 * matches the sub-template in which it was declared.
12820 * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
12821 * split up and translated separately in each angular template function. The `index` points to the
12822 * `template` instruction index. A `block` that matches the sub-template in which it was declared.
12823 *
12824 * @param index A unique index of the translation in the static block.
12825 * @param messageIndex An index of the translation message from the `def.consts` array.
12826 * @param subTemplateIndex Optional sub-template index in the `message`.
12827 *
12828 * @codeGenApi
12829 */
12830export declare function ɵɵi18n(index: number, messageIndex: number, subTemplateIndex?: number): void;
12831
12832/**
12833 * Updates a translation block or an i18n attribute when the bindings have changed.
12834 *
12835 * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}
12836 * (i18n attribute) on which it should update the content.
12837 *
12838 * @codeGenApi
12839 */
12840export declare function ɵɵi18nApply(index: number): void;
12841
12842/**
12843 * Marks a list of attributes as translatable.
12844 *
12845 * @param index A unique index in the static block
12846 * @param values
12847 *
12848 * @codeGenApi
12849 */
12850export declare function ɵɵi18nAttributes(index: number, attrsIndex: number): void;
12851
12852/**
12853 * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes
12854 * into the render tree, moves the placeholder nodes and removes the deleted nodes.
12855 *
12856 * @codeGenApi
12857 */
12858export declare function ɵɵi18nEnd(): void;
12859
12860/**
12861 * Stores the values of the bindings during each update cycle in order to determine if we need to
12862 * update the translated nodes.
12863 *
12864 * @param value The binding's value
12865 * @returns This function returns itself so that it may be chained
12866 * (e.g. `i18nExp(ctx.name)(ctx.title)`)
12867 *
12868 * @codeGenApi
12869 */
12870export declare function ɵɵi18nExp<T>(value: T): typeof ɵɵi18nExp;
12871
12872/**
12873 * Handles message string post-processing for internationalization.
12874 *
12875 * Handles message string post-processing by transforming it from intermediate
12876 * format (that might contain some markers that we need to replace) to the final
12877 * form, consumable by i18nStart instruction. Post processing steps include:
12878 *
12879 * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])
12880 * 2. Replace all ICU vars (like "VAR_PLURAL")
12881 * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}
12882 * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)
12883 * in case multiple ICUs have the same placeholder name
12884 *
12885 * @param message Raw translation string for post processing
12886 * @param replacements Set of replacements that should be applied
12887 *
12888 * @returns Transformed string that can be consumed by i18nStart instruction
12889 *
12890 * @codeGenApi
12891 */
12892export declare function ɵɵi18nPostprocess(message: string, replacements?: {
12893 [key: string]: (string | string[]);
12894}): string;
12895
12896/**
12897 * Marks a block of text as translatable.
12898 *
12899 * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.
12900 * The translation `message` is the value which is locale specific. The translation string may
12901 * contain placeholders which associate inner elements and sub-templates within the translation.
12902 *
12903 * The translation `message` placeholders are:
12904 * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
12905 * interpolated into. The placeholder `index` points to the expression binding index. An optional
12906 * `block` that matches the sub-template in which it was declared.
12907 * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning
12908 * and end of DOM element that were embedded in the original translation block. The placeholder
12909 * `index` points to the element index in the template instructions set. An optional `block` that
12910 * matches the sub-template in which it was declared.
12911 * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
12912 * split up and translated separately in each angular template function. The `index` points to the
12913 * `template` instruction index. A `block` that matches the sub-template in which it was declared.
12914 *
12915 * @param index A unique index of the translation in the static block.
12916 * @param messageIndex An index of the translation message from the `def.consts` array.
12917 * @param subTemplateIndex Optional sub-template index in the `message`.
12918 *
12919 * @codeGenApi
12920 */
12921export declare function ɵɵi18nStart(index: number, messageIndex: number, subTemplateIndex?: number): void;
12922
12923/**
12924 * Merges the definition from a super class to a sub class.
12925 * @param definition The definition that is a SubClass of another directive of component
12926 *
12927 * @codeGenApi
12928 */
12929export declare function ɵɵInheritDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
12930
12931/**
12932 * Generated instruction: Injects a token from the currently active injector.
12933 *
12934 * Must be used in the context of a factory function such as one defined for an
12935 * `InjectionToken`. Throws an error if not called from such a context.
12936 *
12937 * (Additional documentation moved to `inject`, as it is the public API, and an alias for this
12938 * instruction)
12939 *
12940 * @see inject
12941 * @codeGenApi
12942 * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
12943 */
12944export declare function ɵɵinject<T>(token: ProviderToken<T>): T;
12945
12946export declare function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
12947
12948/**
12949 * Information about how a type or `InjectionToken` interfaces with the DI system.
12950 *
12951 * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly
12952 * requesting injection of other types if necessary.
12953 *
12954 * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular
12955 * `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates
12956 * that the injectable does not belong to any scope.
12957 *
12958 * @codeGenApi
12959 * @publicApi The ViewEngine compiler emits code with this type for injectables. This code is
12960 * deployed to npm, and should be treated as public api.
12961
12962 */
12963export declare interface ɵɵInjectableDeclaration<T> {
12964 /**
12965 * Specifies that the given type belongs to a particular injector:
12966 * - `InjectorType` such as `NgModule`,
12967 * - `'root'` the root injector
12968 * - `'any'` all injectors.
12969 * - `null`, does not belong to any injector. Must be explicitly listed in the injector
12970 * `providers`.
12971 */
12972 providedIn: InjectorType<any> | 'root' | 'platform' | 'any' | null;
12973 /**
12974 * The token to which this definition belongs.
12975 *
12976 * Note that this may not be the same as the type that the `factory` will create.
12977 */
12978 token: unknown;
12979 /**
12980 * Factory method to execute to create an instance of the injectable.
12981 */
12982 factory: (t?: Type<any>) => T;
12983 /**
12984 * In a case of no explicit injector, a location where the instance of the injectable is stored.
12985 */
12986 value: T | undefined;
12987}
12988
12989/**
12990 * Facade for the attribute injection from DI.
12991 *
12992 * @codeGenApi
12993 */
12994export declare function ɵɵinjectAttribute(attrNameToInject: string): string | null;
12995
12996/**
12997 * @publicApi
12998 */
12999export declare type ɵɵInjectorDeclaration<T> = unknown;
13000
13001/**
13002 * Information about the providers to be included in an `Injector` as well as how the given type
13003 * which carries the information should be created by the DI system.
13004 *
13005 * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested
13006 * structure of providers with a defined priority (identically to how `NgModule`s also have
13007 * an import/dependency structure).
13008 *
13009 * NOTE: This is a private type and should not be exported
13010 *
13011 * @codeGenApi
13012 */
13013export declare interface ɵɵInjectorDef<T> {
13014 providers: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[];
13015 imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];
13016}
13017
13018/**
13019 * Throws an error indicating that a factory function could not be generated by the compiler for a
13020 * particular class.
13021 *
13022 * This instruction allows the actual error message to be optimized away when ngDevMode is turned
13023 * off, saving bytes of generated code while still providing a good experience in dev mode.
13024 *
13025 * The name of the class is not mentioned here, but will be in the generated factory function name
13026 * and thus in the stack trace.
13027 *
13028 * @codeGenApi
13029 */
13030export declare function ɵɵinvalidFactory(): never;
13031
13032/**
13033 * Throws an error indicating that a factory function could not be generated by the compiler for a
13034 * particular class.
13035 *
13036 * This instruction allows the actual error message to be optimized away when ngDevMode is turned
13037 * off, saving bytes of generated code while still providing a good experience in dev mode.
13038 *
13039 * The name of the class is not mentioned here, but will be in the generated factory function name
13040 * and thus in the stack trace.
13041 *
13042 * @codeGenApi
13043 */
13044export declare function ɵɵinvalidFactoryDep(index: number): never;
13045
13046/**
13047 * Adds an event listener to the current node.
13048 *
13049 * If an output exists on one of the node's directives, it also subscribes to the output
13050 * and saves the subscription for later cleanup.
13051 *
13052 * @param eventName Name of the event
13053 * @param listenerFn The function to be called when event emits
13054 * @param useCapture Whether or not to use capture in event listener
13055 * @param eventTargetResolver Function that returns global target information in case this listener
13056 * should be attached to a global object like window, document or body
13057 *
13058 * @codeGenApi
13059 */
13060export declare function ɵɵlistener(eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean, eventTargetResolver?: GlobalTargetResolver): typeof ɵɵlistener;
13061
13062/**
13063 * Loads a QueryList corresponding to the current view or content query.
13064 *
13065 * @codeGenApi
13066 */
13067export declare function ɵɵloadQuery<T>(): QueryList<T>;
13068
13069/**
13070 * Sets the namespace used to create elements to `null`, which forces element creation to use
13071 * `createElement` rather than `createElementNS`.
13072 *
13073 * @codeGenApi
13074 */
13075export declare function ɵɵnamespaceHTML(): void;
13076
13077/**
13078 * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.
13079 *
13080 * @codeGenApi
13081 */
13082export declare function ɵɵnamespaceMathML(): void;
13083
13084/**
13085 * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.
13086 *
13087 * @codeGenApi
13088 */
13089export declare function ɵɵnamespaceSVG(): void;
13090
13091/**
13092 * Retrieves a context at the level specified and saves it as the global, contextViewData.
13093 * Will get the next level up if level is not specified.
13094 *
13095 * This is used to save contexts of parent views so they can be bound in embedded views, or
13096 * in conjunction with reference() to bind a ref from a parent view.
13097 *
13098 * @param level The relative level of the view from which to grab context compared to contextVewData
13099 * @returns context
13100 *
13101 * @codeGenApi
13102 */
13103export declare function ɵɵnextContext<T = any>(level?: number): T;
13104
13105/**
13106 * Evaluates the class metadata declaration.
13107 *
13108 * @codeGenApi
13109 */
13110export declare function ɵɵngDeclareClassMetadata(decl: {
13111 type: Type<any>;
13112 decorators: any[];
13113 ctorParameters?: () => any[];
13114 propDecorators?: {
13115 [field: string]: any;
13116 };
13117}): void;
13118
13119/**
13120 * Compiles a partial component declaration object into a full component definition object.
13121 *
13122 * @codeGenApi
13123 */
13124export declare function ɵɵngDeclareComponent(decl: R3DeclareComponentFacade): unknown;
13125
13126/**
13127 * Compiles a partial directive declaration object into a full directive definition object.
13128 *
13129 * @codeGenApi
13130 */
13131export declare function ɵɵngDeclareDirective(decl: R3DeclareDirectiveFacade): unknown;
13132
13133/**
13134 * Compiles a partial pipe declaration object into a full pipe definition object.
13135 *
13136 * @codeGenApi
13137 */
13138export declare function ɵɵngDeclareFactory(decl: R3DeclareFactoryFacade): unknown;
13139
13140/**
13141 * Compiles a partial injectable declaration object into a full injectable definition object.
13142 *
13143 * @codeGenApi
13144 */
13145export declare function ɵɵngDeclareInjectable(decl: R3DeclareInjectableFacade): unknown;
13146
13147/**
13148 * Compiles a partial injector declaration object into a full injector definition object.
13149 *
13150 * @codeGenApi
13151 */
13152export declare function ɵɵngDeclareInjector(decl: R3DeclareInjectorFacade): unknown;
13153
13154/**
13155 * Compiles a partial NgModule declaration object into a full NgModule definition object.
13156 *
13157 * @codeGenApi
13158 */
13159export declare function ɵɵngDeclareNgModule(decl: R3DeclareNgModuleFacade): unknown;
13160
13161/**
13162 * Compiles a partial pipe declaration object into a full pipe definition object.
13163 *
13164 * @codeGenApi
13165 */
13166export declare function ɵɵngDeclarePipe(decl: R3DeclarePipeFacade): unknown;
13167
13168/**
13169 * @publicApi
13170 */
13171export declare type ɵɵNgModuleDeclaration<T, Declarations, Imports, Exports> = unknown;
13172
13173/**
13174 * The NgOnChangesFeature decorates a component with support for the ngOnChanges
13175 * lifecycle hook, so it should be included in any component that implements
13176 * that hook.
13177 *
13178 * If the component or directive uses inheritance, the NgOnChangesFeature MUST
13179 * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise
13180 * inherited properties will not be propagated to the ngOnChanges lifecycle
13181 * hook.
13182 *
13183 * Example usage:
13184 *
13185 * ```
13186 * static ɵcmp = defineComponent({
13187 * ...
13188 * inputs: {name: 'publicName'},
13189 * features: [NgOnChangesFeature]
13190 * });
13191 * ```
13192 *
13193 * @codeGenApi
13194 */
13195export declare function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature;
13196
13197
13198/**
13199 * Create a pipe.
13200 *
13201 * @param index Pipe index where the pipe will be stored.
13202 * @param pipeName The name of the pipe
13203 * @returns T the instance of the pipe.
13204 *
13205 * @codeGenApi
13206 */
13207export declare function ɵɵpipe(index: number, pipeName: string): any;
13208
13209/**
13210 * Invokes a pipe with 1 arguments.
13211 *
13212 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
13213 * the pipe only when an input to the pipe changes.
13214 *
13215 * @param index Pipe index where the pipe was stored on creation.
13216 * @param slotOffset the offset in the reserved slot space
13217 * @param v1 1st argument to {@link PipeTransform#transform}.
13218 *
13219 * @codeGenApi
13220 */
13221export declare function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any;
13222
13223/**
13224 * Invokes a pipe with 2 arguments.
13225 *
13226 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
13227 * the pipe only when an input to the pipe changes.
13228 *
13229 * @param index Pipe index where the pipe was stored on creation.
13230 * @param slotOffset the offset in the reserved slot space
13231 * @param v1 1st argument to {@link PipeTransform#transform}.
13232 * @param v2 2nd argument to {@link PipeTransform#transform}.
13233 *
13234 * @codeGenApi
13235 */
13236export declare function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any;
13237
13238/**
13239 * Invokes a pipe with 3 arguments.
13240 *
13241 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
13242 * the pipe only when an input to the pipe changes.
13243 *
13244 * @param index Pipe index where the pipe was stored on creation.
13245 * @param slotOffset the offset in the reserved slot space
13246 * @param v1 1st argument to {@link PipeTransform#transform}.
13247 * @param v2 2nd argument to {@link PipeTransform#transform}.
13248 * @param v3 4rd argument to {@link PipeTransform#transform}.
13249 *
13250 * @codeGenApi
13251 */
13252export declare function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any;
13253
13254/**
13255 * Invokes a pipe with 4 arguments.
13256 *
13257 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
13258 * the pipe only when an input to the pipe changes.
13259 *
13260 * @param index Pipe index where the pipe was stored on creation.
13261 * @param slotOffset the offset in the reserved slot space
13262 * @param v1 1st argument to {@link PipeTransform#transform}.
13263 * @param v2 2nd argument to {@link PipeTransform#transform}.
13264 * @param v3 3rd argument to {@link PipeTransform#transform}.
13265 * @param v4 4th argument to {@link PipeTransform#transform}.
13266 *
13267 * @codeGenApi
13268 */
13269export declare function ɵɵpipeBind4(index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any;
13270
13271/**
13272 * Invokes a pipe with variable number of arguments.
13273 *
13274 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
13275 * the pipe only when an input to the pipe changes.
13276 *
13277 * @param index Pipe index where the pipe was stored on creation.
13278 * @param slotOffset the offset in the reserved slot space
13279 * @param values Array of arguments to pass to {@link PipeTransform#transform} method.
13280 *
13281 * @codeGenApi
13282 */
13283export declare function ɵɵpipeBindV(index: number, slotOffset: number, values: [any, ...any[]]): any;
13284
13285/**
13286 * @publicApi
13287 */
13288export declare type ɵɵPipeDeclaration<T, Name extends string> = unknown;
13289
13290/**
13291 * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call
13292 * to the projectionDef instruction.
13293 *
13294 * @param nodeIndex
13295 * @param selectorIndex:
13296 * - 0 when the selector is `*` (or unspecified as this is the default value),
13297 * - 1 based index of the selector from the {@link projectionDef}
13298 *
13299 * @codeGenApi
13300 */
13301export declare function ɵɵprojection(nodeIndex: number, selectorIndex?: number, attrs?: TAttributes): void;
13302
13303/**
13304 * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
13305 * It takes all the selectors from the entire component's template and decides where
13306 * each projected node belongs (it re-distributes nodes among "buckets" where each "bucket" is
13307 * backed by a selector).
13308 *
13309 * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,
13310 * un-parsed form.
13311 *
13312 * The parsed form is needed for efficient matching of a node against a given CSS selector.
13313 * The un-parsed, textual form is needed for support of the ngProjectAs attribute.
13314 *
13315 * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more
13316 * drawbacks:
13317 * - having only a textual form would require runtime parsing of CSS selectors;
13318 * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a
13319 * template author).
13320 *
13321 * @param projectionSlots? A collection of projection slots. A projection slot can be based
13322 * on a parsed CSS selectors or set to the wildcard selector ("*") in order to match
13323 * all nodes which do not match any selector. If not specified, a single wildcard
13324 * selector projection slot will be defined.
13325 *
13326 * @codeGenApi
13327 */
13328export declare function ɵɵprojectionDef(projectionSlots?: ProjectionSlots): void;
13329
13330/**
13331 * Update a property on a selected element.
13332 *
13333 * Operates on the element selected by index via the {@link select} instruction.
13334 *
13335 * If the property name also exists as an input property on one of the element's directives,
13336 * the component property will be set instead of the element property. This check must
13337 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled
13338 *
13339 * @param propName Name of property. Because it is going to DOM, this is not subject to
13340 * renaming as part of minification.
13341 * @param value New value to write.
13342 * @param sanitizer An optional function used to sanitize the value.
13343 * @returns This function returns itself so that it may be chained
13344 * (e.g. `property('name', ctx.name)('title', ctx.title)`)
13345 *
13346 * @codeGenApi
13347 */
13348export declare function ɵɵproperty<T>(propName: string, value: T, sanitizer?: SanitizerFn | null): typeof ɵɵproperty;
13349
13350/**
13351 *
13352 * Update an interpolated property on an element with a lone bound value
13353 *
13354 * Used when the value passed to a property has 1 interpolated value in it, an no additional text
13355 * surrounds that interpolated value:
13356 *
13357 * ```html
13358 * <div title="{{v0}}"></div>
13359 * ```
13360 *
13361 * Its compiled representation is::
13362 *
13363 * ```ts
13364 * ɵɵpropertyInterpolate('title', v0);
13365 * ```
13366 *
13367 * If the property name also exists as an input property on one of the element's directives,
13368 * the component property will be set instead of the element property. This check must
13369 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13370 *
13371 * @param propName The name of the property to update
13372 * @param prefix Static value used for concatenation only.
13373 * @param v0 Value checked for change.
13374 * @param suffix Static value used for concatenation only.
13375 * @param sanitizer An optional sanitizer function
13376 * @returns itself, so that it may be chained.
13377 * @codeGenApi
13378 */
13379export declare function ɵɵpropertyInterpolate(propName: string, v0: any, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate;
13380
13381/**
13382 *
13383 * Update an interpolated property on an element with single bound value surrounded by text.
13384 *
13385 * Used when the value passed to a property has 1 interpolated value in it:
13386 *
13387 * ```html
13388 * <div title="prefix{{v0}}suffix"></div>
13389 * ```
13390 *
13391 * Its compiled representation is::
13392 *
13393 * ```ts
13394 * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');
13395 * ```
13396 *
13397 * If the property name also exists as an input property on one of the element's directives,
13398 * the component property will be set instead of the element property. This check must
13399 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13400 *
13401 * @param propName The name of the property to update
13402 * @param prefix Static value used for concatenation only.
13403 * @param v0 Value checked for change.
13404 * @param suffix Static value used for concatenation only.
13405 * @param sanitizer An optional sanitizer function
13406 * @returns itself, so that it may be chained.
13407 * @codeGenApi
13408 */
13409export declare function ɵɵpropertyInterpolate1(propName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate1;
13410
13411/**
13412 *
13413 * Update an interpolated property on an element with 2 bound values surrounded by text.
13414 *
13415 * Used when the value passed to a property has 2 interpolated values in it:
13416 *
13417 * ```html
13418 * <div title="prefix{{v0}}-{{v1}}suffix"></div>
13419 * ```
13420 *
13421 * Its compiled representation is::
13422 *
13423 * ```ts
13424 * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
13425 * ```
13426 *
13427 * If the property name also exists as an input property on one of the element's directives,
13428 * the component property will be set instead of the element property. This check must
13429 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13430 *
13431 * @param propName The name of the property to update
13432 * @param prefix Static value used for concatenation only.
13433 * @param v0 Value checked for change.
13434 * @param i0 Static value used for concatenation only.
13435 * @param v1 Value checked for change.
13436 * @param suffix Static value used for concatenation only.
13437 * @param sanitizer An optional sanitizer function
13438 * @returns itself, so that it may be chained.
13439 * @codeGenApi
13440 */
13441export declare function ɵɵpropertyInterpolate2(propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate2;
13442
13443/**
13444 *
13445 * Update an interpolated property on an element with 3 bound values surrounded by text.
13446 *
13447 * Used when the value passed to a property has 3 interpolated values in it:
13448 *
13449 * ```html
13450 * <div title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
13451 * ```
13452 *
13453 * Its compiled representation is::
13454 *
13455 * ```ts
13456 * ɵɵpropertyInterpolate3(
13457 * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
13458 * ```
13459 *
13460 * If the property name also exists as an input property on one of the element's directives,
13461 * the component property will be set instead of the element property. This check must
13462 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13463 *
13464 * @param propName The name of the property to update
13465 * @param prefix Static value used for concatenation only.
13466 * @param v0 Value checked for change.
13467 * @param i0 Static value used for concatenation only.
13468 * @param v1 Value checked for change.
13469 * @param i1 Static value used for concatenation only.
13470 * @param v2 Value checked for change.
13471 * @param suffix Static value used for concatenation only.
13472 * @param sanitizer An optional sanitizer function
13473 * @returns itself, so that it may be chained.
13474 * @codeGenApi
13475 */
13476export declare function ɵɵpropertyInterpolate3(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate3;
13477
13478/**
13479 *
13480 * Update an interpolated property on an element with 4 bound values surrounded by text.
13481 *
13482 * Used when the value passed to a property has 4 interpolated values in it:
13483 *
13484 * ```html
13485 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
13486 * ```
13487 *
13488 * Its compiled representation is::
13489 *
13490 * ```ts
13491 * ɵɵpropertyInterpolate4(
13492 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
13493 * ```
13494 *
13495 * If the property name also exists as an input property on one of the element's directives,
13496 * the component property will be set instead of the element property. This check must
13497 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13498 *
13499 * @param propName The name of the property to update
13500 * @param prefix Static value used for concatenation only.
13501 * @param v0 Value checked for change.
13502 * @param i0 Static value used for concatenation only.
13503 * @param v1 Value checked for change.
13504 * @param i1 Static value used for concatenation only.
13505 * @param v2 Value checked for change.
13506 * @param i2 Static value used for concatenation only.
13507 * @param v3 Value checked for change.
13508 * @param suffix Static value used for concatenation only.
13509 * @param sanitizer An optional sanitizer function
13510 * @returns itself, so that it may be chained.
13511 * @codeGenApi
13512 */
13513export 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;
13514
13515/**
13516 *
13517 * Update an interpolated property on an element with 5 bound values surrounded by text.
13518 *
13519 * Used when the value passed to a property has 5 interpolated values in it:
13520 *
13521 * ```html
13522 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
13523 * ```
13524 *
13525 * Its compiled representation is::
13526 *
13527 * ```ts
13528 * ɵɵpropertyInterpolate5(
13529 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
13530 * ```
13531 *
13532 * If the property name also exists as an input property on one of the element's directives,
13533 * the component property will be set instead of the element property. This check must
13534 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13535 *
13536 * @param propName The name of the property to update
13537 * @param prefix Static value used for concatenation only.
13538 * @param v0 Value checked for change.
13539 * @param i0 Static value used for concatenation only.
13540 * @param v1 Value checked for change.
13541 * @param i1 Static value used for concatenation only.
13542 * @param v2 Value checked for change.
13543 * @param i2 Static value used for concatenation only.
13544 * @param v3 Value checked for change.
13545 * @param i3 Static value used for concatenation only.
13546 * @param v4 Value checked for change.
13547 * @param suffix Static value used for concatenation only.
13548 * @param sanitizer An optional sanitizer function
13549 * @returns itself, so that it may be chained.
13550 * @codeGenApi
13551 */
13552export 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;
13553
13554/**
13555 *
13556 * Update an interpolated property on an element with 6 bound values surrounded by text.
13557 *
13558 * Used when the value passed to a property has 6 interpolated values in it:
13559 *
13560 * ```html
13561 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
13562 * ```
13563 *
13564 * Its compiled representation is::
13565 *
13566 * ```ts
13567 * ɵɵpropertyInterpolate6(
13568 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
13569 * ```
13570 *
13571 * If the property name also exists as an input property on one of the element's directives,
13572 * the component property will be set instead of the element property. This check must
13573 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13574 *
13575 * @param propName The name of the property to update
13576 * @param prefix Static value used for concatenation only.
13577 * @param v0 Value checked for change.
13578 * @param i0 Static value used for concatenation only.
13579 * @param v1 Value checked for change.
13580 * @param i1 Static value used for concatenation only.
13581 * @param v2 Value checked for change.
13582 * @param i2 Static value used for concatenation only.
13583 * @param v3 Value checked for change.
13584 * @param i3 Static value used for concatenation only.
13585 * @param v4 Value checked for change.
13586 * @param i4 Static value used for concatenation only.
13587 * @param v5 Value checked for change.
13588 * @param suffix Static value used for concatenation only.
13589 * @param sanitizer An optional sanitizer function
13590 * @returns itself, so that it may be chained.
13591 * @codeGenApi
13592 */
13593export 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;
13594
13595/**
13596 *
13597 * Update an interpolated property on an element with 7 bound values surrounded by text.
13598 *
13599 * Used when the value passed to a property has 7 interpolated values in it:
13600 *
13601 * ```html
13602 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
13603 * ```
13604 *
13605 * Its compiled representation is::
13606 *
13607 * ```ts
13608 * ɵɵpropertyInterpolate7(
13609 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
13610 * ```
13611 *
13612 * If the property name also exists as an input property on one of the element's directives,
13613 * the component property will be set instead of the element property. This check must
13614 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13615 *
13616 * @param propName The name of the property to update
13617 * @param prefix Static value used for concatenation only.
13618 * @param v0 Value checked for change.
13619 * @param i0 Static value used for concatenation only.
13620 * @param v1 Value checked for change.
13621 * @param i1 Static value used for concatenation only.
13622 * @param v2 Value checked for change.
13623 * @param i2 Static value used for concatenation only.
13624 * @param v3 Value checked for change.
13625 * @param i3 Static value used for concatenation only.
13626 * @param v4 Value checked for change.
13627 * @param i4 Static value used for concatenation only.
13628 * @param v5 Value checked for change.
13629 * @param i5 Static value used for concatenation only.
13630 * @param v6 Value checked for change.
13631 * @param suffix Static value used for concatenation only.
13632 * @param sanitizer An optional sanitizer function
13633 * @returns itself, so that it may be chained.
13634 * @codeGenApi
13635 */
13636export 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;
13637
13638/**
13639 *
13640 * Update an interpolated property on an element with 8 bound values surrounded by text.
13641 *
13642 * Used when the value passed to a property has 8 interpolated values in it:
13643 *
13644 * ```html
13645 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
13646 * ```
13647 *
13648 * Its compiled representation is::
13649 *
13650 * ```ts
13651 * ɵɵpropertyInterpolate8(
13652 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
13653 * ```
13654 *
13655 * If the property name also exists as an input property on one of the element's directives,
13656 * the component property will be set instead of the element property. This check must
13657 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13658 *
13659 * @param propName The name of the property to update
13660 * @param prefix Static value used for concatenation only.
13661 * @param v0 Value checked for change.
13662 * @param i0 Static value used for concatenation only.
13663 * @param v1 Value checked for change.
13664 * @param i1 Static value used for concatenation only.
13665 * @param v2 Value checked for change.
13666 * @param i2 Static value used for concatenation only.
13667 * @param v3 Value checked for change.
13668 * @param i3 Static value used for concatenation only.
13669 * @param v4 Value checked for change.
13670 * @param i4 Static value used for concatenation only.
13671 * @param v5 Value checked for change.
13672 * @param i5 Static value used for concatenation only.
13673 * @param v6 Value checked for change.
13674 * @param i6 Static value used for concatenation only.
13675 * @param v7 Value checked for change.
13676 * @param suffix Static value used for concatenation only.
13677 * @param sanitizer An optional sanitizer function
13678 * @returns itself, so that it may be chained.
13679 * @codeGenApi
13680 */
13681export 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;
13682
13683/**
13684 * Update an interpolated property on an element with 9 or more bound values surrounded by text.
13685 *
13686 * Used when the number of interpolated values exceeds 8.
13687 *
13688 * ```html
13689 * <div
13690 * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
13691 * ```
13692 *
13693 * Its compiled representation is::
13694 *
13695 * ```ts
13696 * ɵɵpropertyInterpolateV(
13697 * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
13698 * 'suffix']);
13699 * ```
13700 *
13701 * If the property name also exists as an input property on one of the element's directives,
13702 * the component property will be set instead of the element property. This check must
13703 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13704 *
13705 * @param propName The name of the property to update.
13706 * @param values The collection of values and the strings inbetween those values, beginning with a
13707 * string prefix and ending with a string suffix.
13708 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
13709 * @param sanitizer An optional sanitizer function
13710 * @returns itself, so that it may be chained.
13711 * @codeGenApi
13712 */
13713export declare function ɵɵpropertyInterpolateV(propName: string, values: any[], sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolateV;
13714
13715/**
13716 * This feature resolves the providers of a directive (or component),
13717 * and publish them into the DI system, making it visible to others for injection.
13718 *
13719 * For example:
13720 * ```ts
13721 * class ComponentWithProviders {
13722 * constructor(private greeter: GreeterDE) {}
13723 *
13724 * static ɵcmp = defineComponent({
13725 * type: ComponentWithProviders,
13726 * selectors: [['component-with-providers']],
13727 * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),
13728 * decls: 1,
13729 * vars: 1,
13730 * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {
13731 * if (fs & RenderFlags.Create) {
13732 * ɵɵtext(0);
13733 * }
13734 * if (fs & RenderFlags.Update) {
13735 * ɵɵtextInterpolate(ctx.greeter.greet());
13736 * }
13737 * },
13738 * features: [ɵɵProvidersFeature([GreeterDE])]
13739 * });
13740 * }
13741 * ```
13742 *
13743 * @param definition
13744 *
13745 * @codeGenApi
13746 */
13747export declare function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders?: Provider[]): (definition: ɵDirectiveDef<T>) => void;
13748
13749/**
13750 * Bindings for pure functions are stored after regular bindings.
13751 *
13752 * |-------decls------|---------vars---------| |----- hostVars (dir1) ------|
13753 * ------------------------------------------------------------------------------------------
13754 * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |
13755 * ------------------------------------------------------------------------------------------
13756 * ^ ^
13757 * TView.bindingStartIndex TView.expandoStartIndex
13758 *
13759 * Pure function instructions are given an offset from the binding root. Adding the offset to the
13760 * binding root gives the first index where the bindings are stored. In component views, the binding
13761 * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +
13762 * any directive instances + any hostVars in directives evaluated before it.
13763 *
13764 * See VIEW_DATA.md for more information about host binding resolution.
13765 */
13766/**
13767 * If the value hasn't been saved, calls the pure function to store and return the
13768 * value. If it has been saved, returns the saved value.
13769 *
13770 * @param slotOffset the offset from binding root to the reserved slot
13771 * @param pureFn Function that returns a value
13772 * @param thisArg Optional calling context of pureFn
13773 * @returns value
13774 *
13775 * @codeGenApi
13776 */
13777export declare function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T;
13778
13779/**
13780 * If the value of the provided exp has changed, calls the pure function to return
13781 * an updated value. Or if the value has not changed, returns cached value.
13782 *
13783 * @param slotOffset the offset from binding root to the reserved slot
13784 * @param pureFn Function that returns an updated value
13785 * @param exp Updated expression value
13786 * @param thisArg Optional calling context of pureFn
13787 * @returns Updated or cached value
13788 *
13789 * @codeGenApi
13790 */
13791export declare function ɵɵpureFunction1(slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any;
13792
13793/**
13794 * If the value of any provided exp has changed, calls the pure function to return
13795 * an updated value. Or if no values have changed, returns cached value.
13796 *
13797 * @param slotOffset the offset from binding root to the reserved slot
13798 * @param pureFn
13799 * @param exp1
13800 * @param exp2
13801 * @param thisArg Optional calling context of pureFn
13802 * @returns Updated or cached value
13803 *
13804 * @codeGenApi
13805 */
13806export declare function ɵɵpureFunction2(slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any, thisArg?: any): any;
13807
13808/**
13809 * If the value of any provided exp has changed, calls the pure function to return
13810 * an updated value. Or if no values have changed, returns cached value.
13811 *
13812 * @param slotOffset the offset from binding root to the reserved slot
13813 * @param pureFn
13814 * @param exp1
13815 * @param exp2
13816 * @param exp3
13817 * @param thisArg Optional calling context of pureFn
13818 * @returns Updated or cached value
13819 *
13820 * @codeGenApi
13821 */
13822export declare function ɵɵpureFunction3(slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any, thisArg?: any): any;
13823
13824/**
13825 * If the value of any provided exp has changed, calls the pure function to return
13826 * an updated value. Or if no values have changed, returns cached value.
13827 *
13828 * @param slotOffset the offset from binding root to the reserved slot
13829 * @param pureFn
13830 * @param exp1
13831 * @param exp2
13832 * @param exp3
13833 * @param exp4
13834 * @param thisArg Optional calling context of pureFn
13835 * @returns Updated or cached value
13836 *
13837 * @codeGenApi
13838 */
13839export 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;
13840
13841/**
13842 * If the value of any provided exp has changed, calls the pure function to return
13843 * an updated value. Or if no values have changed, returns cached value.
13844 *
13845 * @param slotOffset the offset from binding root to the reserved slot
13846 * @param pureFn
13847 * @param exp1
13848 * @param exp2
13849 * @param exp3
13850 * @param exp4
13851 * @param exp5
13852 * @param thisArg Optional calling context of pureFn
13853 * @returns Updated or cached value
13854 *
13855 * @codeGenApi
13856 */
13857export 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;
13858
13859/**
13860 * If the value of any provided exp has changed, calls the pure function to return
13861 * an updated value. Or if no values have changed, returns cached value.
13862 *
13863 * @param slotOffset the offset from binding root to the reserved slot
13864 * @param pureFn
13865 * @param exp1
13866 * @param exp2
13867 * @param exp3
13868 * @param exp4
13869 * @param exp5
13870 * @param exp6
13871 * @param thisArg Optional calling context of pureFn
13872 * @returns Updated or cached value
13873 *
13874 * @codeGenApi
13875 */
13876export 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;
13877
13878/**
13879 * If the value of any provided exp has changed, calls the pure function to return
13880 * an updated value. Or if no values have changed, returns cached value.
13881 *
13882 * @param slotOffset the offset from binding root to the reserved slot
13883 * @param pureFn
13884 * @param exp1
13885 * @param exp2
13886 * @param exp3
13887 * @param exp4
13888 * @param exp5
13889 * @param exp6
13890 * @param exp7
13891 * @param thisArg Optional calling context of pureFn
13892 * @returns Updated or cached value
13893 *
13894 * @codeGenApi
13895 */
13896export 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;
13897
13898/**
13899 * If the value of any provided exp has changed, calls the pure function to return
13900 * an updated value. Or if no values have changed, returns cached value.
13901 *
13902 * @param slotOffset the offset from binding root to the reserved slot
13903 * @param pureFn
13904 * @param exp1
13905 * @param exp2
13906 * @param exp3
13907 * @param exp4
13908 * @param exp5
13909 * @param exp6
13910 * @param exp7
13911 * @param exp8
13912 * @param thisArg Optional calling context of pureFn
13913 * @returns Updated or cached value
13914 *
13915 * @codeGenApi
13916 */
13917export 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;
13918
13919/**
13920 * pureFunction instruction that can support any number of bindings.
13921 *
13922 * If the value of any provided exp has changed, calls the pure function to return
13923 * an updated value. Or if no values have changed, returns cached value.
13924 *
13925 * @param slotOffset the offset from binding root to the reserved slot
13926 * @param pureFn A pure function that takes binding values and builds an object or array
13927 * containing those values.
13928 * @param exps An array of binding values
13929 * @param thisArg Optional calling context of pureFn
13930 * @returns Updated or cached value
13931 *
13932 * @codeGenApi
13933 */
13934export declare function ɵɵpureFunctionV(slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any;
13935
13936/**
13937 * Refreshes a query by combining matches from all active views and removing matches from deleted
13938 * views.
13939 *
13940 * @returns `true` if a query got dirty during change detection or if this is a static query
13941 * resolving in creation mode, `false` otherwise.
13942 *
13943 * @codeGenApi
13944 */
13945export declare function ɵɵqueryRefresh(queryList: QueryList<any>): boolean;
13946
13947/**
13948 * Retrieves a local reference from the current contextViewData.
13949 *
13950 * If the reference to retrieve is in a parent view, this instruction is used in conjunction
13951 * with a nextContext() call, which walks up the tree and updates the contextViewData instance.
13952 *
13953 * @param index The index of the local ref in contextViewData.
13954 *
13955 * @codeGenApi
13956 */
13957export declare function ɵɵreference<T>(index: number): T;
13958
13959/**
13960 *
13961 * @codeGenApi
13962 */
13963export declare function ɵɵresolveBody(element: RElement & {
13964 ownerDocument: Document;
13965}): HTMLElement;
13966
13967/**
13968 *
13969 * @codeGenApi
13970 */
13971export declare function ɵɵresolveDocument(element: RElement & {
13972 ownerDocument: Document;
13973}): Document;
13974
13975/**
13976 *
13977 * @codeGenApi
13978 */
13979export declare function ɵɵresolveWindow(element: RElement & {
13980 ownerDocument: Document;
13981}): (Window & typeof globalThis) | null;
13982
13983/**
13984 * Restores `contextViewData` to the given OpaqueViewState instance.
13985 *
13986 * Used in conjunction with the getCurrentView() instruction to save a snapshot
13987 * of the current view and restore it when listeners are invoked. This allows
13988 * walking the declaration view tree in listeners to get vars from parent views.
13989 *
13990 * @param viewToRestore The OpaqueViewState instance to restore.
13991 * @returns Context of the restored OpaqueViewState instance.
13992 *
13993 * @codeGenApi
13994 */
13995export declare function ɵɵrestoreView<T = any>(viewToRestore: OpaqueViewState): T;
13996
13997/**
13998 * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing
13999 * dangerous content.
14000 *
14001 * This method parses the `html` and locates potentially dangerous content (such as urls and
14002 * javascript) and removes it.
14003 *
14004 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.
14005 *
14006 * @param unsafeHtml untrusted `html`, typically from the user.
14007 * @returns `html` string which is safe to display to user, because all of the dangerous javascript
14008 * and urls have been removed.
14009 *
14010 * @codeGenApi
14011 */
14012export declare function ɵɵsanitizeHtml(unsafeHtml: any): TrustedHTML | string;
14013
14014/**
14015 * A `url` sanitizer which only lets trusted `url`s through.
14016 *
14017 * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.
14018 *
14019 * @param unsafeResourceUrl untrusted `url`, typically from the user.
14020 * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
14021 * only trusted `url`s have been allowed to pass.
14022 *
14023 * @codeGenApi
14024 */
14025export declare function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): TrustedScriptURL | string;
14026
14027/**
14028 * A `script` sanitizer which only lets trusted javascript through.
14029 *
14030 * This passes only `script`s marked trusted by calling {@link
14031 * bypassSanitizationTrustScript}.
14032 *
14033 * @param unsafeScript untrusted `script`, typically from the user.
14034 * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,
14035 * because only trusted `scripts` have been allowed to pass.
14036 *
14037 * @codeGenApi
14038 */
14039export declare function ɵɵsanitizeScript(unsafeScript: any): TrustedScript | string;
14040
14041/**
14042 * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing
14043 * dangerous content.
14044 *
14045 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.
14046 *
14047 * @param unsafeStyle untrusted `style`, typically from the user.
14048 * @returns `style` string which is safe to bind to the `style` properties.
14049 *
14050 * @codeGenApi
14051 */
14052export declare function ɵɵsanitizeStyle(unsafeStyle: any): string;
14053
14054/**
14055 * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing
14056 * dangerous
14057 * content.
14058 *
14059 * This method parses the `url` and locates potentially dangerous content (such as javascript) and
14060 * removes it.
14061 *
14062 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.
14063 *
14064 * @param unsafeUrl untrusted `url`, typically from the user.
14065 * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
14066 * all of the dangerous javascript has been removed.
14067 *
14068 * @codeGenApi
14069 */
14070export declare function ɵɵsanitizeUrl(unsafeUrl: any): string;
14071
14072/**
14073 * Sanitizes URL, selecting sanitizer function based on tag and property names.
14074 *
14075 * This function is used in case we can't define security context at compile time, when only prop
14076 * name is available. This happens when we generate host bindings for Directives/Components. The
14077 * host element is unknown at compile time, so we defer calculation of specific sanitizer to
14078 * runtime.
14079 *
14080 * @param unsafeUrl untrusted `url`, typically from the user.
14081 * @param tag target element tag name.
14082 * @param prop name of the property that contains the value.
14083 * @returns `url` string which is safe to bind.
14084 *
14085 * @codeGenApi
14086 */
14087export declare function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any;
14088
14089/**
14090 * Generated next to NgModules to monkey-patch directive and pipe references onto a component's
14091 * definition, when generating a direct reference in the component file would otherwise create an
14092 * import cycle.
14093 *
14094 * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.
14095 *
14096 * @codeGenApi
14097 */
14098export declare function ɵɵsetComponentScope(type: ɵComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void;
14099
14100/**
14101 * Adds the module metadata that is necessary to compute the module's transitive scope to an
14102 * existing module definition.
14103 *
14104 * Scope metadata of modules is not used in production builds, so calls to this function can be
14105 * marked pure to tree-shake it from the bundle, allowing for all referenced declarations
14106 * to become eligible for tree-shaking as well.
14107 *
14108 * @codeGenApi
14109 */
14110export declare function ɵɵsetNgModuleScope(type: any, scope: {
14111 /** List of components, directives, and pipes declared by this module. */
14112 declarations?: Type<any>[] | (() => Type<any>[]);
14113 /** List of modules or `ModuleWithProviders` imported by this module. */
14114 imports?: Type<any>[] | (() => Type<any>[]);
14115 /**
14116 * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
14117 * module.
14118 */
14119 exports?: Type<any>[] | (() => Type<any>[]);
14120}): unknown;
14121
14122/**
14123 * Update style bindings using an object literal on an element.
14124 *
14125 * This instruction is meant to apply styling via the `[style]="exp"` template bindings.
14126 * When styles are applied to the element they will then be updated with respect to
14127 * any styles/classes set via `styleProp`. If any styles are set to falsy
14128 * then they will be removed from the element.
14129 *
14130 * Note that the styling instruction will not be applied until `stylingApply` is called.
14131 *
14132 * @param styles A key/value style map of the styles that will be applied to the given element.
14133 * Any missing styles (that have already been applied to the element beforehand) will be
14134 * removed (unset) from the element's styling.
14135 *
14136 * Note that this will apply the provided styleMap value to the host element if this function
14137 * is called within a host binding.
14138 *
14139 * @codeGenApi
14140 */
14141export declare function ɵɵstyleMap(styles: {
14142 [styleName: string]: any;
14143} | string | undefined | null): void;
14144
14145
14146/**
14147 *
14148 * Update an interpolated style on an element with single bound value surrounded by text.
14149 *
14150 * Used when the value passed to a property has 1 interpolated value in it:
14151 *
14152 * ```html
14153 * <div style="key: {{v0}}suffix"></div>
14154 * ```
14155 *
14156 * Its compiled representation is:
14157 *
14158 * ```ts
14159 * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');
14160 * ```
14161 *
14162 * @param prefix Static value used for concatenation only.
14163 * @param v0 Value checked for change.
14164 * @param suffix Static value used for concatenation only.
14165 * @codeGenApi
14166 */
14167export declare function ɵɵstyleMapInterpolate1(prefix: string, v0: any, suffix: string): void;
14168
14169/**
14170 *
14171 * Update an interpolated style on an element with 2 bound values surrounded by text.
14172 *
14173 * Used when the value passed to a property has 2 interpolated values in it:
14174 *
14175 * ```html
14176 * <div style="key: {{v0}}; key1: {{v1}}suffix"></div>
14177 * ```
14178 *
14179 * Its compiled representation is:
14180 *
14181 * ```ts
14182 * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');
14183 * ```
14184 *
14185 * @param prefix Static value used for concatenation only.
14186 * @param v0 Value checked for change.
14187 * @param i0 Static value used for concatenation only.
14188 * @param v1 Value checked for change.
14189 * @param suffix Static value used for concatenation only.
14190 * @codeGenApi
14191 */
14192export declare function ɵɵstyleMapInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): void;
14193
14194/**
14195 *
14196 * Update an interpolated style on an element with 3 bound values surrounded by text.
14197 *
14198 * Used when the value passed to a property has 3 interpolated values in it:
14199 *
14200 * ```html
14201 * <div style="key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix"></div>
14202 * ```
14203 *
14204 * Its compiled representation is:
14205 *
14206 * ```ts
14207 * ɵɵstyleMapInterpolate3(
14208 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');
14209 * ```
14210 *
14211 * @param prefix Static value used for concatenation only.
14212 * @param v0 Value checked for change.
14213 * @param i0 Static value used for concatenation only.
14214 * @param v1 Value checked for change.
14215 * @param i1 Static value used for concatenation only.
14216 * @param v2 Value checked for change.
14217 * @param suffix Static value used for concatenation only.
14218 * @codeGenApi
14219 */
14220export declare function ɵɵstyleMapInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void;
14221
14222/**
14223 *
14224 * Update an interpolated style on an element with 4 bound values surrounded by text.
14225 *
14226 * Used when the value passed to a property has 4 interpolated values in it:
14227 *
14228 * ```html
14229 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix"></div>
14230 * ```
14231 *
14232 * Its compiled representation is:
14233 *
14234 * ```ts
14235 * ɵɵstyleMapInterpolate4(
14236 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');
14237 * ```
14238 *
14239 * @param prefix Static value used for concatenation only.
14240 * @param v0 Value checked for change.
14241 * @param i0 Static value used for concatenation only.
14242 * @param v1 Value checked for change.
14243 * @param i1 Static value used for concatenation only.
14244 * @param v2 Value checked for change.
14245 * @param i2 Static value used for concatenation only.
14246 * @param v3 Value checked for change.
14247 * @param suffix Static value used for concatenation only.
14248 * @codeGenApi
14249 */
14250export declare function ɵɵstyleMapInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): void;
14251
14252/**
14253 *
14254 * Update an interpolated style on an element with 5 bound values surrounded by text.
14255 *
14256 * Used when the value passed to a property has 5 interpolated values in it:
14257 *
14258 * ```html
14259 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix"></div>
14260 * ```
14261 *
14262 * Its compiled representation is:
14263 *
14264 * ```ts
14265 * ɵɵstyleMapInterpolate5(
14266 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');
14267 * ```
14268 *
14269 * @param prefix Static value used for concatenation only.
14270 * @param v0 Value checked for change.
14271 * @param i0 Static value used for concatenation only.
14272 * @param v1 Value checked for change.
14273 * @param i1 Static value used for concatenation only.
14274 * @param v2 Value checked for change.
14275 * @param i2 Static value used for concatenation only.
14276 * @param v3 Value checked for change.
14277 * @param i3 Static value used for concatenation only.
14278 * @param v4 Value checked for change.
14279 * @param suffix Static value used for concatenation only.
14280 * @codeGenApi
14281 */
14282export 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;
14283
14284/**
14285 *
14286 * Update an interpolated style on an element with 6 bound values surrounded by text.
14287 *
14288 * Used when the value passed to a property has 6 interpolated values in it:
14289 *
14290 * ```html
14291 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};
14292 * key5: {{v5}}suffix"></div>
14293 * ```
14294 *
14295 * Its compiled representation is:
14296 *
14297 * ```ts
14298 * ɵɵstyleMapInterpolate6(
14299 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
14300 * 'suffix');
14301 * ```
14302 *
14303 * @param prefix Static value used for concatenation only.
14304 * @param v0 Value checked for change.
14305 * @param i0 Static value used for concatenation only.
14306 * @param v1 Value checked for change.
14307 * @param i1 Static value used for concatenation only.
14308 * @param v2 Value checked for change.
14309 * @param i2 Static value used for concatenation only.
14310 * @param v3 Value checked for change.
14311 * @param i3 Static value used for concatenation only.
14312 * @param v4 Value checked for change.
14313 * @param i4 Static value used for concatenation only.
14314 * @param v5 Value checked for change.
14315 * @param suffix Static value used for concatenation only.
14316 * @codeGenApi
14317 */
14318export 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;
14319
14320/**
14321 *
14322 * Update an interpolated style on an element with 7 bound values surrounded by text.
14323 *
14324 * Used when the value passed to a property has 7 interpolated values in it:
14325 *
14326 * ```html
14327 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
14328 * key6: {{v6}}suffix"></div>
14329 * ```
14330 *
14331 * Its compiled representation is:
14332 *
14333 * ```ts
14334 * ɵɵstyleMapInterpolate7(
14335 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
14336 * '; key6: ', v6, 'suffix');
14337 * ```
14338 *
14339 * @param prefix Static value used for concatenation only.
14340 * @param v0 Value checked for change.
14341 * @param i0 Static value used for concatenation only.
14342 * @param v1 Value checked for change.
14343 * @param i1 Static value used for concatenation only.
14344 * @param v2 Value checked for change.
14345 * @param i2 Static value used for concatenation only.
14346 * @param v3 Value checked for change.
14347 * @param i3 Static value used for concatenation only.
14348 * @param v4 Value checked for change.
14349 * @param i4 Static value used for concatenation only.
14350 * @param v5 Value checked for change.
14351 * @param i5 Static value used for concatenation only.
14352 * @param v6 Value checked for change.
14353 * @param suffix Static value used for concatenation only.
14354 * @codeGenApi
14355 */
14356export 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;
14357
14358/**
14359 *
14360 * Update an interpolated style on an element with 8 bound values surrounded by text.
14361 *
14362 * Used when the value passed to a property has 8 interpolated values in it:
14363 *
14364 * ```html
14365 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
14366 * key6: {{v6}}; key7: {{v7}}suffix"></div>
14367 * ```
14368 *
14369 * Its compiled representation is:
14370 *
14371 * ```ts
14372 * ɵɵstyleMapInterpolate8(
14373 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
14374 * '; key6: ', v6, '; key7: ', v7, 'suffix');
14375 * ```
14376 *
14377 * @param prefix Static value used for concatenation only.
14378 * @param v0 Value checked for change.
14379 * @param i0 Static value used for concatenation only.
14380 * @param v1 Value checked for change.
14381 * @param i1 Static value used for concatenation only.
14382 * @param v2 Value checked for change.
14383 * @param i2 Static value used for concatenation only.
14384 * @param v3 Value checked for change.
14385 * @param i3 Static value used for concatenation only.
14386 * @param v4 Value checked for change.
14387 * @param i4 Static value used for concatenation only.
14388 * @param v5 Value checked for change.
14389 * @param i5 Static value used for concatenation only.
14390 * @param v6 Value checked for change.
14391 * @param i6 Static value used for concatenation only.
14392 * @param v7 Value checked for change.
14393 * @param suffix Static value used for concatenation only.
14394 * @codeGenApi
14395 */
14396export 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;
14397
14398/**
14399 * Update an interpolated style on an element with 9 or more bound values surrounded by text.
14400 *
14401 * Used when the number of interpolated values exceeds 8.
14402 *
14403 * ```html
14404 * <div
14405 * class="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
14406 * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix"></div>
14407 * ```
14408 *
14409 * Its compiled representation is:
14410 *
14411 * ```ts
14412 * ɵɵstyleMapInterpolateV(
14413 * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
14414 * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);
14415 * ```
14416 *.
14417 * @param values The collection of values and the strings in-between those values, beginning with
14418 * a string prefix and ending with a string suffix.
14419 * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)
14420 * @codeGenApi
14421 */
14422export declare function ɵɵstyleMapInterpolateV(values: any[]): void;
14423
14424/**
14425 * Update a style binding on an element with the provided value.
14426 *
14427 * If the style value is falsy then it will be removed from the element
14428 * (or assigned a different value depending if there are any styles placed
14429 * on the element with `styleMap` or any static styles that are
14430 * present from when the element was created with `styling`).
14431 *
14432 * Note that the styling element is updated as part of `stylingApply`.
14433 *
14434 * @param prop A valid CSS property.
14435 * @param value New value to write (`null` or an empty string to remove).
14436 * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.
14437 *
14438 * Note that this will apply the provided style value to the host element if this function is called
14439 * within a host binding function.
14440 *
14441 * @codeGenApi
14442 */
14443export declare function ɵɵstyleProp(prop: string, value: string | number | ɵSafeValue | undefined | null, suffix?: string | null): typeof ɵɵstyleProp;
14444
14445
14446/**
14447 *
14448 * Update an interpolated style property on an element with single bound value surrounded by text.
14449 *
14450 * Used when the value passed to a property has 1 interpolated value in it:
14451 *
14452 * ```html
14453 * <div style.color="prefix{{v0}}suffix"></div>
14454 * ```
14455 *
14456 * Its compiled representation is:
14457 *
14458 * ```ts
14459 * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');
14460 * ```
14461 *
14462 * @param styleIndex Index of style to update. This index value refers to the
14463 * index of the style in the style bindings array that was passed into
14464 * `styling`.
14465 * @param prefix Static value used for concatenation only.
14466 * @param v0 Value checked for change.
14467 * @param suffix Static value used for concatenation only.
14468 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14469 * @returns itself, so that it may be chained.
14470 * @codeGenApi
14471 */
14472export declare function ɵɵstylePropInterpolate1(prop: string, prefix: string, v0: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate1;
14473
14474/**
14475 *
14476 * Update an interpolated style property on an element with 2 bound values surrounded by text.
14477 *
14478 * Used when the value passed to a property has 2 interpolated values in it:
14479 *
14480 * ```html
14481 * <div style.color="prefix{{v0}}-{{v1}}suffix"></div>
14482 * ```
14483 *
14484 * Its compiled representation is:
14485 *
14486 * ```ts
14487 * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');
14488 * ```
14489 *
14490 * @param styleIndex Index of style to update. This index value refers to the
14491 * index of the style in the style bindings array that was passed into
14492 * `styling`.
14493 * @param prefix Static value used for concatenation only.
14494 * @param v0 Value checked for change.
14495 * @param i0 Static value used for concatenation only.
14496 * @param v1 Value checked for change.
14497 * @param suffix Static value used for concatenation only.
14498 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14499 * @returns itself, so that it may be chained.
14500 * @codeGenApi
14501 */
14502export declare function ɵɵstylePropInterpolate2(prop: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate2;
14503
14504/**
14505 *
14506 * Update an interpolated style property on an element with 3 bound values surrounded by text.
14507 *
14508 * Used when the value passed to a property has 3 interpolated values in it:
14509 *
14510 * ```html
14511 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
14512 * ```
14513 *
14514 * Its compiled representation is:
14515 *
14516 * ```ts
14517 * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');
14518 * ```
14519 *
14520 * @param styleIndex Index of style to update. This index value refers to the
14521 * index of the style in the style bindings array that was passed into
14522 * `styling`.
14523 * @param prefix Static value used for concatenation only.
14524 * @param v0 Value checked for change.
14525 * @param i0 Static value used for concatenation only.
14526 * @param v1 Value checked for change.
14527 * @param i1 Static value used for concatenation only.
14528 * @param v2 Value checked for change.
14529 * @param suffix Static value used for concatenation only.
14530 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14531 * @returns itself, so that it may be chained.
14532 * @codeGenApi
14533 */
14534export declare function ɵɵstylePropInterpolate3(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate3;
14535
14536/**
14537 *
14538 * Update an interpolated style property on an element with 4 bound values surrounded by text.
14539 *
14540 * Used when the value passed to a property has 4 interpolated values in it:
14541 *
14542 * ```html
14543 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
14544 * ```
14545 *
14546 * Its compiled representation is:
14547 *
14548 * ```ts
14549 * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
14550 * ```
14551 *
14552 * @param styleIndex Index of style to update. This index value refers to the
14553 * index of the style in the style bindings array that was passed into
14554 * `styling`.
14555 * @param prefix Static value used for concatenation only.
14556 * @param v0 Value checked for change.
14557 * @param i0 Static value used for concatenation only.
14558 * @param v1 Value checked for change.
14559 * @param i1 Static value used for concatenation only.
14560 * @param v2 Value checked for change.
14561 * @param i2 Static value used for concatenation only.
14562 * @param v3 Value checked for change.
14563 * @param suffix Static value used for concatenation only.
14564 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14565 * @returns itself, so that it may be chained.
14566 * @codeGenApi
14567 */
14568export 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;
14569
14570/**
14571 *
14572 * Update an interpolated style property on an element with 5 bound values surrounded by text.
14573 *
14574 * Used when the value passed to a property has 5 interpolated values in it:
14575 *
14576 * ```html
14577 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
14578 * ```
14579 *
14580 * Its compiled representation is:
14581 *
14582 * ```ts
14583 * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
14584 * ```
14585 *
14586 * @param styleIndex Index of style to update. This index value refers to the
14587 * index of the style in the style bindings array that was passed into
14588 * `styling`.
14589 * @param prefix Static value used for concatenation only.
14590 * @param v0 Value checked for change.
14591 * @param i0 Static value used for concatenation only.
14592 * @param v1 Value checked for change.
14593 * @param i1 Static value used for concatenation only.
14594 * @param v2 Value checked for change.
14595 * @param i2 Static value used for concatenation only.
14596 * @param v3 Value checked for change.
14597 * @param i3 Static value used for concatenation only.
14598 * @param v4 Value checked for change.
14599 * @param suffix Static value used for concatenation only.
14600 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14601 * @returns itself, so that it may be chained.
14602 * @codeGenApi
14603 */
14604export 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;
14605
14606/**
14607 *
14608 * Update an interpolated style property on an element with 6 bound values surrounded by text.
14609 *
14610 * Used when the value passed to a property has 6 interpolated values in it:
14611 *
14612 * ```html
14613 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
14614 * ```
14615 *
14616 * Its compiled representation is:
14617 *
14618 * ```ts
14619 * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
14620 * ```
14621 *
14622 * @param styleIndex Index of style to update. This index value refers to the
14623 * index of the style in the style bindings array that was passed into
14624 * `styling`.
14625 * @param prefix Static value used for concatenation only.
14626 * @param v0 Value checked for change.
14627 * @param i0 Static value used for concatenation only.
14628 * @param v1 Value checked for change.
14629 * @param i1 Static value used for concatenation only.
14630 * @param v2 Value checked for change.
14631 * @param i2 Static value used for concatenation only.
14632 * @param v3 Value checked for change.
14633 * @param i3 Static value used for concatenation only.
14634 * @param v4 Value checked for change.
14635 * @param i4 Static value used for concatenation only.
14636 * @param v5 Value checked for change.
14637 * @param suffix Static value used for concatenation only.
14638 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14639 * @returns itself, so that it may be chained.
14640 * @codeGenApi
14641 */
14642export 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;
14643
14644/**
14645 *
14646 * Update an interpolated style property on an element with 7 bound values surrounded by text.
14647 *
14648 * Used when the value passed to a property has 7 interpolated values in it:
14649 *
14650 * ```html
14651 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
14652 * ```
14653 *
14654 * Its compiled representation is:
14655 *
14656 * ```ts
14657 * ɵɵstylePropInterpolate7(
14658 * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
14659 * ```
14660 *
14661 * @param styleIndex Index of style to update. This index value refers to the
14662 * index of the style in the style bindings array that was passed into
14663 * `styling`.
14664 * @param prefix Static value used for concatenation only.
14665 * @param v0 Value checked for change.
14666 * @param i0 Static value used for concatenation only.
14667 * @param v1 Value checked for change.
14668 * @param i1 Static value used for concatenation only.
14669 * @param v2 Value checked for change.
14670 * @param i2 Static value used for concatenation only.
14671 * @param v3 Value checked for change.
14672 * @param i3 Static value used for concatenation only.
14673 * @param v4 Value checked for change.
14674 * @param i4 Static value used for concatenation only.
14675 * @param v5 Value checked for change.
14676 * @param i5 Static value used for concatenation only.
14677 * @param v6 Value checked for change.
14678 * @param suffix Static value used for concatenation only.
14679 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14680 * @returns itself, so that it may be chained.
14681 * @codeGenApi
14682 */
14683export 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;
14684
14685/**
14686 *
14687 * Update an interpolated style property on an element with 8 bound values surrounded by text.
14688 *
14689 * Used when the value passed to a property has 8 interpolated values in it:
14690 *
14691 * ```html
14692 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
14693 * ```
14694 *
14695 * Its compiled representation is:
14696 *
14697 * ```ts
14698 * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,
14699 * '-', v7, 'suffix');
14700 * ```
14701 *
14702 * @param styleIndex Index of style to update. This index value refers to the
14703 * index of the style in the style bindings array that was passed into
14704 * `styling`.
14705 * @param prefix Static value used for concatenation only.
14706 * @param v0 Value checked for change.
14707 * @param i0 Static value used for concatenation only.
14708 * @param v1 Value checked for change.
14709 * @param i1 Static value used for concatenation only.
14710 * @param v2 Value checked for change.
14711 * @param i2 Static value used for concatenation only.
14712 * @param v3 Value checked for change.
14713 * @param i3 Static value used for concatenation only.
14714 * @param v4 Value checked for change.
14715 * @param i4 Static value used for concatenation only.
14716 * @param v5 Value checked for change.
14717 * @param i5 Static value used for concatenation only.
14718 * @param v6 Value checked for change.
14719 * @param i6 Static value used for concatenation only.
14720 * @param v7 Value checked for change.
14721 * @param suffix Static value used for concatenation only.
14722 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14723 * @returns itself, so that it may be chained.
14724 * @codeGenApi
14725 */
14726export 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;
14727
14728/**
14729 * Update an interpolated style property on an element with 9 or more bound values surrounded by
14730 * text.
14731 *
14732 * Used when the number of interpolated values exceeds 8.
14733 *
14734 * ```html
14735 * <div
14736 * style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix">
14737 * </div>
14738 * ```
14739 *
14740 * Its compiled representation is:
14741 *
14742 * ```ts
14743 * ɵɵstylePropInterpolateV(
14744 * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
14745 * 'suffix']);
14746 * ```
14747 *
14748 * @param styleIndex Index of style to update. This index value refers to the
14749 * index of the style in the style bindings array that was passed into
14750 * `styling`..
14751 * @param values The collection of values and the strings in-between those values, beginning with
14752 * a string prefix and ending with a string suffix.
14753 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
14754 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14755 * @returns itself, so that it may be chained.
14756 * @codeGenApi
14757 */
14758export declare function ɵɵstylePropInterpolateV(prop: string, values: any[], valueSuffix?: string | null): typeof ɵɵstylePropInterpolateV;
14759
14760/**
14761 * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.
14762 *
14763 * This instruction is for compatibility purposes and is designed to ensure that a
14764 * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered
14765 * in the component's renderer. Normally all host listeners are evaluated with the
14766 * parent component's renderer, but, in the case of animation @triggers, they need
14767 * to be evaluated with the sub component's renderer (because that's where the
14768 * animation triggers are defined).
14769 *
14770 * Do not use this instruction as a replacement for `listener`. This instruction
14771 * only exists to ensure compatibility with the ViewEngine's host binding behavior.
14772 *
14773 * @param eventName Name of the event
14774 * @param listenerFn The function to be called when event emits
14775 * @param useCapture Whether or not to use capture in event listener
14776 * @param eventTargetResolver Function that returns global target information in case this listener
14777 * should be attached to a global object like window, document or body
14778 *
14779 * @codeGenApi
14780 */
14781export declare function ɵɵsyntheticHostListener(eventName: string, listenerFn: (e?: any) => any): typeof ɵɵsyntheticHostListener;
14782
14783/**
14784 * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.
14785 *
14786 * This instruction is for compatibility purposes and is designed to ensure that a
14787 * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in
14788 * the component's renderer. Normally all host bindings are evaluated with the parent
14789 * component's renderer, but, in the case of animation @triggers, they need to be
14790 * evaluated with the sub component's renderer (because that's where the animation
14791 * triggers are defined).
14792 *
14793 * Do not use this instruction as a replacement for `elementProperty`. This instruction
14794 * only exists to ensure compatibility with the ViewEngine's host binding behavior.
14795 *
14796 * @param index The index of the element to update in the data array
14797 * @param propName Name of property. Because it is going to DOM, this is not subject to
14798 * renaming as part of minification.
14799 * @param value New value to write.
14800 * @param sanitizer An optional function used to sanitize the value.
14801 *
14802 * @codeGenApi
14803 */
14804export declare function ɵɵsyntheticHostProperty<T>(propName: string, value: T | ɵNO_CHANGE, sanitizer?: SanitizerFn | null): typeof ɵɵsyntheticHostProperty;
14805
14806/**
14807 * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
14808 *
14809 * <ng-template #foo>
14810 * <div></div>
14811 * </ng-template>
14812 *
14813 * @param index The index of the container in the data array
14814 * @param templateFn Inline template
14815 * @param decls The number of nodes, local refs, and pipes for this template
14816 * @param vars The number of bindings for this template
14817 * @param tagName The name of the container element, if applicable
14818 * @param attrsIndex Index of template attributes in the `consts` array.
14819 * @param localRefs Index of the local references in the `consts` array.
14820 * @param localRefExtractor A function which extracts local-refs values from the template.
14821 * Defaults to the current element associated with the local-ref.
14822 *
14823 * @codeGenApi
14824 */
14825export 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;
14826
14827/**
14828 * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the
14829 * `<ng-template>` element.
14830 *
14831 * @codeGenApi
14832 */
14833export declare function ɵɵtemplateRefExtractor(tNode: TNode, lView: LView): TemplateRef<any> | null;
14834
14835/**
14836 * Create static text node
14837 *
14838 * @param index Index of the node in the data array
14839 * @param value Static string value to write.
14840 *
14841 * @codeGenApi
14842 */
14843export declare function ɵɵtext(index: number, value?: string): void;
14844
14845/**
14846 *
14847 * Update text content with a lone bound value
14848 *
14849 * Used when a text node has 1 interpolated value in it, an no additional text
14850 * surrounds that interpolated value:
14851 *
14852 * ```html
14853 * <div>{{v0}}</div>
14854 * ```
14855 *
14856 * Its compiled representation is:
14857 *
14858 * ```ts
14859 * ɵɵtextInterpolate(v0);
14860 * ```
14861 * @returns itself, so that it may be chained.
14862 * @see textInterpolateV
14863 * @codeGenApi
14864 */
14865export declare function ɵɵtextInterpolate(v0: any): typeof ɵɵtextInterpolate;
14866
14867/**
14868 *
14869 * Update text content with single bound value surrounded by other text.
14870 *
14871 * Used when a text node has 1 interpolated value in it:
14872 *
14873 * ```html
14874 * <div>prefix{{v0}}suffix</div>
14875 * ```
14876 *
14877 * Its compiled representation is:
14878 *
14879 * ```ts
14880 * ɵɵtextInterpolate1('prefix', v0, 'suffix');
14881 * ```
14882 * @returns itself, so that it may be chained.
14883 * @see textInterpolateV
14884 * @codeGenApi
14885 */
14886export declare function ɵɵtextInterpolate1(prefix: string, v0: any, suffix: string): typeof ɵɵtextInterpolate1;
14887
14888/**
14889 *
14890 * Update text content with 2 bound values surrounded by other text.
14891 *
14892 * Used when a text node has 2 interpolated values in it:
14893 *
14894 * ```html
14895 * <div>prefix{{v0}}-{{v1}}suffix</div>
14896 * ```
14897 *
14898 * Its compiled representation is:
14899 *
14900 * ```ts
14901 * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');
14902 * ```
14903 * @returns itself, so that it may be chained.
14904 * @see textInterpolateV
14905 * @codeGenApi
14906 */
14907export declare function ɵɵtextInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): typeof ɵɵtextInterpolate2;
14908
14909/**
14910 *
14911 * Update text content with 3 bound values surrounded by other text.
14912 *
14913 * Used when a text node has 3 interpolated values in it:
14914 *
14915 * ```html
14916 * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>
14917 * ```
14918 *
14919 * Its compiled representation is:
14920 *
14921 * ```ts
14922 * ɵɵtextInterpolate3(
14923 * 'prefix', v0, '-', v1, '-', v2, 'suffix');
14924 * ```
14925 * @returns itself, so that it may be chained.
14926 * @see textInterpolateV
14927 * @codeGenApi
14928 */
14929export declare function ɵɵtextInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): typeof ɵɵtextInterpolate3;
14930
14931/**
14932 *
14933 * Update text content with 4 bound values surrounded by other text.
14934 *
14935 * Used when a text node has 4 interpolated values in it:
14936 *
14937 * ```html
14938 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>
14939 * ```
14940 *
14941 * Its compiled representation is:
14942 *
14943 * ```ts
14944 * ɵɵtextInterpolate4(
14945 * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
14946 * ```
14947 * @returns itself, so that it may be chained.
14948 * @see ɵɵtextInterpolateV
14949 * @codeGenApi
14950 */
14951export declare function ɵɵtextInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): typeof ɵɵtextInterpolate4;
14952
14953/**
14954 *
14955 * Update text content with 5 bound values surrounded by other text.
14956 *
14957 * Used when a text node has 5 interpolated values in it:
14958 *
14959 * ```html
14960 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>
14961 * ```
14962 *
14963 * Its compiled representation is:
14964 *
14965 * ```ts
14966 * ɵɵtextInterpolate5(
14967 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
14968 * ```
14969 * @returns itself, so that it may be chained.
14970 * @see textInterpolateV
14971 * @codeGenApi
14972 */
14973export 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;
14974
14975/**
14976 *
14977 * Update text content with 6 bound values surrounded by other text.
14978 *
14979 * Used when a text node has 6 interpolated values in it:
14980 *
14981 * ```html
14982 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>
14983 * ```
14984 *
14985 * Its compiled representation is:
14986 *
14987 * ```ts
14988 * ɵɵtextInterpolate6(
14989 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
14990 * ```
14991 *
14992 * @param i4 Static value used for concatenation only.
14993 * @param v5 Value checked for change. @returns itself, so that it may be chained.
14994 * @see textInterpolateV
14995 * @codeGenApi
14996 */
14997export 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;
14998
14999/**
15000 *
15001 * Update text content with 7 bound values surrounded by other text.
15002 *
15003 * Used when a text node has 7 interpolated values in it:
15004 *
15005 * ```html
15006 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>
15007 * ```
15008 *
15009 * Its compiled representation is:
15010 *
15011 * ```ts
15012 * ɵɵtextInterpolate7(
15013 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
15014 * ```
15015 * @returns itself, so that it may be chained.
15016 * @see textInterpolateV
15017 * @codeGenApi
15018 */
15019export 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;
15020
15021/**
15022 *
15023 * Update text content with 8 bound values surrounded by other text.
15024 *
15025 * Used when a text node has 8 interpolated values in it:
15026 *
15027 * ```html
15028 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>
15029 * ```
15030 *
15031 * Its compiled representation is:
15032 *
15033 * ```ts
15034 * ɵɵtextInterpolate8(
15035 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
15036 * ```
15037 * @returns itself, so that it may be chained.
15038 * @see textInterpolateV
15039 * @codeGenApi
15040 */
15041export 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;
15042
15043/**
15044 * Update text content with 9 or more bound values other surrounded by text.
15045 *
15046 * Used when the number of interpolated values exceeds 8.
15047 *
15048 * ```html
15049 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>
15050 * ```
15051 *
15052 * Its compiled representation is:
15053 *
15054 * ```ts
15055 * ɵɵtextInterpolateV(
15056 * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
15057 * 'suffix']);
15058 * ```
15059 *.
15060 * @param values The collection of values and the strings in between those values, beginning with
15061 * a string prefix and ending with a string suffix.
15062 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
15063 *
15064 * @returns itself, so that it may be chained.
15065 * @codeGenApi
15066 */
15067export declare function ɵɵtextInterpolateV(values: any[]): typeof ɵɵtextInterpolateV;
15068
15069/**
15070 * A template tag function for promoting the associated constant literal to a
15071 * TrustedHTML. Interpolation is explicitly not allowed.
15072 *
15073 * @param html constant template literal containing trusted HTML.
15074 * @returns TrustedHTML wrapping `html`.
15075 *
15076 * @security This is a security-sensitive function and should only be used to
15077 * convert constant values of attributes and properties found in
15078 * application-provided Angular templates to TrustedHTML.
15079 *
15080 * @codeGenApi
15081 */
15082export declare function ɵɵtrustConstantHtml(html: TemplateStringsArray): TrustedHTML | string;
15083
15084/**
15085 * A template tag function for promoting the associated constant literal to a
15086 * TrustedScriptURL. Interpolation is explicitly not allowed.
15087 *
15088 * @param url constant template literal containing a trusted script URL.
15089 * @returns TrustedScriptURL wrapping `url`.
15090 *
15091 * @security This is a security-sensitive function and should only be used to
15092 * convert constant values of attributes and properties found in
15093 * application-provided Angular templates to TrustedScriptURL.
15094 *
15095 * @codeGenApi
15096 */
15097export declare function ɵɵtrustConstantResourceUrl(url: TemplateStringsArray): TrustedScriptURL | string;
15098
15099/**
15100 * Creates new QueryList, stores the reference in LView and returns QueryList.
15101 *
15102 * @param predicate The type for which the query will search
15103 * @param flags Flags associated with the query
15104 * @param read What to save in the query
15105 *
15106 * @codeGenApi
15107 */
15108export declare function ɵɵviewQuery<T>(predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): void;
15109
15110export { }
15111
\No newline at end of file