UNPKG

546 kBTypeScriptView Raw
1/**
2 * @license Angular v13.0.2
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 * Note: since v13, dynamic component creation via
1239 * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)
1240 * does **not** require resolving component factory: component class can be used directly.
1241 *
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 component factories in a context of this module.
5178 *
5179 * Note: since v13, dynamic component creation via
5180 * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)
5181 * does **not** require resolving component factory: component class can be used directly.
5182 */
5183 abstract get componentFactoryResolver(): ComponentFactoryResolver;
5184 /**
5185 * The `NgModule` instance.
5186 */
5187 abstract get instance(): T;
5188 /**
5189 * Destroys the module instance and all of the data structures associated with it.
5190 */
5191 abstract destroy(): void;
5192 /**
5193 * Registers a callback to be executed when the module is destroyed.
5194 */
5195 abstract onDestroy(callback: () => void): void;
5196}
5197
5198/**
5199 * A token for third-party components that can register themselves with NgProbe.
5200 *
5201 * @publicApi
5202 */
5203export declare class NgProbeToken {
5204 name: string;
5205 token: any;
5206 constructor(name: string, token: any);
5207}
5208
5209/**
5210 * An injectable service for executing work inside or outside of the Angular zone.
5211 *
5212 * The most common use of this service is to optimize performance when starting a work consisting of
5213 * one or more asynchronous tasks that don't require UI updates or error handling to be handled by
5214 * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks
5215 * can reenter the Angular zone via {@link #run}.
5216 *
5217 * <!-- TODO: add/fix links to:
5218 * - docs explaining zones and the use of zones in Angular and change-detection
5219 * - link to runOutsideAngular/run (throughout this file!)
5220 * -->
5221 *
5222 * @usageNotes
5223 * ### Example
5224 *
5225 * ```
5226 * import {Component, NgZone} from '@angular/core';
5227 * import {NgIf} from '@angular/common';
5228 *
5229 * @Component({
5230 * selector: 'ng-zone-demo',
5231 * template: `
5232 * <h2>Demo: NgZone</h2>
5233 *
5234 * <p>Progress: {{progress}}%</p>
5235 * <p *ngIf="progress >= 100">Done processing {{label}} of Angular zone!</p>
5236 *
5237 * <button (click)="processWithinAngularZone()">Process within Angular zone</button>
5238 * <button (click)="processOutsideOfAngularZone()">Process outside of Angular zone</button>
5239 * `,
5240 * })
5241 * export class NgZoneDemo {
5242 * progress: number = 0;
5243 * label: string;
5244 *
5245 * constructor(private _ngZone: NgZone) {}
5246 *
5247 * // Loop inside the Angular zone
5248 * // so the UI DOES refresh after each setTimeout cycle
5249 * processWithinAngularZone() {
5250 * this.label = 'inside';
5251 * this.progress = 0;
5252 * this._increaseProgress(() => console.log('Inside Done!'));
5253 * }
5254 *
5255 * // Loop outside of the Angular zone
5256 * // so the UI DOES NOT refresh after each setTimeout cycle
5257 * processOutsideOfAngularZone() {
5258 * this.label = 'outside';
5259 * this.progress = 0;
5260 * this._ngZone.runOutsideAngular(() => {
5261 * this._increaseProgress(() => {
5262 * // reenter the Angular zone and display done
5263 * this._ngZone.run(() => { console.log('Outside Done!'); });
5264 * });
5265 * });
5266 * }
5267 *
5268 * _increaseProgress(doneCallback: () => void) {
5269 * this.progress += 1;
5270 * console.log(`Current progress: ${this.progress}%`);
5271 *
5272 * if (this.progress < 100) {
5273 * window.setTimeout(() => this._increaseProgress(doneCallback), 10);
5274 * } else {
5275 * doneCallback();
5276 * }
5277 * }
5278 * }
5279 * ```
5280 *
5281 * @publicApi
5282 */
5283export declare class NgZone {
5284 readonly hasPendingMacrotasks: boolean;
5285 readonly hasPendingMicrotasks: boolean;
5286 /**
5287 * Whether there are no outstanding microtasks or macrotasks.
5288 */
5289 readonly isStable: boolean;
5290 /**
5291 * Notifies when code enters Angular Zone. This gets fired first on VM Turn.
5292 */
5293 readonly onUnstable: EventEmitter<any>;
5294 /**
5295 * Notifies when there is no more microtasks enqueued in the current VM Turn.
5296 * This is a hint for Angular to do change detection, which may enqueue more microtasks.
5297 * For this reason this event can fire multiple times per VM Turn.
5298 */
5299 readonly onMicrotaskEmpty: EventEmitter<any>;
5300 /**
5301 * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
5302 * implies we are about to relinquish VM turn.
5303 * This event gets called just once.
5304 */
5305 readonly onStable: EventEmitter<any>;
5306 /**
5307 * Notifies that an error has been delivered.
5308 */
5309 readonly onError: EventEmitter<any>;
5310 constructor({ enableLongStackTrace, shouldCoalesceEventChangeDetection, shouldCoalesceRunChangeDetection }: {
5311 enableLongStackTrace?: boolean | undefined;
5312 shouldCoalesceEventChangeDetection?: boolean | undefined;
5313 shouldCoalesceRunChangeDetection?: boolean | undefined;
5314 });
5315 static isInAngularZone(): boolean;
5316 static assertInAngularZone(): void;
5317 static assertNotInAngularZone(): void;
5318 /**
5319 * Executes the `fn` function synchronously within the Angular zone and returns value returned by
5320 * the function.
5321 *
5322 * Running functions via `run` allows you to reenter Angular zone from a task that was executed
5323 * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
5324 *
5325 * Any future tasks or microtasks scheduled from within this function will continue executing from
5326 * within the Angular zone.
5327 *
5328 * If a synchronous error happens it will be rethrown and not reported via `onError`.
5329 */
5330 run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
5331 /**
5332 * Executes the `fn` function synchronously within the Angular zone as a task and returns value
5333 * returned by the function.
5334 *
5335 * Running functions via `run` allows you to reenter Angular zone from a task that was executed
5336 * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
5337 *
5338 * Any future tasks or microtasks scheduled from within this function will continue executing from
5339 * within the Angular zone.
5340 *
5341 * If a synchronous error happens it will be rethrown and not reported via `onError`.
5342 */
5343 runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T;
5344 /**
5345 * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
5346 * rethrown.
5347 */
5348 runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
5349 /**
5350 * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
5351 * the function.
5352 *
5353 * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
5354 * work that
5355 * doesn't trigger Angular change-detection or is subject to Angular's error handling.
5356 *
5357 * Any future tasks or microtasks scheduled from within this function will continue executing from
5358 * outside of the Angular zone.
5359 *
5360 * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
5361 */
5362 runOutsideAngular<T>(fn: (...args: any[]) => T): T;
5363}
5364
5365/**
5366 * Defines a schema that allows any property on any element.
5367 *
5368 * This schema allows you to ignore the errors related to any unknown elements or properties in a
5369 * template. The usage of this schema is generally discouraged because it prevents useful validation
5370 * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.
5371 *
5372 * @publicApi
5373 */
5374export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
5375
5376declare interface NodeCheckFn {
5377 (view: ViewData, nodeIndex: number, argStyle: ɵArgumentType.Dynamic, values: any[]): any;
5378 (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;
5379}
5380
5381/**
5382 * Node instance data.
5383 *
5384 * We have a separate type per NodeType to save memory
5385 * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>)
5386 *
5387 * To keep our code monomorphic,
5388 * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...).
5389 * This way, no usage site can get a `NodeData` from view.nodes and then use it for different
5390 * purposes.
5391 */
5392declare class NodeData {
5393 private __brand;
5394}
5395
5396/**
5397 * A node definition in the view.
5398 *
5399 * Note: We use one type for all nodes so that loops that loop over all nodes
5400 * of a ViewDefinition stay monomorphic!
5401 */
5402declare interface NodeDef {
5403 flags: ɵNodeFlags;
5404 nodeIndex: number;
5405 checkIndex: number;
5406 parent: NodeDef | null;
5407 renderParent: NodeDef | null;
5408 /** this is checked against NgContentDef.index to find matched nodes */
5409 ngContentIndex: number | null;
5410 /** number of transitive children */
5411 childCount: number;
5412 /** aggregated NodeFlags for all transitive children (does not include self) **/
5413 childFlags: ɵNodeFlags;
5414 /** aggregated NodeFlags for all direct children (does not include self) **/
5415 directChildFlags: ɵNodeFlags;
5416 bindingIndex: number;
5417 bindings: BindingDef[];
5418 bindingFlags: ɵBindingFlags;
5419 outputIndex: number;
5420 outputs: OutputDef[];
5421 /**
5422 * references that the user placed on the element
5423 */
5424 references: {
5425 [refId: string]: ɵQueryValueType;
5426 };
5427 /**
5428 * ids and value types of all queries that are matched by this node.
5429 */
5430 matchedQueries: {
5431 [queryId: number]: ɵQueryValueType;
5432 };
5433 /** Binary or of all matched query ids of this node. */
5434 matchedQueryIds: number;
5435 /**
5436 * Binary or of all query ids that are matched by one of the children.
5437 * This includes query ids from templates as well.
5438 * Used as a bloom filter.
5439 */
5440 childMatchedQueries: number;
5441 element: ElementDef | null;
5442 provider: ProviderDef | null;
5443 text: TextDef | null;
5444 query: QueryDef | null;
5445 ngContent: NgContentDef | null;
5446}
5447
5448declare interface NodeInjectorDebug {
5449 /**
5450 * Instance bloom. Does the current injector have a provider with a given bloom mask.
5451 */
5452 bloom: string;
5453 /**
5454 * Cumulative bloom. Do any of the above injectors have a provider with a given bloom mask.
5455 */
5456 cumulativeBloom: string;
5457 /**
5458 * A list of providers associated with this injector.
5459 */
5460 providers: (Type<unknown> | ɵDirectiveDef<unknown> | ɵComponentDef<unknown>)[];
5461 /**
5462 * A list of providers associated with this injector visible to the view of the component only.
5463 */
5464 viewProviders: Type<unknown>[];
5465 /**
5466 * Location of the parent `TNode`.
5467 */
5468 parentInjectorIndex: number;
5469}
5470
5471/**
5472 * Function to call console.error at the right source location. This is an indirection
5473 * via another function as browser will log the location that actually called
5474 * `console.error`.
5475 */
5476declare interface NodeLogger {
5477 (): () => void;
5478}
5479
5480/**
5481 * Object Oriented style of API needed to create elements and text nodes.
5482 *
5483 * This is the native browser API style, e.g. operations are methods on individual objects
5484 * like HTMLElement. With this style, no additional code is needed as a facade
5485 * (reducing payload size).
5486 * */
5487declare interface ObjectOrientedRenderer3 {
5488 createComment(data: string): RComment;
5489 createElement(tagName: string): RElement;
5490 createElementNS(namespace: string, tagName: string): RElement;
5491 createTextNode(data: string): RText;
5492 querySelector(selectors: string): RElement | null;
5493}
5494
5495/**
5496 * @description
5497 * A lifecycle hook that is called when any data-bound property of a directive changes.
5498 * Define an `ngOnChanges()` method to handle the changes.
5499 *
5500 * @see `DoCheck`
5501 * @see `OnInit`
5502 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
5503 *
5504 * @usageNotes
5505 * The following snippet shows how a component can implement this interface to
5506 * define an on-changes handler for an input property.
5507 *
5508 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnChanges'}
5509 *
5510 * @publicApi
5511 */
5512export declare interface OnChanges {
5513 /**
5514 * A callback method that is invoked immediately after the
5515 * default change detector has checked data-bound properties
5516 * if at least one has changed, and before the view and content
5517 * children are checked.
5518 * @param changes The changed properties.
5519 */
5520 ngOnChanges(changes: SimpleChanges): void;
5521}
5522
5523/**
5524 * A lifecycle hook that is called when a directive, pipe, or service is destroyed.
5525 * Use for any custom cleanup that needs to occur when the
5526 * instance is destroyed.
5527 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
5528 *
5529 * @usageNotes
5530 * The following snippet shows how a component can implement this interface
5531 * to define its own custom clean-up method.
5532 *
5533 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'}
5534 *
5535 * @publicApi
5536 */
5537export declare interface OnDestroy {
5538 /**
5539 * A callback method that performs custom clean-up, invoked immediately
5540 * before a directive, pipe, or service instance is destroyed.
5541 */
5542 ngOnDestroy(): void;
5543}
5544
5545/**
5546 * @description
5547 * A lifecycle hook that is called after Angular has initialized
5548 * all data-bound properties of a directive.
5549 * Define an `ngOnInit()` method to handle any additional initialization tasks.
5550 *
5551 * @see `AfterContentInit`
5552 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
5553 *
5554 * @usageNotes
5555 * The following snippet shows how a component can implement this interface to
5556 * define its own initialization method.
5557 *
5558 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'}
5559 *
5560 * @publicApi
5561 */
5562export declare interface OnInit {
5563 /**
5564 * A callback method that is invoked immediately after the
5565 * default change detector has checked the directive's
5566 * data-bound properties for the first time,
5567 * and before any of the view or content children have been checked.
5568 * It is invoked only once when the directive is instantiated.
5569 */
5570 ngOnInit(): void;
5571}
5572
5573declare type OpaqueValue = unknown;
5574
5575declare interface OpaqueViewState {
5576 '__brand__': 'Brand for OpaqueViewState that nothing will match';
5577}
5578
5579/**
5580 * Type of the Optional metadata.
5581 *
5582 * @publicApi
5583 */
5584export declare interface Optional {
5585}
5586
5587/**
5588 * Optional decorator and metadata.
5589 *
5590 * @Annotation
5591 * @publicApi
5592 */
5593export declare const Optional: OptionalDecorator;
5594
5595/**
5596 * Type of the Optional decorator / constructor function.
5597 *
5598 * @publicApi
5599 */
5600export declare interface OptionalDecorator {
5601 /**
5602 * Parameter decorator to be used on constructor parameters,
5603 * which marks the parameter as being an optional dependency.
5604 * The DI framework provides `null` if the dependency is not found.
5605 *
5606 * Can be used together with other parameter decorators
5607 * that modify how dependency injection operates.
5608 *
5609 * @usageNotes
5610 *
5611 * The following code allows the possibility of a `null` result:
5612 *
5613 * <code-example path="core/di/ts/metadata_spec.ts" region="Optional">
5614 * </code-example>
5615 *
5616 * @see ["Dependency Injection Guide"](guide/dependency-injection).
5617 */
5618 (): any;
5619 new (): Optional;
5620}
5621
5622/**
5623 * Type of the Output metadata.
5624 *
5625 * @publicApi
5626 */
5627export declare interface Output {
5628 /**
5629 * The name of the DOM property to which the output property is bound.
5630 */
5631 bindingPropertyName?: string;
5632}
5633
5634/**
5635 * @Annotation
5636 * @publicApi
5637 */
5638export declare const Output: OutputDecorator;
5639
5640/**
5641 * Type of the Output decorator / constructor function.
5642 *
5643 * @publicApi
5644 */
5645export declare interface OutputDecorator {
5646 /**
5647 * Decorator that marks a class field as an output property and supplies configuration metadata.
5648 * The DOM property bound to the output property is automatically updated during change detection.
5649 *
5650 * @usageNotes
5651 *
5652 * You can supply an optional name to use in templates when the
5653 * component is instantiated, that maps to the
5654 * name of the bound property. By default, the original
5655 * name of the bound property is used for output binding.
5656 *
5657 * See `Input` decorator for an example of providing a binding name.
5658 *
5659 * @see [Input and Output properties](guide/inputs-outputs)
5660 *
5661 */
5662 (bindingPropertyName?: string): any;
5663 new (bindingPropertyName?: string): any;
5664}
5665
5666declare interface OutputDef {
5667 type: OutputType;
5668 target: 'window' | 'document' | 'body' | 'component' | null;
5669 eventName: string;
5670 propName: string | null;
5671}
5672
5673declare const enum OutputType {
5674 ElementOutput = 0,
5675 DirectiveOutput = 1
5676}
5677
5678/**
5679 * A [DI token](guide/glossary#di-token "DI token definition") that indicates the root directory of
5680 * the application
5681 * @publicApi
5682 */
5683export declare const PACKAGE_ROOT_URL: InjectionToken<string>;
5684
5685declare const PARENT = 3;
5686
5687/**
5688 * Type of the Pipe metadata.
5689 *
5690 * @publicApi
5691 */
5692export declare interface Pipe {
5693 /**
5694 * The pipe name to use in template bindings.
5695 * Typically uses [lowerCamelCase](guide/glossary#case-types)
5696 * because the name cannot contain hyphens.
5697 */
5698 name: string;
5699 /**
5700 * When true, the pipe is pure, meaning that the
5701 * `transform()` method is invoked only when its input arguments
5702 * change. Pipes are pure by default.
5703 *
5704 * If the pipe has internal state (that is, the result
5705 * depends on state other than its arguments), set `pure` to false.
5706 * In this case, the pipe is invoked on each change-detection cycle,
5707 * even if the arguments have not changed.
5708 */
5709 pure?: boolean;
5710}
5711
5712/**
5713 * @Annotation
5714 * @publicApi
5715 */
5716export declare const Pipe: PipeDecorator;
5717
5718/**
5719 * Type of the Pipe decorator / constructor function.
5720 *
5721 * @publicApi
5722 */
5723export declare interface PipeDecorator {
5724 /**
5725 *
5726 * Decorator that marks a class as pipe and supplies configuration metadata.
5727 *
5728 * A pipe class must implement the `PipeTransform` interface.
5729 * For example, if the name is "myPipe", use a template binding expression
5730 * such as the following:
5731 *
5732 * ```
5733 * {{ exp | myPipe }}
5734 * ```
5735 *
5736 * The result of the expression is passed to the pipe's `transform()` method.
5737 *
5738 * A pipe must belong to an NgModule in order for it to be available
5739 * to a template. To make it a member of an NgModule,
5740 * list it in the `declarations` field of the `NgModule` metadata.
5741 *
5742 * @see [Style Guide: Pipe Names](guide/styleguide#02-09)
5743 *
5744 */
5745 (obj: Pipe): TypeDecorator;
5746 /**
5747 * See the `Pipe` decorator.
5748 */
5749 new (obj: Pipe): Pipe;
5750}
5751
5752declare type PipeDefList = ɵPipeDef<any>[];
5753
5754/**
5755 * Type used for PipeDefs on component definition.
5756 *
5757 * The function is necessary to be able to support forward declarations.
5758 */
5759declare type PipeDefListOrFactory = (() => PipeDefList) | PipeDefList;
5760
5761
5762/**
5763 * An interface that is implemented by pipes in order to perform a transformation.
5764 * Angular invokes the `transform` method with the value of a binding
5765 * as the first argument, and any parameters as the second argument in list form.
5766 *
5767 * @usageNotes
5768 *
5769 * In the following example, `TruncatePipe` returns the shortened value with an added ellipses.
5770 *
5771 * <code-example path="core/ts/pipes/simple_truncate.ts" header="simple_truncate.ts"></code-example>
5772 *
5773 * Invoking `{{ 'It was the best of times' | truncate }}` in a template will produce `It was...`.
5774 *
5775 * In the following example, `TruncatePipe` takes parameters that sets the truncated length and the
5776 * string to append with.
5777 *
5778 * <code-example path="core/ts/pipes/truncate.ts" header="truncate.ts"></code-example>
5779 *
5780 * Invoking `{{ 'It was the best of times' | truncate:4:'....' }}` in a template will produce `It
5781 * was the best....`.
5782 *
5783 * @publicApi
5784 */
5785export declare interface PipeTransform {
5786 transform(value: any, ...args: any[]): any;
5787}
5788
5789/**
5790 * A subclass of `Type` which has a static `ɵpipe`:`PipeDef` field making it
5791 * consumable for rendering.
5792 */
5793declare interface PipeType<T> extends Type<T> {
5794 ɵpipe: unknown;
5795}
5796
5797declare type PipeTypeList = (PipeType<any> | Type<any>)[];
5798
5799declare type PipeTypesOrFactory = (() => PipeTypeList) | PipeTypeList;
5800
5801/**
5802 * A token that indicates an opaque platform ID.
5803 * @publicApi
5804 */
5805export declare const PLATFORM_ID: InjectionToken<Object>;
5806
5807/**
5808 * A function that is executed when a platform is initialized.
5809 * @publicApi
5810 */
5811export declare const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>;
5812
5813/**
5814 * This platform has to be included in any other platform
5815 *
5816 * @publicApi
5817 */
5818export declare const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
5819
5820/**
5821 * The Angular platform is the entry point for Angular on a web page.
5822 * Each page has exactly one platform. Services (such as reflection) which are common
5823 * to every Angular application running on the page are bound in its scope.
5824 * A page's platform is initialized implicitly when a platform is created using a platform
5825 * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.
5826 *
5827 * @publicApi
5828 */
5829export declare class PlatformRef {
5830 private _injector;
5831 private _modules;
5832 private _destroyListeners;
5833 private _destroyed;
5834 /**
5835 * Creates an instance of an `@NgModule` for the given platform for offline compilation.
5836 *
5837 * @usageNotes
5838 *
5839 * The following example creates the NgModule for a browser platform.
5840 *
5841 * ```typescript
5842 * my_module.ts:
5843 *
5844 * @NgModule({
5845 * imports: [BrowserModule]
5846 * })
5847 * class MyModule {}
5848 *
5849 * main.ts:
5850 * import {MyModuleNgFactory} from './my_module.ngfactory';
5851 * import {platformBrowser} from '@angular/platform-browser';
5852 *
5853 * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
5854 * ```
5855 *
5856 * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function
5857 * argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.
5858 */
5859 bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions): Promise<NgModuleRef<M>>;
5860 /**
5861 * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.
5862 *
5863 * @usageNotes
5864 * ### Simple Example
5865 *
5866 * ```typescript
5867 * @NgModule({
5868 * imports: [BrowserModule]
5869 * })
5870 * class MyModule {}
5871 *
5872 * let moduleRef = platformBrowser().bootstrapModule(MyModule);
5873 * ```
5874 *
5875 */
5876 bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>;
5877 private _moduleDoBootstrap;
5878 /**
5879 * Registers a listener to be called when the platform is destroyed.
5880 */
5881 onDestroy(callback: () => void): void;
5882 /**
5883 * Retrieves the platform {@link Injector}, which is the parent injector for
5884 * every Angular application on the page and provides singleton providers.
5885 */
5886 get injector(): Injector;
5887 /**
5888 * Destroys the current Angular platform and all Angular applications on the page.
5889 * Destroys all modules and listeners registered with the platform.
5890 */
5891 destroy(): void;
5892 get destroyed(): boolean;
5893 static ɵfac: i0.ɵɵFactoryDeclaration<PlatformRef, never>;
5894 static ɵprov: i0.ɵɵInjectableDeclaration<PlatformRef>;
5895}
5896
5897declare interface PlatformReflectionCapabilities {
5898 isReflectionEnabled(): boolean;
5899 factory(type: Type<any>): Function;
5900 hasLifecycleHook(type: any, lcProperty: string): boolean;
5901 guards(type: any): {
5902 [key: string]: any;
5903 };
5904 /**
5905 * Return a list of annotations/types for constructor parameters
5906 */
5907 parameters(type: Type<any>): any[][];
5908 /**
5909 * Return a list of annotations declared on the class
5910 */
5911 annotations(type: Type<any>): any[];
5912 /**
5913 * Return a object literal which describes the annotations on Class fields/properties.
5914 */
5915 propMetadata(typeOrFunc: Type<any>): {
5916 [key: string]: any[];
5917 };
5918 getter(name: string): ɵGetterFn;
5919 setter(name: string): ɵSetterFn;
5920 method(name: string): ɵMethodFn;
5921 importUri(type: Type<any>): string;
5922 resourceUri(type: Type<any>): string;
5923 resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any;
5924 resolveEnum(enumIdentifier: any, name: string): any;
5925}
5926
5927/**
5928 * A boolean-valued function over a value, possibly including context information
5929 * regarding that value's position in an array.
5930 *
5931 * @publicApi
5932 */
5933export declare interface Predicate<T> {
5934 (value: T): boolean;
5935}
5936
5937declare const PREORDER_HOOK_FLAGS = 18;
5938
5939/** More flags associated with an LView (saved in LView[PREORDER_HOOK_FLAGS]) */
5940declare const enum PreOrderHookFlags {
5941 /**
5942 The index of the next pre-order hook to be called in the hooks array, on the first 16
5943 bits
5944 */
5945 IndexOfTheNextPreOrderHookMaskMask = 65535,
5946 /**
5947 * The number of init hooks that have already been called, on the last 16 bits
5948 */
5949 NumberOfInitHooksCalledIncrementer = 65536,
5950 NumberOfInitHooksCalledShift = 16,
5951 NumberOfInitHooksCalledMask = 4294901760
5952}
5953
5954/**
5955 * Procedural style of API needed to create elements and text nodes.
5956 *
5957 * In non-native browser environments (e.g. platforms such as web-workers), this is the
5958 * facade that enables element manipulation. This also facilitates backwards compatibility
5959 * with Renderer2.
5960 */
5961declare interface ProceduralRenderer3 {
5962 destroy(): void;
5963 createComment(value: string): RComment;
5964 createElement(name: string, namespace?: string | null): RElement;
5965 createText(value: string): RText;
5966 /**
5967 * This property is allowed to be null / undefined,
5968 * in which case the view engine won't call it.
5969 * This is used as a performance optimization for production mode.
5970 */
5971 destroyNode?: ((node: RNode) => void) | null;
5972 appendChild(parent: RElement, newChild: RNode): void;
5973 insertBefore(parent: RNode, newChild: RNode, refChild: RNode | null, isMove?: boolean): void;
5974 removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;
5975 selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): RElement;
5976 parentNode(node: RNode): RElement | null;
5977 nextSibling(node: RNode): RNode | null;
5978 setAttribute(el: RElement, name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL, namespace?: string | null): void;
5979 removeAttribute(el: RElement, name: string, namespace?: string | null): void;
5980 addClass(el: RElement, name: string): void;
5981 removeClass(el: RElement, name: string): void;
5982 setStyle(el: RElement, style: string, value: any, flags?: RendererStyleFlags2 | RendererStyleFlags3): void;
5983 removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2 | RendererStyleFlags3): void;
5984 setProperty(el: RElement, name: string, value: any): void;
5985 setValue(node: RText | RComment, value: string): void;
5986 listen(target: GlobalTargetName | RNode, eventName: string, callback: (event: any) => boolean | void): () => void;
5987}
5988
5989/**
5990 * Describes a function that is used to process provider lists (such as provider
5991 * overrides).
5992 */
5993declare type ProcessProvidersFunction = (providers: Provider[]) => Provider[];
5994
5995/**
5996 * List of slots for a projection. A slot can be either based on a parsed CSS selector
5997 * which will be used to determine nodes which are projected into that slot.
5998 *
5999 * When set to "*", the slot is reserved and can be used for multi-slot projection
6000 * using {@link ViewContainerRef#createComponent}. The last slot that specifies the
6001 * wildcard selector will retrieve all projectable nodes which do not match any selector.
6002 */
6003declare type ProjectionSlots = (ɵCssSelectorList | '*')[];
6004
6005/**
6006 * This mapping is necessary so we can set input properties and output listeners
6007 * properly at runtime when property names are minified or aliased.
6008 *
6009 * Key: unminified / public input or output name
6010 * Value: array containing minified / internal name and related directive index
6011 *
6012 * The value must be an array to support inputs and outputs with the same name
6013 * on the same node.
6014 */
6015declare type PropertyAliases = {
6016 [key: string]: PropertyAliasValue;
6017};
6018
6019/**
6020 * Store the runtime input or output names for all the directives.
6021 *
6022 * i+0: directive instance index
6023 * i+1: privateName
6024 *
6025 * e.g. [0, 'change-minified']
6026 */
6027declare type PropertyAliasValue = (number | string)[];
6028
6029/**
6030 * Describes how the `Injector` should be configured.
6031 * @see ["Dependency Injection Guide"](guide/dependency-injection).
6032 *
6033 * @see `StaticProvider`
6034 *
6035 * @publicApi
6036 */
6037export declare type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | any[];
6038
6039declare interface ProviderDef {
6040 token: any;
6041 value: any;
6042 deps: DepDef[];
6043}
6044
6045declare interface ProviderOverride {
6046 token: any;
6047 flags: ɵNodeFlags;
6048 value: any;
6049 deps: ([ɵDepFlags, any] | any)[];
6050 deprecatedBehavior: boolean;
6051}
6052
6053/**
6054 * @description
6055 *
6056 * Token that can be used to retrieve an instance from an injector or through a query.
6057 *
6058 * @publicApi
6059 */
6060export declare type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToken<T>;
6061
6062/**
6063 * Testability API.
6064 * `declare` keyword causes tsickle to generate externs, so these methods are
6065 * not renamed by Closure Compiler.
6066 * @publicApi
6067 */
6068declare interface PublicTestability {
6069 isStable(): boolean;
6070 whenStable(callback: Function, timeout?: number, updateCallback?: Function): void;
6071 findProviders(using: any, provider: string, exactMatch: boolean): any[];
6072}
6073
6074declare const QUERIES = 19;
6075
6076/**
6077 * Type of the Query metadata.
6078 *
6079 * @publicApi
6080 */
6081export declare interface Query {
6082 descendants: boolean;
6083 emitDistinctChangesOnly: boolean;
6084 first: boolean;
6085 read: any;
6086 isViewQuery: boolean;
6087 selector: any;
6088 static?: boolean;
6089}
6090
6091/**
6092 * Base class for query metadata.
6093 *
6094 * @see `ContentChildren`.
6095 * @see `ContentChild`.
6096 * @see `ViewChildren`.
6097 * @see `ViewChild`.
6098 *
6099 * @publicApi
6100 */
6101export declare abstract class Query {
6102}
6103
6104declare interface QueryBindingDef {
6105 propName: string;
6106 bindingType: ɵQueryBindingType;
6107}
6108
6109declare interface QueryDef {
6110 id: number;
6111 filterId: number;
6112 bindings: QueryBindingDef[];
6113}
6114
6115/**
6116 * A set of flags to be used with Queries.
6117 *
6118 * NOTE: Ensure changes here are reflected in `packages/compiler/src/render3/view/compiler.ts`
6119 */
6120declare const enum QueryFlags {
6121 /**
6122 * No flags
6123 */
6124 none = 0,
6125 /**
6126 * Whether or not the query should descend into children.
6127 */
6128 descendants = 1,
6129 /**
6130 * The query can be computed statically and hence can be assigned eagerly.
6131 *
6132 * NOTE: Backwards compatibility with ViewEngine.
6133 */
6134 isStatic = 2,
6135 /**
6136 * If the `QueryList` should fire change event only if actual change to query was computed (vs old
6137 * behavior where the change was fired whenever the query was recomputed, even if the recomputed
6138 * query resulted in the same list.)
6139 */
6140 emitDistinctChangesOnly = 4
6141}
6142
6143/**
6144 * An unmodifiable list of items that Angular keeps up to date when the state
6145 * of the application changes.
6146 *
6147 * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}
6148 * provide.
6149 *
6150 * Implements an iterable interface, therefore it can be used in both ES6
6151 * javascript `for (var i of items)` loops as well as in Angular templates with
6152 * `*ngFor="let i of myList"`.
6153 *
6154 * Changes can be observed by subscribing to the changes `Observable`.
6155 *
6156 * NOTE: In the future this class will implement an `Observable` interface.
6157 *
6158 * @usageNotes
6159 * ### Example
6160 * ```typescript
6161 * @Component({...})
6162 * class Container {
6163 * @ViewChildren(Item) items:QueryList<Item>;
6164 * }
6165 * ```
6166 *
6167 * @publicApi
6168 */
6169export declare class QueryList<T> implements Iterable<T> {
6170 private _emitDistinctChangesOnly;
6171 readonly dirty = true;
6172 private _results;
6173 private _changesDetected;
6174 private _changes;
6175 readonly length: number;
6176 readonly first: T;
6177 readonly last: T;
6178 /**
6179 * Returns `Observable` of `QueryList` notifying the subscriber of changes.
6180 */
6181 get changes(): Observable<any>;
6182 /**
6183 * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change
6184 * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in
6185 * the same result)
6186 */
6187 constructor(_emitDistinctChangesOnly?: boolean);
6188 /**
6189 * Returns the QueryList entry at `index`.
6190 */
6191 get(index: number): T | undefined;
6192 /**
6193 * See
6194 * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
6195 */
6196 map<U>(fn: (item: T, index: number, array: T[]) => U): U[];
6197 /**
6198 * See
6199 * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
6200 */
6201 filter(fn: (item: T, index: number, array: T[]) => boolean): T[];
6202 /**
6203 * See
6204 * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
6205 */
6206 find(fn: (item: T, index: number, array: T[]) => boolean): T | undefined;
6207 /**
6208 * See
6209 * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
6210 */
6211 reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U;
6212 /**
6213 * See
6214 * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
6215 */
6216 forEach(fn: (item: T, index: number, array: T[]) => void): void;
6217 /**
6218 * See
6219 * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
6220 */
6221 some(fn: (value: T, index: number, array: T[]) => boolean): boolean;
6222 /**
6223 * Returns a copy of the internal results list as an Array.
6224 */
6225 toArray(): T[];
6226 toString(): string;
6227 /**
6228 * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that
6229 * on change detection, it will not notify of changes to the queries, unless a new change
6230 * occurs.
6231 *
6232 * @param resultsTree The query results to store
6233 * @param identityAccessor Optional function for extracting stable object identity from a value
6234 * in the array. This function is executed for each element of the query result list while
6235 * comparing current query list with the new one (provided as a first argument of the `reset`
6236 * function) to detect if the lists are different. If the function is not provided, elements
6237 * are compared as is (without any pre-processing).
6238 */
6239 reset(resultsTree: Array<T | any[]>, identityAccessor?: (value: T) => unknown): void;
6240 /**
6241 * Triggers a change event by emitting on the `changes` {@link EventEmitter}.
6242 */
6243 notifyOnChanges(): void;
6244 /** internal */
6245 setDirty(): void;
6246 /** internal */
6247 destroy(): void;
6248 [Symbol.iterator]: () => Iterator<T>;
6249}
6250
6251declare interface R3DeclareComponentFacade extends R3DeclareDirectiveFacade {
6252 template: string;
6253 isInline?: boolean;
6254 styles?: string[];
6255 components?: R3DeclareUsedDirectiveFacade[];
6256 directives?: R3DeclareUsedDirectiveFacade[];
6257 pipes?: {
6258 [pipeName: string]: OpaqueValue | (() => OpaqueValue);
6259 };
6260 viewProviders?: OpaqueValue;
6261 animations?: OpaqueValue;
6262 changeDetection?: ChangeDetectionStrategy_2;
6263 encapsulation?: ViewEncapsulation_2;
6264 interpolation?: [string, string];
6265 preserveWhitespaces?: boolean;
6266}
6267
6268declare interface R3DeclareDependencyMetadataFacade {
6269 token: OpaqueValue;
6270 attribute?: boolean;
6271 host?: boolean;
6272 optional?: boolean;
6273 self?: boolean;
6274 skipSelf?: boolean;
6275}
6276
6277declare interface R3DeclareDirectiveFacade {
6278 selector?: string;
6279 type: Type_2;
6280 inputs?: {
6281 [classPropertyName: string]: string | [string, string];
6282 };
6283 outputs?: {
6284 [classPropertyName: string]: string;
6285 };
6286 host?: {
6287 attributes?: {
6288 [key: string]: OpaqueValue;
6289 };
6290 listeners?: {
6291 [key: string]: string;
6292 };
6293 properties?: {
6294 [key: string]: string;
6295 };
6296 classAttribute?: string;
6297 styleAttribute?: string;
6298 };
6299 queries?: R3DeclareQueryMetadataFacade[];
6300 viewQueries?: R3DeclareQueryMetadataFacade[];
6301 providers?: OpaqueValue;
6302 exportAs?: string[];
6303 usesInheritance?: boolean;
6304 usesOnChanges?: boolean;
6305}
6306
6307declare interface R3DeclareFactoryFacade {
6308 type: Type_2;
6309 deps: R3DeclareDependencyMetadataFacade[] | 'invalid' | null;
6310 target: ɵɵFactoryTarget;
6311}
6312
6313declare interface R3DeclareInjectableFacade {
6314 type: Type_2;
6315 providedIn?: Type_2 | 'root' | 'platform' | 'any' | null;
6316 useClass?: OpaqueValue;
6317 useFactory?: OpaqueValue;
6318 useExisting?: OpaqueValue;
6319 useValue?: OpaqueValue;
6320 deps?: R3DeclareDependencyMetadataFacade[];
6321}
6322
6323declare interface R3DeclareInjectorFacade {
6324 type: Type_2;
6325 imports?: OpaqueValue[];
6326 providers?: OpaqueValue[];
6327}
6328
6329declare interface R3DeclareNgModuleFacade {
6330 type: Type_2;
6331 bootstrap?: OpaqueValue[] | (() => OpaqueValue[]);
6332 declarations?: OpaqueValue[] | (() => OpaqueValue[]);
6333 imports?: OpaqueValue[] | (() => OpaqueValue[]);
6334 exports?: OpaqueValue[] | (() => OpaqueValue[]);
6335 schemas?: OpaqueValue[];
6336 id?: OpaqueValue;
6337}
6338
6339declare interface R3DeclarePipeFacade {
6340 type: Type_2;
6341 name: string;
6342 pure?: boolean;
6343}
6344
6345declare interface R3DeclareQueryMetadataFacade {
6346 propertyName: string;
6347 first?: boolean;
6348 predicate: OpaqueValue | string[];
6349 descendants?: boolean;
6350 read?: OpaqueValue;
6351 static?: boolean;
6352 emitDistinctChangesOnly?: boolean;
6353}
6354
6355declare interface R3DeclareUsedDirectiveFacade {
6356 selector: string;
6357 type: OpaqueValue | (() => OpaqueValue);
6358 inputs?: string[];
6359 outputs?: string[];
6360 exportAs?: string[];
6361}
6362
6363declare class R3Injector {
6364 readonly parent: Injector;
6365 /**
6366 * Map of tokens to records which contain the instances of those tokens.
6367 * - `null` value implies that we don't have the record. Used by tree-shakable injectors
6368 * to prevent further searches.
6369 */
6370 private records;
6371 /**
6372 * The transitive set of `InjectorType`s which define this injector.
6373 */
6374 private injectorDefTypes;
6375 /**
6376 * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
6377 */
6378 private onDestroy;
6379 /**
6380 * Flag indicating this injector provides the APP_ROOT_SCOPE token, and thus counts as the
6381 * root scope.
6382 */
6383 private readonly scope;
6384 readonly source: string | null;
6385 /**
6386 * Flag indicating that this injector was previously destroyed.
6387 */
6388 get destroyed(): boolean;
6389 private _destroyed;
6390 constructor(def: InjectorType<any>, additionalProviders: StaticProvider[] | null, parent: Injector, source?: string | null);
6391 /**
6392 * Destroy the injector and release references to every instance or provider associated with it.
6393 *
6394 * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
6395 * hook was found.
6396 */
6397 destroy(): void;
6398 get<T>(token: ProviderToken<T>, notFoundValue?: any, flags?: InjectFlags): T;
6399 toString(): string;
6400 private assertNotDestroyed;
6401 /**
6402 * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers
6403 * to this injector.
6404 *
6405 * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,
6406 * the function will return "true" to indicate that the providers of the type definition need
6407 * to be processed. This allows us to process providers of injector types after all imports of
6408 * an injector definition are processed. (following View Engine semantics: see FW-1349)
6409 */
6410 private processInjectorType;
6411 /**
6412 * Process a `SingleProvider` and add it.
6413 */
6414 private processProvider;
6415 private hydrate;
6416 private injectableDefInScope;
6417}
6418
6419declare interface RComment extends RNode {
6420 textContent: string | null;
6421}
6422
6423declare interface RCssStyleDeclaration {
6424 removeProperty(propertyName: string): string;
6425 setProperty(propertyName: string, value: string | null, priority?: string): void;
6426}
6427
6428declare interface RDomTokenList {
6429 add(token: string): void;
6430 remove(token: string): void;
6431}
6432
6433/**
6434 * `Dependency` is used by the framework to extend DI.
6435 * This is internal to Angular and should not be used directly.
6436 */
6437declare class ReflectiveDependency {
6438 key: ReflectiveKey;
6439 optional: boolean;
6440 visibility: Self | SkipSelf | null;
6441 constructor(key: ReflectiveKey, optional: boolean, visibility: Self | SkipSelf | null);
6442 static fromKey(key: ReflectiveKey): ReflectiveDependency;
6443}
6444
6445/**
6446 * A ReflectiveDependency injection container used for instantiating objects and resolving
6447 * dependencies.
6448 *
6449 * An `Injector` is a replacement for a `new` operator, which can automatically resolve the
6450 * constructor dependencies.
6451 *
6452 * In typical use, application code asks for the dependencies in the constructor and they are
6453 * resolved by the `Injector`.
6454 *
6455 * @usageNotes
6456 * ### Example
6457 *
6458 * The following example creates an `Injector` configured to create `Engine` and `Car`.
6459 *
6460 * ```typescript
6461 * @Injectable()
6462 * class Engine {
6463 * }
6464 *
6465 * @Injectable()
6466 * class Car {
6467 * constructor(public engine:Engine) {}
6468 * }
6469 *
6470 * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
6471 * var car = injector.get(Car);
6472 * expect(car instanceof Car).toBe(true);
6473 * expect(car.engine instanceof Engine).toBe(true);
6474 * ```
6475 *
6476 * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`
6477 * resolve all of the object's dependencies automatically.
6478 *
6479 * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.
6480 * @publicApi
6481 */
6482export declare abstract class ReflectiveInjector implements Injector {
6483 /**
6484 * Turns an array of provider definitions into an array of resolved providers.
6485 *
6486 * A resolution is a process of flattening multiple nested arrays and converting individual
6487 * providers into an array of `ResolvedReflectiveProvider`s.
6488 *
6489 * @usageNotes
6490 * ### Example
6491 *
6492 * ```typescript
6493 * @Injectable()
6494 * class Engine {
6495 * }
6496 *
6497 * @Injectable()
6498 * class Car {
6499 * constructor(public engine:Engine) {}
6500 * }
6501 *
6502 * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
6503 *
6504 * expect(providers.length).toEqual(2);
6505 *
6506 * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
6507 * expect(providers[0].key.displayName).toBe("Car");
6508 * expect(providers[0].dependencies.length).toEqual(1);
6509 * expect(providers[0].factory).toBeDefined();
6510 *
6511 * expect(providers[1].key.displayName).toBe("Engine");
6512 * });
6513 * ```
6514 *
6515 */
6516 static resolve(providers: Provider[]): ResolvedReflectiveProvider[];
6517 /**
6518 * Resolves an array of providers and creates an injector from those providers.
6519 *
6520 * The passed-in providers can be an array of `Type`, `Provider`,
6521 * or a recursive array of more providers.
6522 *
6523 * @usageNotes
6524 * ### Example
6525 *
6526 * ```typescript
6527 * @Injectable()
6528 * class Engine {
6529 * }
6530 *
6531 * @Injectable()
6532 * class Car {
6533 * constructor(public engine:Engine) {}
6534 * }
6535 *
6536 * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
6537 * expect(injector.get(Car) instanceof Car).toBe(true);
6538 * ```
6539 */
6540 static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector;
6541 /**
6542 * Creates an injector from previously resolved providers.
6543 *
6544 * This API is the recommended way to construct injectors in performance-sensitive parts.
6545 *
6546 * @usageNotes
6547 * ### Example
6548 *
6549 * ```typescript
6550 * @Injectable()
6551 * class Engine {
6552 * }
6553 *
6554 * @Injectable()
6555 * class Car {
6556 * constructor(public engine:Engine) {}
6557 * }
6558 *
6559 * var providers = ReflectiveInjector.resolve([Car, Engine]);
6560 * var injector = ReflectiveInjector.fromResolvedProviders(providers);
6561 * expect(injector.get(Car) instanceof Car).toBe(true);
6562 * ```
6563 */
6564 static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector;
6565 /**
6566 * Parent of this injector.
6567 *
6568 * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
6569 * -->
6570 */
6571 abstract get parent(): Injector | null;
6572 /**
6573 * Resolves an array of providers and creates a child injector from those providers.
6574 *
6575 * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
6576 * -->
6577 *
6578 * The passed-in providers can be an array of `Type`, `Provider`,
6579 * or a recursive array of more providers.
6580 *
6581 * @usageNotes
6582 * ### Example
6583 *
6584 * ```typescript
6585 * class ParentProvider {}
6586 * class ChildProvider {}
6587 *
6588 * var parent = ReflectiveInjector.resolveAndCreate([ParentProvider]);
6589 * var child = parent.resolveAndCreateChild([ChildProvider]);
6590 *
6591 * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
6592 * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
6593 * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
6594 * ```
6595 */
6596 abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
6597 /**
6598 * Creates a child injector from previously resolved providers.
6599 *
6600 * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
6601 * -->
6602 *
6603 * This API is the recommended way to construct injectors in performance-sensitive parts.
6604 *
6605 * @usageNotes
6606 * ### Example
6607 *
6608 * ```typescript
6609 * class ParentProvider {}
6610 * class ChildProvider {}
6611 *
6612 * var parentProviders = ReflectiveInjector.resolve([ParentProvider]);
6613 * var childProviders = ReflectiveInjector.resolve([ChildProvider]);
6614 *
6615 * var parent = ReflectiveInjector.fromResolvedProviders(parentProviders);
6616 * var child = parent.createChildFromResolved(childProviders);
6617 *
6618 * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
6619 * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
6620 * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
6621 * ```
6622 */
6623 abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
6624 /**
6625 * Resolves a provider and instantiates an object in the context of the injector.
6626 *
6627 * The created object does not get cached by the injector.
6628 *
6629 * @usageNotes
6630 * ### Example
6631 *
6632 * ```typescript
6633 * @Injectable()
6634 * class Engine {
6635 * }
6636 *
6637 * @Injectable()
6638 * class Car {
6639 * constructor(public engine:Engine) {}
6640 * }
6641 *
6642 * var injector = ReflectiveInjector.resolveAndCreate([Engine]);
6643 *
6644 * var car = injector.resolveAndInstantiate(Car);
6645 * expect(car.engine).toBe(injector.get(Engine));
6646 * expect(car).not.toBe(injector.resolveAndInstantiate(Car));
6647 * ```
6648 */
6649 abstract resolveAndInstantiate(provider: Provider): any;
6650 /**
6651 * Instantiates an object using a resolved provider in the context of the injector.
6652 *
6653 * The created object does not get cached by the injector.
6654 *
6655 * @usageNotes
6656 * ### Example
6657 *
6658 * ```typescript
6659 * @Injectable()
6660 * class Engine {
6661 * }
6662 *
6663 * @Injectable()
6664 * class Car {
6665 * constructor(public engine:Engine) {}
6666 * }
6667 *
6668 * var injector = ReflectiveInjector.resolveAndCreate([Engine]);
6669 * var carProvider = ReflectiveInjector.resolve([Car])[0];
6670 * var car = injector.instantiateResolved(carProvider);
6671 * expect(car.engine).toBe(injector.get(Engine));
6672 * expect(car).not.toBe(injector.instantiateResolved(carProvider));
6673 * ```
6674 */
6675 abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
6676 abstract get(token: any, notFoundValue?: any): any;
6677}
6678
6679
6680/**
6681 * A unique object used for retrieving items from the {@link ReflectiveInjector}.
6682 *
6683 * Keys have:
6684 * - a system-wide unique `id`.
6685 * - a `token`.
6686 *
6687 * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows
6688 * the
6689 * injector to store created objects in a more efficient way.
6690 *
6691 * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when
6692 * resolving
6693 * providers.
6694 *
6695 * @deprecated No replacement
6696 * @publicApi
6697 */
6698export declare class ReflectiveKey {
6699 token: Object;
6700 id: number;
6701 readonly displayName: string;
6702 /**
6703 * Private
6704 */
6705 constructor(token: Object, id: number);
6706 /**
6707 * Retrieves a `Key` for a token.
6708 */
6709 static get(token: Object): ReflectiveKey;
6710 /**
6711 * @returns the number of keys registered in the system.
6712 */
6713 static get numberOfKeys(): number;
6714}
6715
6716/**
6717 * Subset of API needed for writing attributes, properties, and setting up
6718 * listeners on Element.
6719 */
6720declare interface RElement extends RNode {
6721 style: RCssStyleDeclaration;
6722 classList: RDomTokenList;
6723 className: string;
6724 textContent: string | null;
6725 setAttribute(name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL): void;
6726 removeAttribute(name: string): void;
6727 setAttributeNS(namespaceURI: string, qualifiedName: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL): void;
6728 addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;
6729 removeEventListener(type: string, listener?: EventListener, options?: boolean): void;
6730 setProperty?(name: string, value: any): void;
6731}
6732
6733declare const RENDERER = 11;
6734
6735/**
6736 * Extend this base class to implement custom rendering. By default, Angular
6737 * renders a template into DOM. You can use custom rendering to intercept
6738 * rendering calls, or to render to something other than DOM.
6739 *
6740 * Create your custom renderer using `RendererFactory2`.
6741 *
6742 * Use a custom renderer to bypass Angular's templating and
6743 * make custom UI changes that can't be expressed declaratively.
6744 * For example if you need to set a property or an attribute whose name is
6745 * not statically known, use the `setProperty()` or
6746 * `setAttribute()` method.
6747 *
6748 * @publicApi
6749 */
6750export declare abstract class Renderer2 {
6751 /**
6752 * Use to store arbitrary developer-defined data on a renderer instance,
6753 * as an object containing key-value pairs.
6754 * This is useful for renderers that delegate to other renderers.
6755 */
6756 abstract get data(): {
6757 [key: string]: any;
6758 };
6759 /**
6760 * Implement this callback to destroy the renderer or the host element.
6761 */
6762 abstract destroy(): void;
6763 /**
6764 * Implement this callback to create an instance of the host element.
6765 * @param name An identifying name for the new element, unique within the namespace.
6766 * @param namespace The namespace for the new element.
6767 * @returns The new element.
6768 */
6769 abstract createElement(name: string, namespace?: string | null): any;
6770 /**
6771 * Implement this callback to add a comment to the DOM of the host element.
6772 * @param value The comment text.
6773 * @returns The modified element.
6774 */
6775 abstract createComment(value: string): any;
6776 /**
6777 * Implement this callback to add text to the DOM of the host element.
6778 * @param value The text string.
6779 * @returns The modified element.
6780 */
6781 abstract createText(value: string): any;
6782 /**
6783 * If null or undefined, the view engine won't call it.
6784 * This is used as a performance optimization for production mode.
6785 */
6786 destroyNode: ((node: any) => void) | null;
6787 /**
6788 * Appends a child to a given parent node in the host element DOM.
6789 * @param parent The parent node.
6790 * @param newChild The new child node.
6791 */
6792 abstract appendChild(parent: any, newChild: any): void;
6793 /**
6794 * Implement this callback to insert a child node at a given position in a parent node
6795 * in the host element DOM.
6796 * @param parent The parent node.
6797 * @param newChild The new child nodes.
6798 * @param refChild The existing child node before which `newChild` is inserted.
6799 * @param isMove Optional argument which signifies if the current `insertBefore` is a result of a
6800 * move. Animation uses this information to trigger move animations. In the past the Animation
6801 * would always assume that any `insertBefore` is a move. This is not strictly true because
6802 * with runtime i18n it is possible to invoke `insertBefore` as a result of i18n and it should
6803 * not trigger an animation move.
6804 */
6805 abstract insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void;
6806 /**
6807 * Implement this callback to remove a child node from the host element's DOM.
6808 * @param parent The parent node.
6809 * @param oldChild The child node to remove.
6810 * @param isHostElement Optionally signal to the renderer whether this element is a host element
6811 * or not
6812 */
6813 abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;
6814 /**
6815 * Implement this callback to prepare an element to be bootstrapped
6816 * as a root element, and return the element instance.
6817 * @param selectorOrNode The DOM element.
6818 * @param preserveContent Whether the contents of the root element
6819 * should be preserved, or cleared upon bootstrap (default behavior).
6820 * Use with `ViewEncapsulation.ShadowDom` to allow simple native
6821 * content projection via `<slot>` elements.
6822 * @returns The root element.
6823 */
6824 abstract selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): any;
6825 /**
6826 * Implement this callback to get the parent of a given node
6827 * in the host element's DOM.
6828 * @param node The child node to query.
6829 * @returns The parent node, or null if there is no parent.
6830 * For WebWorkers, always returns true.
6831 * This is because the check is synchronous,
6832 * and the caller can't rely on checking for null.
6833 */
6834 abstract parentNode(node: any): any;
6835 /**
6836 * Implement this callback to get the next sibling node of a given node
6837 * in the host element's DOM.
6838 * @returns The sibling node, or null if there is no sibling.
6839 * For WebWorkers, always returns a value.
6840 * This is because the check is synchronous,
6841 * and the caller can't rely on checking for null.
6842 */
6843 abstract nextSibling(node: any): any;
6844 /**
6845 * Implement this callback to set an attribute value for an element in the DOM.
6846 * @param el The element.
6847 * @param name The attribute name.
6848 * @param value The new value.
6849 * @param namespace The namespace.
6850 */
6851 abstract setAttribute(el: any, name: string, value: string, namespace?: string | null): void;
6852 /**
6853 * Implement this callback to remove an attribute from an element in the DOM.
6854 * @param el The element.
6855 * @param name The attribute name.
6856 * @param namespace The namespace.
6857 */
6858 abstract removeAttribute(el: any, name: string, namespace?: string | null): void;
6859 /**
6860 * Implement this callback to add a class to an element in the DOM.
6861 * @param el The element.
6862 * @param name The class name.
6863 */
6864 abstract addClass(el: any, name: string): void;
6865 /**
6866 * Implement this callback to remove a class from an element in the DOM.
6867 * @param el The element.
6868 * @param name The class name.
6869 */
6870 abstract removeClass(el: any, name: string): void;
6871 /**
6872 * Implement this callback to set a CSS style for an element in the DOM.
6873 * @param el The element.
6874 * @param style The name of the style.
6875 * @param value The new value.
6876 * @param flags Flags for style variations. No flags are set by default.
6877 */
6878 abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;
6879 /**
6880 * Implement this callback to remove the value from a CSS style for an element in the DOM.
6881 * @param el The element.
6882 * @param style The name of the style.
6883 * @param flags Flags for style variations to remove, if set. ???
6884 */
6885 abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;
6886 /**
6887 * Implement this callback to set the value of a property of an element in the DOM.
6888 * @param el The element.
6889 * @param name The property name.
6890 * @param value The new value.
6891 */
6892 abstract setProperty(el: any, name: string, value: any): void;
6893 /**
6894 * Implement this callback to set the value of a node in the host element.
6895 * @param node The node.
6896 * @param value The new value.
6897 */
6898 abstract setValue(node: any, value: string): void;
6899 /**
6900 * Implement this callback to start an event listener.
6901 * @param target The context in which to listen for events. Can be
6902 * the entire window or document, the body of the document, or a specific
6903 * DOM element.
6904 * @param eventName The event to listen for.
6905 * @param callback A handler function to invoke when the event occurs.
6906 * @returns An "unlisten" function for disposing of this handler.
6907 */
6908 abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void;
6909}
6910
6911declare type Renderer3 = ObjectOrientedRenderer3 | ProceduralRenderer3;
6912
6913declare const RENDERER_FACTORY = 10;
6914
6915/**
6916 * Creates and initializes a custom renderer that implements the `Renderer2` base class.
6917 *
6918 * @publicApi
6919 */
6920export declare abstract class RendererFactory2 {
6921 /**
6922 * Creates and initializes a custom renderer for a host DOM element.
6923 * @param hostElement The element to render.
6924 * @param type The base class to implement.
6925 * @returns The new custom renderer instance.
6926 */
6927 abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2;
6928 /**
6929 * A callback invoked when rendering has begun.
6930 */
6931 abstract begin?(): void;
6932 /**
6933 * A callback invoked when rendering has completed.
6934 */
6935 abstract end?(): void;
6936 /**
6937 * Use with animations test-only mode. Notifies the test when rendering has completed.
6938 * @returns The asynchronous result of the developer-defined function.
6939 */
6940 abstract whenRenderingDone?(): Promise<any>;
6941}
6942
6943declare interface RendererFactory3 {
6944 createRenderer(hostElement: RElement | null, rendererType: RendererType2 | null): Renderer3;
6945 begin?(): void;
6946 end?(): void;
6947}
6948
6949/**
6950 * Flags for renderer-specific style modifiers.
6951 * @publicApi
6952 */
6953export declare enum RendererStyleFlags2 {
6954 /**
6955 * Marks a style as important.
6956 */
6957 Important = 1,
6958 /**
6959 * Marks a style as using dash case naming (this-is-dash-case).
6960 */
6961 DashCase = 2
6962}
6963
6964declare enum RendererStyleFlags3 {
6965 Important = 1,
6966 DashCase = 2
6967}
6968
6969/**
6970 * Used by `RendererFactory2` to associate custom rendering data and styles
6971 * with a rendering implementation.
6972 * @publicApi
6973 */
6974export declare interface RendererType2 {
6975 /**
6976 * A unique identifying string for the new renderer, used when creating
6977 * unique styles for encapsulation.
6978 */
6979 id: string;
6980 /**
6981 * The view encapsulation type, which determines how styles are applied to
6982 * DOM elements. One of
6983 * - `Emulated` (default): Emulate native scoping of styles.
6984 * - `Native`: Use the native encapsulation mechanism of the renderer.
6985 * - `ShadowDom`: Use modern [Shadow
6986 * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
6987 * create a ShadowRoot for component's host element.
6988 * - `None`: Do not provide any template or style encapsulation.
6989 */
6990 encapsulation: ViewEncapsulation;
6991 /**
6992 * Defines CSS styles to be stored on a renderer instance.
6993 */
6994 styles: (string | any[])[];
6995 /**
6996 * Defines arbitrary developer-defined data to be stored on a renderer instance.
6997 * This is useful for renderers that delegate to other renderers.
6998 */
6999 data: {
7000 [kind: string]: any;
7001 };
7002}
7003
7004/**
7005 * An internal resolved representation of a factory function created by resolving `Provider`.
7006 * @publicApi
7007 */
7008export declare class ResolvedReflectiveFactory {
7009 /**
7010 * Factory function which can return an instance of an object represented by a key.
7011 */
7012 factory: Function;
7013 /**
7014 * Arguments (dependencies) to the `factory` function.
7015 */
7016 dependencies: ReflectiveDependency[];
7017 constructor(
7018 /**
7019 * Factory function which can return an instance of an object represented by a key.
7020 */
7021 factory: Function,
7022 /**
7023 * Arguments (dependencies) to the `factory` function.
7024 */
7025 dependencies: ReflectiveDependency[]);
7026}
7027
7028/**
7029 * An internal resolved representation of a `Provider` used by the `Injector`.
7030 *
7031 * @usageNotes
7032 * This is usually created automatically by `Injector.resolveAndCreate`.
7033 *
7034 * It can be created manually, as follows:
7035 *
7036 * ### Example
7037 *
7038 * ```typescript
7039 * var resolvedProviders = Injector.resolve([{ provide: 'message', useValue: 'Hello' }]);
7040 * var injector = Injector.fromResolvedProviders(resolvedProviders);
7041 *
7042 * expect(injector.get('message')).toEqual('Hello');
7043 * ```
7044 *
7045 * @publicApi
7046 */
7047export declare interface ResolvedReflectiveProvider {
7048 /**
7049 * A key, usually a `Type<any>`.
7050 */
7051 key: ReflectiveKey;
7052 /**
7053 * Factory function which can return an instance of an object represented by a key.
7054 */
7055 resolvedFactories: ResolvedReflectiveFactory[];
7056 /**
7057 * Indicates if the provider is a multi-provider or a regular provider.
7058 */
7059 multiProvider: boolean;
7060}
7061
7062/**
7063 * Lazily retrieves the reference value from a forwardRef.
7064 *
7065 * Acts as the identity function when given a non-forward-ref value.
7066 *
7067 * @usageNotes
7068 * ### Example
7069 *
7070 * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
7071 *
7072 * @see `forwardRef`
7073 * @publicApi
7074 */
7075export declare function resolveForwardRef<T>(type: T): T;
7076
7077/**
7078 * The goal here is to make sure that the browser DOM API is the Renderer.
7079 * We do this by defining a subset of DOM API to be the renderer and then
7080 * use that at runtime for rendering.
7081 *
7082 * At runtime we can then use the DOM api directly, in server or web-worker
7083 * it will be easy to implement such API.
7084 */
7085/** Subset of API needed for appending elements and text nodes. */
7086declare interface RNode {
7087 /**
7088 * Returns the parent Element, Document, or DocumentFragment
7089 */
7090 parentNode: RNode | null;
7091 /**
7092 * Returns the parent Element if there is one
7093 */
7094 parentElement: RElement | null;
7095 /**
7096 * Gets the Node immediately following this one in the parent's childNodes
7097 */
7098 nextSibling: RNode | null;
7099 /**
7100 * Removes a child from the current node and returns the removed node
7101 * @param oldChild the child node to remove
7102 */
7103 removeChild(oldChild: RNode): RNode;
7104 /**
7105 * Insert a child node.
7106 *
7107 * Used exclusively for adding View root nodes into ViewAnchor location.
7108 */
7109 insertBefore(newChild: RNode, refChild: RNode | null, isViewRoot: boolean): void;
7110 /**
7111 * Append a child node.
7112 *
7113 * Used exclusively for building up DOM which are static (ie not View roots)
7114 */
7115 appendChild(newChild: RNode): RNode;
7116}
7117
7118/**
7119 * RootContext contains information which is shared for all components which
7120 * were bootstrapped with {@link renderComponent}.
7121 */
7122declare interface RootContext {
7123 /**
7124 * A function used for scheduling change detection in the future. Usually
7125 * this is `requestAnimationFrame`.
7126 */
7127 scheduler: (workFn: () => void) => void;
7128 /**
7129 * A promise which is resolved when all components are considered clean (not dirty).
7130 *
7131 * This promise is overwritten every time a first call to {@link markDirty} is invoked.
7132 */
7133 clean: Promise<null>;
7134 /**
7135 * RootComponents - The components that were instantiated by the call to
7136 * {@link renderComponent}.
7137 */
7138 components: {}[];
7139 /**
7140 * The player flushing handler to kick off all animations
7141 */
7142 playerHandler: ɵPlayerHandler | null;
7143 /**
7144 * What render-related operations to run once a scheduler has been set
7145 */
7146 flags: RootContextFlags;
7147}
7148
7149declare const enum RootContextFlags {
7150 Empty = 0,
7151 DetectChanges = 1,
7152 FlushPlayers = 2
7153}
7154
7155declare interface RootData {
7156 injector: Injector;
7157 ngModule: NgModuleRef<any>;
7158 projectableNodes: any[][];
7159 selectorOrNode: any;
7160 renderer: Renderer2;
7161 rendererFactory: RendererFactory2;
7162 errorHandler: ErrorHandler;
7163 sanitizer: Sanitizer;
7164}
7165
7166declare interface RText extends RNode {
7167 textContent: string | null;
7168}
7169
7170declare const SANITIZER = 12;
7171
7172/**
7173 * Sanitizer is used by the views to sanitize potentially dangerous values.
7174 *
7175 * @publicApi
7176 */
7177export declare abstract class Sanitizer {
7178 abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;
7179 /** @nocollapse */
7180 static ɵprov: unknown;
7181}
7182
7183/**
7184 * Function used to sanitize the value before writing it into the renderer.
7185 */
7186declare type SanitizerFn = (value: any, tagName?: string, propName?: string) => string | TrustedHTML | TrustedScript | TrustedScriptURL;
7187
7188
7189/**
7190 * A schema definition associated with an NgModule.
7191 *
7192 * @see `@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`
7193 *
7194 * @param name The name of a defined schema.
7195 *
7196 * @publicApi
7197 */
7198export declare interface SchemaMetadata {
7199 name: string;
7200}
7201
7202
7203/**
7204 * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
7205 * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
7206 * handled.
7207 *
7208 * See DomSanitizer for more details on security in Angular applications.
7209 *
7210 * @publicApi
7211 */
7212export declare enum SecurityContext {
7213 NONE = 0,
7214 HTML = 1,
7215 STYLE = 2,
7216 SCRIPT = 3,
7217 URL = 4,
7218 RESOURCE_URL = 5
7219}
7220
7221/** Flags used to build up CssSelectors */
7222declare const enum SelectorFlags {
7223 /** Indicates this is the beginning of a new negative selector */
7224 NOT = 1,
7225 /** Mode for matching attributes */
7226 ATTRIBUTE = 2,
7227 /** Mode for matching tag names */
7228 ELEMENT = 4,
7229 /** Mode for matching class names */
7230 CLASS = 8
7231}
7232
7233/**
7234 * Type of the Self metadata.
7235 *
7236 * @publicApi
7237 */
7238export declare interface Self {
7239}
7240
7241/**
7242 * Self decorator and metadata.
7243 *
7244 * @Annotation
7245 * @publicApi
7246 */
7247export declare const Self: SelfDecorator;
7248
7249/**
7250 * Type of the Self decorator / constructor function.
7251 *
7252 * @publicApi
7253 */
7254export declare interface SelfDecorator {
7255 /**
7256 * Parameter decorator to be used on constructor parameters,
7257 * which tells the DI framework to start dependency resolution from the local injector.
7258 *
7259 * Resolution works upward through the injector hierarchy, so the children
7260 * of this class must configure their own providers or be prepared for a `null` result.
7261 *
7262 * @usageNotes
7263 *
7264 * In the following example, the dependency can be resolved
7265 * by the local injector when instantiating the class itself, but not
7266 * when instantiating a child.
7267 *
7268 * <code-example path="core/di/ts/metadata_spec.ts" region="Self">
7269 * </code-example>
7270 *
7271 * @see `SkipSelf`
7272 * @see `Optional`
7273 *
7274 */
7275 (): any;
7276 new (): Self;
7277}
7278
7279/**
7280 * Set the {@link GetTestability} implementation used by the Angular testing framework.
7281 * @publicApi
7282 */
7283export declare function setTestabilityGetter(getter: GetTestability): void;
7284
7285
7286/**
7287 * Represents a basic change from a previous to a new value for a single
7288 * property on a directive instance. Passed as a value in a
7289 * {@link SimpleChanges} object to the `ngOnChanges` hook.
7290 *
7291 * @see `OnChanges`
7292 *
7293 * @publicApi
7294 */
7295export declare class SimpleChange {
7296 previousValue: any;
7297 currentValue: any;
7298 firstChange: boolean;
7299 constructor(previousValue: any, currentValue: any, firstChange: boolean);
7300 /**
7301 * Check whether the new value is the first value assigned.
7302 */
7303 isFirstChange(): boolean;
7304}
7305
7306/**
7307 * A hashtable of changes represented by {@link SimpleChange} objects stored
7308 * at the declared property name they belong to on a Directive or Component. This is
7309 * the type passed to the `ngOnChanges` hook.
7310 *
7311 * @see `OnChanges`
7312 *
7313 * @publicApi
7314 */
7315export declare interface SimpleChanges {
7316 [propName: string]: SimpleChange;
7317}
7318
7319/**
7320 * Type of the `SkipSelf` metadata.
7321 *
7322 * @publicApi
7323 */
7324export declare interface SkipSelf {
7325}
7326
7327/**
7328 * `SkipSelf` decorator and metadata.
7329 *
7330 * @Annotation
7331 * @publicApi
7332 */
7333export declare const SkipSelf: SkipSelfDecorator;
7334
7335/**
7336 * Type of the `SkipSelf` decorator / constructor function.
7337 *
7338 * @publicApi
7339 */
7340export declare interface SkipSelfDecorator {
7341 /**
7342 * Parameter decorator to be used on constructor parameters,
7343 * which tells the DI framework to start dependency resolution from the parent injector.
7344 * Resolution works upward through the injector hierarchy, so the local injector
7345 * is not checked for a provider.
7346 *
7347 * @usageNotes
7348 *
7349 * In the following example, the dependency can be resolved when
7350 * instantiating a child, but not when instantiating the class itself.
7351 *
7352 * <code-example path="core/di/ts/metadata_spec.ts" region="SkipSelf">
7353 * </code-example>
7354 *
7355 * @see [Dependency Injection guide](guide/dependency-injection-in-action#skip).
7356 * @see `Self`
7357 * @see `Optional`
7358 *
7359 */
7360 (): any;
7361 new (): SkipSelf;
7362}
7363
7364/**
7365 * Configures the `Injector` to return an instance of `useClass` for a token.
7366 * @see ["Dependency Injection Guide"](guide/dependency-injection).
7367 *
7368 * @usageNotes
7369 *
7370 * {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}
7371 *
7372 * Note that following two providers are not equal:
7373 *
7374 * {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}
7375 *
7376 * ### Multi-value example
7377 *
7378 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
7379 *
7380 * @publicApi
7381 */
7382export declare interface StaticClassProvider extends StaticClassSansProvider {
7383 /**
7384 * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
7385 */
7386 provide: any;
7387 /**
7388 * When true, injector returns an array of instances. This is useful to allow multiple
7389 * providers spread across many files to provide configuration information to a common token.
7390 */
7391 multi?: boolean;
7392}
7393
7394/**
7395 * Configures the `Injector` to return an instance of `useClass` for a token.
7396 * Base for `StaticClassProvider` decorator.
7397 *
7398 * @publicApi
7399 */
7400export declare interface StaticClassSansProvider {
7401 /**
7402 * An optional class to instantiate for the `token`. By default, the `provide`
7403 * class is instantiated.
7404 */
7405 useClass: Type<any>;
7406 /**
7407 * A list of `token`s to be resolved by the injector. The list of values is then
7408 * used as arguments to the `useClass` constructor.
7409 */
7410 deps: any[];
7411}
7412
7413/**
7414 * Describes how an `Injector` should be configured as static (that is, without reflection).
7415 * A static provider provides tokens to an injector for various types of dependencies.
7416 *
7417 * @see `Injector.create()`.
7418 * @see ["Dependency Injection Guide"](guide/dependency-injection-providers).
7419 *
7420 * @publicApi
7421 */
7422export declare type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[];
7423
7424declare const T_HOST = 6;
7425
7426/**
7427 * A combination of:
7428 * - Attribute names and values.
7429 * - Special markers acting as flags to alter attributes processing.
7430 * - Parsed ngProjectAs selectors.
7431 */
7432declare type TAttributes = (string | ɵAttributeMarker | CssSelector)[];
7433
7434/**
7435 * Constants that are associated with a view. Includes:
7436 * - Attribute arrays.
7437 * - Local definition arrays.
7438 * - Translated messages (i18n).
7439 */
7440declare type TConstants = (TAttributes | string)[];
7441
7442/**
7443 * Factory function that returns an array of consts. Consts can be represented as a function in
7444 * case any additional statements are required to define consts in the list. An example is i18n
7445 * where additional i18n calls are generated, which should be executed when consts are requested
7446 * for the first time.
7447 */
7448declare type TConstantsFactory = () => TConstants;
7449
7450/**
7451 * TConstants type that describes how the `consts` field is generated on ComponentDef: it can be
7452 * either an array or a factory function that returns that array.
7453 */
7454declare type TConstantsOrFactory = TConstants | TConstantsFactory;
7455
7456/** Static data for an LContainer */
7457declare interface TContainerNode extends TNode {
7458 /**
7459 * Index in the data[] array.
7460 *
7461 * If it's -1, this is a dynamically created container node that isn't stored in
7462 * data[] (e.g. when you inject ViewContainerRef) .
7463 */
7464 index: number;
7465 child: null;
7466 /**
7467 * Container nodes will have parents unless:
7468 *
7469 * - They are the first node of a component or embedded view
7470 * - They are dynamically created
7471 */
7472 parent: TElementNode | TElementContainerNode | null;
7473 tViews: TView | TView[] | null;
7474 projection: null;
7475 value: null;
7476}
7477
7478/**
7479 * Static data that corresponds to the instance-specific data array on an LView.
7480 *
7481 * Each node's static data is stored in tData at the same index that it's stored
7482 * in the data array. Any nodes that do not have static data store a null value in
7483 * tData to avoid a sparse array.
7484 *
7485 * Each pipe's definition is stored here at the same index as its pipe instance in
7486 * the data array.
7487 *
7488 * Each host property's name is stored here at the same index as its value in the
7489 * data array.
7490 *
7491 * Each property binding name is stored here at the same index as its value in
7492 * the data array. If the binding is an interpolation, the static string values
7493 * are stored parallel to the dynamic values. Example:
7494 *
7495 * id="prefix {{ v0 }} a {{ v1 }} b {{ v2 }} suffix"
7496 *
7497 * LView | TView.data
7498 *------------------------
7499 * v0 value | 'a'
7500 * v1 value | 'b'
7501 * v2 value | id � prefix � suffix
7502 *
7503 * Injector bloom filters are also stored here.
7504 */
7505declare type TData = (TNode | ɵPipeDef<any> | ɵDirectiveDef<any> | ɵComponentDef<any> | number | TStylingRange | TStylingKey | ProviderToken<any> | TI18n | I18nUpdateOpCodes | TIcu | null | string)[];
7506
7507/** Static data for an <ng-container> */
7508declare interface TElementContainerNode extends TNode {
7509 /** Index in the LView[] array. */
7510 index: number;
7511 child: TElementNode | TTextNode | TContainerNode | TElementContainerNode | TProjectionNode | null;
7512 parent: TElementNode | TElementContainerNode | null;
7513 tViews: null;
7514 projection: null;
7515}
7516
7517/** Static data for an element */
7518declare interface TElementNode extends TNode {
7519 /** Index in the data[] array */
7520 index: number;
7521 child: TElementNode | TTextNode | TElementContainerNode | TContainerNode | TProjectionNode | null;
7522 /**
7523 * Element nodes will have parents unless they are the first node of a component or
7524 * embedded view (which means their parent is in a different view and must be
7525 * retrieved using viewData[HOST_NODE]).
7526 */
7527 parent: TElementNode | TElementContainerNode | null;
7528 tViews: null;
7529 /**
7530 * If this is a component TNode with projection, this will be an array of projected
7531 * TNodes or native nodes (see TNode.projection for more info). If it's a regular element node
7532 * or a component without projection, it will be null.
7533 */
7534 projection: (TNode | RNode[])[] | null;
7535 /**
7536 * Stores TagName
7537 */
7538 value: string;
7539}
7540
7541/**
7542 * Represents an embedded template that can be used to instantiate embedded views.
7543 * To instantiate embedded views based on a template, use the `ViewContainerRef`
7544 * method `createEmbeddedView()`.
7545 *
7546 * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`
7547 * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view
7548 * is injected into the constructor of the directive,
7549 * using the `TemplateRef` token.
7550 *
7551 * You can also use a `Query` to find a `TemplateRef` associated with
7552 * a component or a directive.
7553 *
7554 * @see `ViewContainerRef`
7555 * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)
7556 *
7557 * @publicApi
7558 */
7559export declare abstract class TemplateRef<C> {
7560 /**
7561 * The anchor element in the parent view for this embedded view.
7562 *
7563 * The data-binding and injection contexts of embedded views created from this `TemplateRef`
7564 * inherit from the contexts of this location.
7565 *
7566 * Typically new embedded views are attached to the view container of this location, but in
7567 * advanced use-cases, the view can be attached to a different container while keeping the
7568 * data-binding and injection context from the original location.
7569 *
7570 */
7571 abstract get elementRef(): ElementRef;
7572 /**
7573 * Instantiates an embedded view based on this template,
7574 * and attaches it to the view container.
7575 * @param context The data-binding context of the embedded view, as declared
7576 * in the `<ng-template>` usage.
7577 * @returns The new embedded view object.
7578 */
7579 abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
7580}
7581
7582/**
7583 * The Testability service provides testing hooks that can be accessed from
7584 * the browser. Each bootstrapped Angular application on the page will have
7585 * an instance of Testability.
7586 * @publicApi
7587 */
7588export declare class Testability implements PublicTestability {
7589 private _ngZone;
7590 private _pendingCount;
7591 private _isZoneStable;
7592 private _callbacks;
7593 private taskTrackingZone;
7594 constructor(_ngZone: NgZone);
7595 private _watchAngularEvents;
7596 /**
7597 * Increases the number of pending request
7598 * @deprecated pending requests are now tracked with zones.
7599 */
7600 increasePendingRequestCount(): number;
7601 /**
7602 * Decreases the number of pending request
7603 * @deprecated pending requests are now tracked with zones
7604 */
7605 decreasePendingRequestCount(): number;
7606 /**
7607 * Whether an associated application is stable
7608 */
7609 isStable(): boolean;
7610 private _runCallbacksIfReady;
7611 private getPendingTasks;
7612 private addCallback;
7613 /**
7614 * Wait for the application to be stable with a timeout. If the timeout is reached before that
7615 * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
7616 *
7617 * @param doneCb The callback to invoke when Angular is stable or the timeout expires
7618 * whichever comes first.
7619 * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
7620 * specified, whenStable() will wait forever.
7621 * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
7622 * pending macrotasks changes. If this callback returns true doneCb will not be invoked
7623 * and no further updates will be issued.
7624 */
7625 whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void;
7626 /**
7627 * Get the number of pending requests
7628 * @deprecated pending requests are now tracked with zones
7629 */
7630 getPendingRequestCount(): number;
7631 /**
7632 * Find providers by name
7633 * @param using The root element to search from
7634 * @param provider The name of binding variable
7635 * @param exactMatch Whether using exactMatch
7636 */
7637 findProviders(using: any, provider: string, exactMatch: boolean): any[];
7638 static ɵfac: i0.ɵɵFactoryDeclaration<Testability, never>;
7639 static ɵprov: i0.ɵɵInjectableDeclaration<Testability>;
7640}
7641
7642/**
7643 * A global registry of {@link Testability} instances for specific elements.
7644 * @publicApi
7645 */
7646export declare class TestabilityRegistry {
7647 constructor();
7648 /**
7649 * Registers an application with a testability hook so that it can be tracked
7650 * @param token token of application, root element
7651 * @param testability Testability hook
7652 */
7653 registerApplication(token: any, testability: Testability): void;
7654 /**
7655 * Unregisters an application.
7656 * @param token token of application, root element
7657 */
7658 unregisterApplication(token: any): void;
7659 /**
7660 * Unregisters all applications
7661 */
7662 unregisterAllApplications(): void;
7663 /**
7664 * Get a testability hook associated with the application
7665 * @param elem root element
7666 */
7667 getTestability(elem: any): Testability | null;
7668 /**
7669 * Get all registered testabilities
7670 */
7671 getAllTestabilities(): Testability[];
7672 /**
7673 * Get all registered applications(root elements)
7674 */
7675 getAllRootElements(): any[];
7676 /**
7677 * Find testability of a node in the Tree
7678 * @param elem node
7679 * @param findInAncestors whether finding testability in ancestors if testability was not found in
7680 * current node
7681 */
7682 findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability | null;
7683 static ɵfac: i0.ɵɵFactoryDeclaration<TestabilityRegistry, never>;
7684 static ɵprov: i0.ɵɵInjectableDeclaration<TestabilityRegistry>;
7685}
7686
7687declare interface TextDef {
7688 prefix: string;
7689}
7690
7691/**
7692 * Store information for the i18n translation block.
7693 */
7694declare interface TI18n {
7695 /**
7696 * A set of OpCodes which will create the Text Nodes and ICU anchors for the translation blocks.
7697 *
7698 * NOTE: The ICU anchors are filled in with ICU Update OpCode.
7699 */
7700 create: I18nCreateOpCodes;
7701 /**
7702 * A set of OpCodes which will be executed on each change detection to determine if any changes to
7703 * DOM are required.
7704 */
7705 update: I18nUpdateOpCodes;
7706}
7707
7708declare interface TIcu {
7709 /**
7710 * Defines the ICU type of `select` or `plural`
7711 */
7712 type: IcuType;
7713 /**
7714 * Index in `LView` where the anchor node is stored. `<!-- ICU 0:0 -->`
7715 */
7716 anchorIdx: number;
7717 /**
7718 * Currently selected ICU case pointer.
7719 *
7720 * `lView[currentCaseLViewIndex]` stores the currently selected case. This is needed to know how
7721 * to clean up the current case when transitioning no the new case.
7722 *
7723 * If the value stored is:
7724 * `null`: No current case selected.
7725 * `<0`: A flag which means that the ICU just switched and that `icuUpdate` must be executed
7726 * regardless of the `mask`. (After the execution the flag is cleared)
7727 * `>=0` A currently selected case index.
7728 */
7729 currentCaseLViewIndex: number;
7730 /**
7731 * A list of case values which the current ICU will try to match.
7732 *
7733 * The last value is `other`
7734 */
7735 cases: any[];
7736 /**
7737 * A set of OpCodes to apply in order to build up the DOM render tree for the ICU
7738 */
7739 create: IcuCreateOpCodes[];
7740 /**
7741 * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.
7742 */
7743 remove: I18nRemoveOpCodes[];
7744 /**
7745 * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.
7746 */
7747 update: I18nUpdateOpCodes[];
7748}
7749
7750/**
7751 * Binding data (flyweight) for a particular node that is shared between all templates
7752 * of a specific type.
7753 *
7754 * If a property is:
7755 * - PropertyAliases: that property's data was generated and this is it
7756 * - Null: that property's data was already generated and nothing was found.
7757 * - Undefined: that property's data has not yet been generated
7758 *
7759 * see: https://en.wikipedia.org/wiki/Flyweight_pattern for more on the Flyweight pattern
7760 */
7761declare interface TNode {
7762 /** The type of the TNode. See TNodeType. */
7763 type: TNodeType;
7764 /**
7765 * Index of the TNode in TView.data and corresponding native element in LView.
7766 *
7767 * This is necessary to get from any TNode to its corresponding native element when
7768 * traversing the node tree.
7769 *
7770 * If index is -1, this is a dynamically created container node or embedded view node.
7771 */
7772 index: number;
7773 /**
7774 * Insert before existing DOM node index.
7775 *
7776 * When DOM nodes are being inserted, normally they are being appended as they are created.
7777 * Under i18n case, the translated text nodes are created ahead of time as part of the
7778 * `ɵɵi18nStart` instruction which means that this `TNode` can't just be appended and instead
7779 * needs to be inserted using `insertBeforeIndex` semantics.
7780 *
7781 * Additionally sometimes it is necessary to insert new text nodes as a child of this `TNode`. In
7782 * such a case the value stores an array of text nodes to insert.
7783 *
7784 * Example:
7785 * ```
7786 * <div i18n>
7787 * Hello <span>World</span>!
7788 * </div>
7789 * ```
7790 * In the above example the `ɵɵi18nStart` instruction can create `Hello `, `World` and `!` text
7791 * nodes. It can also insert `Hello ` and `!` text node as a child of `<div>`, but it can't
7792 * insert `World` because the `<span>` node has not yet been created. In such a case the
7793 * `<span>` `TNode` will have an array which will direct the `<span>` to not only insert
7794 * itself in front of `!` but also to insert the `World` (created by `ɵɵi18nStart`) into
7795 * `<span>` itself.
7796 *
7797 * Pseudo code:
7798 * ```
7799 * if (insertBeforeIndex === null) {
7800 * // append as normal
7801 * } else if (Array.isArray(insertBeforeIndex)) {
7802 * // First insert current `TNode` at correct location
7803 * const currentNode = lView[this.index];
7804 * parentNode.insertBefore(currentNode, lView[this.insertBeforeIndex[0]]);
7805 * // Now append all of the children
7806 * for(let i=1; i<this.insertBeforeIndex; i++) {
7807 * currentNode.appendChild(lView[this.insertBeforeIndex[i]]);
7808 * }
7809 * } else {
7810 * parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])
7811 * }
7812 * ```
7813 * - null: Append as normal using `parentNode.appendChild`
7814 * - `number`: Append using
7815 * `parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])`
7816 *
7817 * *Initialization*
7818 *
7819 * Because `ɵɵi18nStart` executes before nodes are created, on `TView.firstCreatePass` it is not
7820 * possible for `ɵɵi18nStart` to set the `insertBeforeIndex` value as the corresponding `TNode`
7821 * has not yet been created. For this reason the `ɵɵi18nStart` creates a `TNodeType.Placeholder`
7822 * `TNode` at that location. See `TNodeType.Placeholder` for more information.
7823 */
7824 insertBeforeIndex: InsertBeforeIndex;
7825 /**
7826 * The index of the closest injector in this node's LView.
7827 *
7828 * If the index === -1, there is no injector on this node or any ancestor node in this view.
7829 *
7830 * If the index !== -1, it is the index of this node's injector OR the index of a parent
7831 * injector in the same view. We pass the parent injector index down the node tree of a view so
7832 * it's possible to find the parent injector without walking a potentially deep node tree.
7833 * Injector indices are not set across view boundaries because there could be multiple component
7834 * hosts.
7835 *
7836 * If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent
7837 * injector.
7838 */
7839 injectorIndex: number;
7840 /**
7841 * Stores starting index of the directives.
7842 *
7843 * NOTE: The first directive is always component (if present).
7844 */
7845 directiveStart: number;
7846 /**
7847 * Stores final exclusive index of the directives.
7848 *
7849 * The area right behind the `directiveStart-directiveEnd` range is used to allocate the
7850 * `HostBindingFunction` `vars` (or null if no bindings.) Therefore `directiveEnd` is used to set
7851 * `LFrame.bindingRootIndex` before `HostBindingFunction` is executed.
7852 */
7853 directiveEnd: number;
7854 /**
7855 * Stores the last directive which had a styling instruction.
7856 *
7857 * Initial value of this is `-1` which means that no `hostBindings` styling instruction has
7858 * executed. As `hostBindings` instructions execute they set the value to the index of the
7859 * `DirectiveDef` which contained the last `hostBindings` styling instruction.
7860 *
7861 * Valid values are:
7862 * - `-1` No `hostBindings` instruction has executed.
7863 * - `directiveStart <= directiveStylingLast < directiveEnd`: Points to the `DirectiveDef` of
7864 * the last styling instruction which executed in the `hostBindings`.
7865 *
7866 * This data is needed so that styling instructions know which static styling data needs to be
7867 * collected from the `DirectiveDef.hostAttrs`. A styling instruction needs to collect all data
7868 * since last styling instruction.
7869 */
7870 directiveStylingLast: number;
7871 /**
7872 * Stores indexes of property bindings. This field is only set in the ngDevMode and holds
7873 * indexes of property bindings so TestBed can get bound property metadata for a given node.
7874 */
7875 propertyBindings: number[] | null;
7876 /**
7877 * Stores if Node isComponent, isProjected, hasContentQuery, hasClassInput and hasStyleInput
7878 * etc.
7879 */
7880 flags: TNodeFlags;
7881 /**
7882 * This number stores two values using its bits:
7883 *
7884 * - the index of the first provider on that node (first 16 bits)
7885 * - the count of view providers from the component on this node (last 16 bits)
7886 */
7887 providerIndexes: TNodeProviderIndexes;
7888 /**
7889 * The value name associated with this node.
7890 * if type:
7891 * `TNodeType.Text`: text value
7892 * `TNodeType.Element`: tag name
7893 * `TNodeType.ICUContainer`: `TIcu`
7894 */
7895 value: any;
7896 /**
7897 * Attributes associated with an element. We need to store attributes to support various
7898 * use-cases (attribute injection, content projection with selectors, directives matching).
7899 * Attributes are stored statically because reading them from the DOM would be way too slow for
7900 * content projection and queries.
7901 *
7902 * Since attrs will always be calculated first, they will never need to be marked undefined by
7903 * other instructions.
7904 *
7905 * For regular attributes a name of an attribute and its value alternate in the array.
7906 * e.g. ['role', 'checkbox']
7907 * This array can contain flags that will indicate "special attributes" (attributes with
7908 * namespaces, attributes extracted from bindings and outputs).
7909 */
7910 attrs: TAttributes | null;
7911 /**
7912 * Same as `TNode.attrs` but contains merged data across all directive host bindings.
7913 *
7914 * We need to keep `attrs` as unmerged so that it can be used for attribute selectors.
7915 * We merge attrs here so that it can be used in a performant way for initial rendering.
7916 *
7917 * The `attrs` are merged in first pass in following order:
7918 * - Component's `hostAttrs`
7919 * - Directives' `hostAttrs`
7920 * - Template `TNode.attrs` associated with the current `TNode`.
7921 */
7922 mergedAttrs: TAttributes | null;
7923 /**
7924 * A set of local names under which a given element is exported in a template and
7925 * visible to queries. An entry in this array can be created for different reasons:
7926 * - an element itself is referenced, ex.: `<div #foo>`
7927 * - a component is referenced, ex.: `<my-cmpt #foo>`
7928 * - a directive is referenced, ex.: `<my-cmpt #foo="directiveExportAs">`.
7929 *
7930 * A given element might have different local names and those names can be associated
7931 * with a directive. We store local names at even indexes while odd indexes are reserved
7932 * for directive index in a view (or `-1` if there is no associated directive).
7933 *
7934 * Some examples:
7935 * - `<div #foo>` => `["foo", -1]`
7936 * - `<my-cmpt #foo>` => `["foo", myCmptIdx]`
7937 * - `<my-cmpt #foo #bar="directiveExportAs">` => `["foo", myCmptIdx, "bar", directiveIdx]`
7938 * - `<div #foo #bar="directiveExportAs">` => `["foo", -1, "bar", directiveIdx]`
7939 */
7940 localNames: (string | number)[] | null;
7941 /** Information about input properties that need to be set once from attribute data. */
7942 initialInputs: InitialInputData | null | undefined;
7943 /**
7944 * Input data for all directives on this node. `null` means that there are no directives with
7945 * inputs on this node.
7946 */
7947 inputs: PropertyAliases | null;
7948 /**
7949 * Output data for all directives on this node. `null` means that there are no directives with
7950 * outputs on this node.
7951 */
7952 outputs: PropertyAliases | null;
7953 /**
7954 * The TView or TViews attached to this node.
7955 *
7956 * If this TNode corresponds to an LContainer with inline views, the container will
7957 * need to store separate static data for each of its view blocks (TView[]). Otherwise,
7958 * nodes in inline views with the same index as nodes in their parent views will overwrite
7959 * each other, as they are in the same template.
7960 *
7961 * Each index in this array corresponds to the static data for a certain
7962 * view. So if you had V(0) and V(1) in a container, you might have:
7963 *
7964 * [
7965 * [{tagName: 'div', attrs: ...}, null], // V(0) TView
7966 * [{tagName: 'button', attrs ...}, null] // V(1) TView
7967 *
7968 * If this TNode corresponds to an LContainer with a template (e.g. structural
7969 * directive), the template's TView will be stored here.
7970 *
7971 * If this TNode corresponds to an element, tViews will be null .
7972 */
7973 tViews: TView | TView[] | null;
7974 /**
7975 * The next sibling node. Necessary so we can propagate through the root nodes of a view
7976 * to insert them or remove them from the DOM.
7977 */
7978 next: TNode | null;
7979 /**
7980 * The next projected sibling. Since in Angular content projection works on the node-by-node
7981 * basis the act of projecting nodes might change nodes relationship at the insertion point
7982 * (target view). At the same time we need to keep initial relationship between nodes as
7983 * expressed in content view.
7984 */
7985 projectionNext: TNode | null;
7986 /**
7987 * First child of the current node.
7988 *
7989 * For component nodes, the child will always be a ContentChild (in same view).
7990 * For embedded view nodes, the child will be in their child view.
7991 */
7992 child: TNode | null;
7993 /**
7994 * Parent node (in the same view only).
7995 *
7996 * We need a reference to a node's parent so we can append the node to its parent's native
7997 * element at the appropriate time.
7998 *
7999 * If the parent would be in a different view (e.g. component host), this property will be null.
8000 * It's important that we don't try to cross component boundaries when retrieving the parent
8001 * because the parent will change (e.g. index, attrs) depending on where the component was
8002 * used (and thus shouldn't be stored on TNode). In these cases, we retrieve the parent through
8003 * LView.node instead (which will be instance-specific).
8004 *
8005 * If this is an inline view node (V), the parent will be its container.
8006 */
8007 parent: TElementNode | TContainerNode | null;
8008 /**
8009 * List of projected TNodes for a given component host element OR index into the said nodes.
8010 *
8011 * For easier discussion assume this example:
8012 * `<parent>`'s view definition:
8013 * ```
8014 * <child id="c1">content1</child>
8015 * <child id="c2"><span>content2</span></child>
8016 * ```
8017 * `<child>`'s view definition:
8018 * ```
8019 * <ng-content id="cont1"></ng-content>
8020 * ```
8021 *
8022 * If `Array.isArray(projection)` then `TNode` is a host element:
8023 * - `projection` stores the content nodes which are to be projected.
8024 * - The nodes represent categories defined by the selector: For example:
8025 * `<ng-content/><ng-content select="abc"/>` would represent the heads for `<ng-content/>`
8026 * and `<ng-content select="abc"/>` respectively.
8027 * - The nodes we store in `projection` are heads only, we used `.next` to get their
8028 * siblings.
8029 * - The nodes `.next` is sorted/rewritten as part of the projection setup.
8030 * - `projection` size is equal to the number of projections `<ng-content>`. The size of
8031 * `c1` will be `1` because `<child>` has only one `<ng-content>`.
8032 * - we store `projection` with the host (`c1`, `c2`) rather than the `<ng-content>` (`cont1`)
8033 * because the same component (`<child>`) can be used in multiple locations (`c1`, `c2`) and
8034 * as a result have different set of nodes to project.
8035 * - without `projection` it would be difficult to efficiently traverse nodes to be projected.
8036 *
8037 * If `typeof projection == 'number'` then `TNode` is a `<ng-content>` element:
8038 * - `projection` is an index of the host's `projection`Nodes.
8039 * - This would return the first head node to project:
8040 * `getHost(currentTNode).projection[currentTNode.projection]`.
8041 * - When projecting nodes the parent node retrieved may be a `<ng-content>` node, in which case
8042 * the process is recursive in nature.
8043 *
8044 * If `projection` is of type `RNode[][]` than we have a collection of native nodes passed as
8045 * projectable nodes during dynamic component creation.
8046 */
8047 projection: (TNode | RNode[])[] | number | null;
8048 /**
8049 * A collection of all `style` static values for an element (including from host).
8050 *
8051 * This field will be populated if and when:
8052 *
8053 * - There are one or more initial `style`s on an element (e.g. `<div style="width:200px;">`)
8054 * - There are one or more initial `style`s on a directive/component host
8055 * (e.g. `@Directive({host: {style: "width:200px;" } }`)
8056 */
8057 styles: string | null;
8058 /**
8059 * A collection of all `style` static values for an element excluding host sources.
8060 *
8061 * Populated when there are one or more initial `style`s on an element
8062 * (e.g. `<div style="width:200px;">`)
8063 * Must be stored separately from `tNode.styles` to facilitate setting directive
8064 * inputs that shadow the `style` property. If we used `tNode.styles` as is for shadowed inputs,
8065 * we would feed host styles back into directives as "inputs". If we used `tNode.attrs`, we
8066 * would have to concatenate the attributes on every template pass. Instead, we process once on
8067 * first create pass and store here.
8068 */
8069 stylesWithoutHost: string | null;
8070 /**
8071 * A `KeyValueArray` version of residual `styles`.
8072 *
8073 * When there are styling instructions than each instruction stores the static styling
8074 * which is of lower priority than itself. This means that there may be a higher priority
8075 * styling than the instruction.
8076 *
8077 * Imagine:
8078 * ```
8079 * <div style="color: highest;" my-dir>
8080 *
8081 * @Directive({
8082 * host: {
8083 * style: 'color: lowest; ',
8084 * '[styles.color]': 'exp' // ɵɵstyleProp('color', ctx.exp);
8085 * }
8086 * })
8087 * ```
8088 *
8089 * In the above case:
8090 * - `color: lowest` is stored with `ɵɵstyleProp('color', ctx.exp);` instruction
8091 * - `color: highest` is the residual and is stored here.
8092 *
8093 * - `undefined': not initialized.
8094 * - `null`: initialized but `styles` is `null`
8095 * - `KeyValueArray`: parsed version of `styles`.
8096 */
8097 residualStyles: KeyValueArray<any> | undefined | null;
8098 /**
8099 * A collection of all class static values for an element (including from host).
8100 *
8101 * This field will be populated if and when:
8102 *
8103 * - There are one or more initial classes on an element (e.g. `<div class="one two three">`)
8104 * - There are one or more initial classes on an directive/component host
8105 * (e.g. `@Directive({host: {class: "SOME_CLASS" } }`)
8106 */
8107 classes: string | null;
8108 /**
8109 * A collection of all class static values for an element excluding host sources.
8110 *
8111 * Populated when there are one or more initial classes on an element
8112 * (e.g. `<div class="SOME_CLASS">`)
8113 * Must be stored separately from `tNode.classes` to facilitate setting directive
8114 * inputs that shadow the `class` property. If we used `tNode.classes` as is for shadowed
8115 * inputs, we would feed host classes back into directives as "inputs". If we used
8116 * `tNode.attrs`, we would have to concatenate the attributes on every template pass. Instead,
8117 * we process once on first create pass and store here.
8118 */
8119 classesWithoutHost: string | null;
8120 /**
8121 * A `KeyValueArray` version of residual `classes`.
8122 *
8123 * Same as `TNode.residualStyles` but for classes.
8124 *
8125 * - `undefined': not initialized.
8126 * - `null`: initialized but `classes` is `null`
8127 * - `KeyValueArray`: parsed version of `classes`.
8128 */
8129 residualClasses: KeyValueArray<any> | undefined | null;
8130 /**
8131 * Stores the head/tail index of the class bindings.
8132 *
8133 * - If no bindings, the head and tail will both be 0.
8134 * - If there are template bindings, stores the head/tail of the class bindings in the template.
8135 * - If no template bindings but there are host bindings, the head value will point to the last
8136 * host binding for "class" (not the head of the linked list), tail will be 0.
8137 *
8138 * See: `style_binding_list.ts` for details.
8139 *
8140 * This is used by `insertTStylingBinding` to know where the next styling binding should be
8141 * inserted so that they can be sorted in priority order.
8142 */
8143 classBindings: TStylingRange;
8144 /**
8145 * Stores the head/tail index of the class bindings.
8146 *
8147 * - If no bindings, the head and tail will both be 0.
8148 * - If there are template bindings, stores the head/tail of the style bindings in the template.
8149 * - If no template bindings but there are host bindings, the head value will point to the last
8150 * host binding for "style" (not the head of the linked list), tail will be 0.
8151 *
8152 * See: `style_binding_list.ts` for details.
8153 *
8154 * This is used by `insertTStylingBinding` to know where the next styling binding should be
8155 * inserted so that they can be sorted in priority order.
8156 */
8157 styleBindings: TStylingRange;
8158}
8159
8160/**
8161 * Corresponds to the TNode.flags property.
8162 */
8163declare const enum TNodeFlags {
8164 /** Bit #1 - This bit is set if the node is a host for any directive (including a component) */
8165 isDirectiveHost = 1,
8166 /**
8167 * Bit #2 - This bit is set if the node is a host for a component.
8168 *
8169 * Setting this bit implies that the `isDirectiveHost` bit is set as well.
8170 * */
8171 isComponentHost = 2,
8172 /** Bit #3 - This bit is set if the node has been projected */
8173 isProjected = 4,
8174 /** Bit #4 - This bit is set if any directive on this node has content queries */
8175 hasContentQuery = 8,
8176 /** Bit #5 - This bit is set if the node has any "class" inputs */
8177 hasClassInput = 16,
8178 /** Bit #6 - This bit is set if the node has any "style" inputs */
8179 hasStyleInput = 32,
8180 /** Bit #7 This bit is set if the node has been detached by i18n */
8181 isDetached = 64,
8182 /**
8183 * Bit #8 - This bit is set if the node has directives with host bindings.
8184 *
8185 * This flags allows us to guard host-binding logic and invoke it only on nodes
8186 * that actually have directives with host bindings.
8187 */
8188 hasHostBindings = 128
8189}
8190
8191/**
8192 * Corresponds to the TNode.providerIndexes property.
8193 */
8194declare const enum TNodeProviderIndexes {
8195 /** The index of the first provider on this node is encoded on the least significant bits. */
8196 ProvidersStartIndexMask = 1048575,
8197 /**
8198 * The count of view providers from the component on this node is
8199 * encoded on the 20 most significant bits.
8200 */
8201 CptViewProvidersCountShift = 20,
8202 CptViewProvidersCountShifter = 1048576
8203}
8204
8205/**
8206 * TNodeType corresponds to the {@link TNode} `type` property.
8207 *
8208 * NOTE: type IDs are such that we use each bit to denote a type. This is done so that we can easily
8209 * check if the `TNode` is of more than one type.
8210 *
8211 * `if (tNode.type === TNodeType.Text || tNode.type === TNode.Element)`
8212 * can be written as:
8213 * `if (tNode.type & (TNodeType.Text | TNodeType.Element))`
8214 *
8215 * However any given `TNode` can only be of one type.
8216 */
8217declare const enum TNodeType {
8218 /**
8219 * The TNode contains information about a DOM element aka {@link RText}.
8220 */
8221 Text = 1,
8222 /**
8223 * The TNode contains information about a DOM element aka {@link RElement}.
8224 */
8225 Element = 2,
8226 /**
8227 * The TNode contains information about an {@link LContainer} for embedded views.
8228 */
8229 Container = 4,
8230 /**
8231 * The TNode contains information about an `<ng-container>` element {@link RNode}.
8232 */
8233 ElementContainer = 8,
8234 /**
8235 * The TNode contains information about an `<ng-content>` projection
8236 */
8237 Projection = 16,
8238 /**
8239 * The TNode contains information about an ICU comment used in `i18n`.
8240 */
8241 Icu = 32,
8242 /**
8243 * Special node type representing a placeholder for future `TNode` at this location.
8244 *
8245 * I18n translation blocks are created before the element nodes which they contain. (I18n blocks
8246 * can span over many elements.) Because i18n `TNode`s (representing text) are created first they
8247 * often may need to point to element `TNode`s which are not yet created. In such a case we create
8248 * a `Placeholder` `TNode`. This allows the i18n to structurally link the `TNode`s together
8249 * without knowing any information about the future nodes which will be at that location.
8250 *
8251 * On `firstCreatePass` When element instruction executes it will try to create a `TNode` at that
8252 * location. Seeing a `Placeholder` `TNode` already there tells the system that it should reuse
8253 * existing `TNode` (rather than create a new one) and just update the missing information.
8254 */
8255 Placeholder = 64,
8256 AnyRNode = 3,
8257 AnyContainer = 12
8258}
8259
8260/**
8261 * Type representing a set of TNodes that can have local refs (`#foo`) placed on them.
8262 */
8263declare type TNodeWithLocalRefs = TContainerNode | TElementNode | TElementContainerNode;
8264
8265/** Static data for an LProjectionNode */
8266declare interface TProjectionNode extends TNode {
8267 /** Index in the data[] array */
8268 child: null;
8269 /**
8270 * Projection nodes will have parents unless they are the first node of a component
8271 * or embedded view (which means their parent is in a different view and must be
8272 * retrieved using LView.node).
8273 */
8274 parent: TElementNode | TElementContainerNode | null;
8275 tViews: null;
8276 /** Index of the projection node. (See TNode.projection for more info.) */
8277 projection: number;
8278 value: null;
8279}
8280
8281/**
8282 * TQueries represent a collection of individual TQuery objects tracked in a given view. Most of the
8283 * methods on this interface are simple proxy methods to the corresponding functionality on TQuery.
8284 */
8285declare interface TQueries {
8286 /**
8287 * Adds a new TQuery to a collection of queries tracked in a given view.
8288 * @param tQuery
8289 */
8290 track(tQuery: TQuery): void;
8291 /**
8292 * Returns a TQuery instance for at the given index in the queries array.
8293 * @param index
8294 */
8295 getByIndex(index: number): TQuery;
8296 /**
8297 * Returns the number of queries tracked in a given view.
8298 */
8299 length: number;
8300 /**
8301 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8302 * `elementStart` on each and every TQuery.
8303 * @param tView
8304 * @param tNode
8305 */
8306 elementStart(tView: TView, tNode: TNode): void;
8307 /**
8308 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8309 * `elementEnd` on each and every TQuery.
8310 * @param tNode
8311 */
8312 elementEnd(tNode: TNode): void;
8313 /**
8314 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8315 * `template` on each and every TQuery.
8316 * @param tView
8317 * @param tNode
8318 */
8319 template(tView: TView, tNode: TNode): void;
8320 /**
8321 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8322 * `embeddedTView` on each and every TQuery.
8323 * @param tNode
8324 */
8325 embeddedTView(tNode: TNode): TQueries | null;
8326}
8327
8328/**
8329 * TQuery objects represent all the query-related data that remain the same from one view instance
8330 * to another and can be determined on the very first template pass. Most notably TQuery holds all
8331 * the matches for a given view.
8332 */
8333declare interface TQuery {
8334 /**
8335 * Query metadata extracted from query annotations.
8336 */
8337 metadata: TQueryMetadata;
8338 /**
8339 * Index of a query in a declaration view in case of queries propagated to en embedded view, -1
8340 * for queries declared in a given view. We are storing this index so we can find a parent query
8341 * to clone for an embedded view (when an embedded view is created).
8342 */
8343 indexInDeclarationView: number;
8344 /**
8345 * Matches collected on the first template pass. Each match is a pair of:
8346 * - TNode index;
8347 * - match index;
8348 *
8349 * A TNode index can be either:
8350 * - a positive number (the most common case) to indicate a matching TNode;
8351 * - a negative number to indicate that a given query is crossing a <ng-template> element and
8352 * results from views created based on TemplateRef should be inserted at this place.
8353 *
8354 * A match index is a number used to find an actual value (for a given node) when query results
8355 * are materialized. This index can have one of the following values:
8356 * - -2 - indicates that we need to read a special token (TemplateRef, ViewContainerRef etc.);
8357 * - -1 - indicates that we need to read a default value based on the node type (TemplateRef for
8358 * ng-template and ElementRef for other elements);
8359 * - a positive number - index of an injectable to be read from the element injector.
8360 */
8361 matches: number[] | null;
8362 /**
8363 * A flag indicating if a given query crosses an <ng-template> element. This flag exists for
8364 * performance reasons: we can notice that queries not crossing any <ng-template> elements will
8365 * have matches from a given view only (and adapt processing accordingly).
8366 */
8367 crossesNgTemplate: boolean;
8368 /**
8369 * A method call when a given query is crossing an element (or element container). This is where a
8370 * given TNode is matched against a query predicate.
8371 * @param tView
8372 * @param tNode
8373 */
8374 elementStart(tView: TView, tNode: TNode): void;
8375 /**
8376 * A method called when processing the elementEnd instruction - this is mostly useful to determine
8377 * if a given content query should match any nodes past this point.
8378 * @param tNode
8379 */
8380 elementEnd(tNode: TNode): void;
8381 /**
8382 * A method called when processing the template instruction. This is where a
8383 * given TContainerNode is matched against a query predicate.
8384 * @param tView
8385 * @param tNode
8386 */
8387 template(tView: TView, tNode: TNode): void;
8388 /**
8389 * A query-related method called when an embedded TView is created based on the content of a
8390 * <ng-template> element. We call this method to determine if a given query should be propagated
8391 * to the embedded view and if so - return a cloned TQuery for this embedded view.
8392 * @param tNode
8393 * @param childQueryIndex
8394 */
8395 embeddedTView(tNode: TNode, childQueryIndex: number): TQuery | null;
8396}
8397
8398/**
8399 * An object representing query metadata extracted from query annotations.
8400 */
8401declare interface TQueryMetadata {
8402 predicate: ProviderToken<unknown> | string[];
8403 read: any;
8404 flags: QueryFlags;
8405}
8406
8407/**
8408 * A function optionally passed into the `NgForOf` directive to customize how `NgForOf` uniquely
8409 * identifies items in an iterable.
8410 *
8411 * `NgForOf` needs to uniquely identify items in the iterable to correctly perform DOM updates
8412 * when items in the iterable are reordered, new items are added, or existing items are removed.
8413 *
8414 *
8415 * In all of these scenarios it is usually desirable to only update the DOM elements associated
8416 * with the items affected by the change. This behavior is important to:
8417 *
8418 * - preserve any DOM-specific UI state (like cursor position, focus, text selection) when the
8419 * iterable is modified
8420 * - enable animation of item addition, removal, and iterable reordering
8421 * - preserve the value of the `<select>` element when nested `<option>` elements are dynamically
8422 * populated using `NgForOf` and the bound iterable is updated
8423 *
8424 * A common use for custom `trackBy` functions is when the model that `NgForOf` iterates over
8425 * contains a property with a unique identifier. For example, given a model:
8426 *
8427 * ```ts
8428 * class User {
8429 * id: number;
8430 * name: string;
8431 * ...
8432 * }
8433 * ```
8434 * a custom `trackBy` function could look like the following:
8435 * ```ts
8436 * function userTrackBy(index, user) {
8437 * return user.id;
8438 * }
8439 * ```
8440 *
8441 * A custom `trackBy` function must have several properties:
8442 *
8443 * - be [idempotent](https://en.wikipedia.org/wiki/Idempotence) (be without side effects, and always
8444 * return the same value for a given input)
8445 * - return unique value for all unique inputs
8446 * - be fast
8447 *
8448 * @see [`NgForOf#ngForTrackBy`](api/common/NgForOf#ngForTrackBy)
8449 * @publicApi
8450 */
8451export declare interface TrackByFunction<T> {
8452 /**
8453 * @param index The index of the item within the iterable.
8454 * @param item The item in the iterable.
8455 */
8456 <U extends T>(index: number, item: T & U): any;
8457}
8458
8459/**
8460 * Use this token at bootstrap to provide the content of your translation file (`xtb`,
8461 * `xlf` or `xlf2`) when you want to translate your application in another language.
8462 *
8463 * See the [i18n guide](guide/i18n-common-merge) for more information.
8464 *
8465 * @usageNotes
8466 * ### Example
8467 *
8468 * ```typescript
8469 * import { TRANSLATIONS } from '@angular/core';
8470 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
8471 * import { AppModule } from './app/app.module';
8472 *
8473 * // content of your translation file
8474 * const translations = '....';
8475 *
8476 * platformBrowserDynamic().bootstrapModule(AppModule, {
8477 * providers: [{provide: TRANSLATIONS, useValue: translations }]
8478 * });
8479 * ```
8480 *
8481 * @publicApi
8482 */
8483export declare const TRANSLATIONS: InjectionToken<string>;
8484
8485/**
8486 * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,
8487 * `xlf` or `xlf2`.
8488 *
8489 * See the [i18n guide](guide/i18n-common-merge) for more information.
8490 *
8491 * @usageNotes
8492 * ### Example
8493 *
8494 * ```typescript
8495 * import { TRANSLATIONS_FORMAT } from '@angular/core';
8496 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
8497 * import { AppModule } from './app/app.module';
8498 *
8499 * platformBrowserDynamic().bootstrapModule(AppModule, {
8500 * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]
8501 * });
8502 * ```
8503 *
8504 * @publicApi
8505 */
8506export declare const TRANSLATIONS_FORMAT: InjectionToken<string>;
8507
8508declare const TRANSPLANTED_VIEWS_TO_REFRESH = 5;
8509
8510
8511/**
8512 * @fileoverview
8513 * While Angular only uses Trusted Types internally for the time being,
8514 * references to Trusted Types could leak into our core.d.ts, which would force
8515 * anyone compiling against @angular/core to provide the @types/trusted-types
8516 * package in their compilation unit.
8517 *
8518 * Until https://github.com/microsoft/TypeScript/issues/30024 is resolved, we
8519 * will keep Angular's public API surface free of references to Trusted Types.
8520 * For internal and semi-private APIs that need to reference Trusted Types, the
8521 * minimal type definitions for the Trusted Types API provided by this module
8522 * should be used instead. They are marked as "declare" to prevent them from
8523 * being renamed by compiler optimization.
8524 *
8525 * Adapted from
8526 * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/trusted-types/index.d.ts
8527 * but restricted to the API surface used within Angular.
8528 */
8529declare interface TrustedHTML {
8530 __brand__: 'TrustedHTML';
8531}
8532
8533declare interface TrustedScript {
8534 __brand__: 'TrustedScript';
8535}
8536
8537declare interface TrustedScriptURL {
8538 __brand__: 'TrustedScriptURL';
8539}
8540
8541/**
8542 * Value stored in the `TData` which is needed to re-concatenate the styling.
8543 *
8544 * See: `TStylingKeyPrimitive` and `TStylingStatic`
8545 */
8546declare type TStylingKey = TStylingKeyPrimitive | TStylingStatic;
8547
8548/**
8549 * The primitive portion (`TStylingStatic` removed) of the value stored in the `TData` which is
8550 * needed to re-concatenate the styling.
8551 *
8552 * - `string`: Stores the property name. Used with `ɵɵstyleProp`/`ɵɵclassProp` instruction.
8553 * - `null`: Represents map, so there is no name. Used with `ɵɵstyleMap`/`ɵɵclassMap`.
8554 * - `false`: Represents an ignore case. This happens when `ɵɵstyleProp`/`ɵɵclassProp` instruction
8555 * is combined with directive which shadows its input `@Input('class')`. That way the binding
8556 * should not participate in the styling resolution.
8557 */
8558declare type TStylingKeyPrimitive = string | null | false;
8559
8560/**
8561 * This is a branded number which contains previous and next index.
8562 *
8563 * When we come across styling instructions we need to store the `TStylingKey` in the correct
8564 * order so that we can re-concatenate the styling value in the desired priority.
8565 *
8566 * The insertion can happen either at the:
8567 * - end of template as in the case of coming across additional styling instruction in the template
8568 * - in front of the template in the case of coming across additional instruction in the
8569 * `hostBindings`.
8570 *
8571 * We use `TStylingRange` to store the previous and next index into the `TData` where the template
8572 * bindings can be found.
8573 *
8574 * - bit 0 is used to mark that the previous index has a duplicate for current value.
8575 * - bit 1 is used to mark that the next index has a duplicate for the current value.
8576 * - bits 2-16 are used to encode the next/tail of the template.
8577 * - bits 17-32 are used to encode the previous/head of template.
8578 *
8579 * NODE: *duplicate* false implies that it is statically known that this binding will not collide
8580 * with other bindings and therefore there is no need to check other bindings. For example the
8581 * bindings in `<div [style.color]="exp" [style.width]="exp">` will never collide and will have
8582 * their bits set accordingly. Previous duplicate means that we may need to check previous if the
8583 * current binding is `null`. Next duplicate means that we may need to check next bindings if the
8584 * current binding is not `null`.
8585 *
8586 * NOTE: `0` has special significance and represents `null` as in no additional pointer.
8587 */
8588declare interface TStylingRange {
8589 __brand__: 'TStylingRange';
8590}
8591
8592/**
8593 * Store the static values for the styling binding.
8594 *
8595 * The `TStylingStatic` is just `KeyValueArray` where key `""` (stored at location 0) contains the
8596 * `TStylingKey` (stored at location 1). In other words this wraps the `TStylingKey` such that the
8597 * `""` contains the wrapped value.
8598 *
8599 * When instructions are resolving styling they may need to look forward or backwards in the linked
8600 * list to resolve the value. For this reason we have to make sure that he linked list also contains
8601 * the static values. However the list only has space for one item per styling instruction. For this
8602 * reason we store the static values here as part of the `TStylingKey`. This means that the
8603 * resolution function when looking for a value needs to first look at the binding value, and than
8604 * at `TStylingKey` (if it exists).
8605 *
8606 * Imagine we have:
8607 *
8608 * ```
8609 * <div class="TEMPLATE" my-dir>
8610 *
8611 * @Directive({
8612 * host: {
8613 * class: 'DIR',
8614 * '[class.dynamic]': 'exp' // ɵɵclassProp('dynamic', ctx.exp);
8615 * }
8616 * })
8617 * ```
8618 *
8619 * In the above case the linked list will contain one item:
8620 *
8621 * ```
8622 * // assume binding location: 10 for `ɵɵclassProp('dynamic', ctx.exp);`
8623 * tData[10] = <TStylingStatic>[
8624 * '': 'dynamic', // This is the wrapped value of `TStylingKey`
8625 * 'DIR': true, // This is the default static value of directive binding.
8626 * ];
8627 * tData[10 + 1] = 0; // We don't have prev/next.
8628 *
8629 * lView[10] = undefined; // assume `ctx.exp` is `undefined`
8630 * lView[10 + 1] = undefined; // Just normalized `lView[10]`
8631 * ```
8632 *
8633 * So when the function is resolving styling value, it first needs to look into the linked list
8634 * (there is none) and than into the static `TStylingStatic` too see if there is a default value for
8635 * `dynamic` (there is not). Therefore it is safe to remove it.
8636 *
8637 * If setting `true` case:
8638 * ```
8639 * lView[10] = true; // assume `ctx.exp` is `true`
8640 * lView[10 + 1] = true; // Just normalized `lView[10]`
8641 * ```
8642 * So when the function is resolving styling value, it first needs to look into the linked list
8643 * (there is none) and than into `TNode.residualClass` (TNode.residualStyle) which contains
8644 * ```
8645 * tNode.residualClass = [
8646 * 'TEMPLATE': true,
8647 * ];
8648 * ```
8649 *
8650 * This means that it is safe to add class.
8651 */
8652declare interface TStylingStatic extends KeyValueArray<any> {
8653}
8654
8655/** Static data for a text node */
8656declare interface TTextNode extends TNode {
8657 /** Index in the data[] array */
8658 index: number;
8659 child: null;
8660 /**
8661 * Text nodes will have parents unless they are the first node of a component or
8662 * embedded view (which means their parent is in a different view and must be
8663 * retrieved using LView.node).
8664 */
8665 parent: TElementNode | TElementContainerNode | null;
8666 tViews: null;
8667 projection: null;
8668}
8669
8670declare const TVIEW = 1;
8671
8672/**
8673 * The static data for an LView (shared between all templates of a
8674 * given type).
8675 *
8676 * Stored on the `ComponentDef.tView`.
8677 */
8678declare interface TView {
8679 /**
8680 * Type of `TView` (`Root`|`Component`|`Embedded`).
8681 */
8682 type: TViewType;
8683 /**
8684 * This is a blueprint used to generate LView instances for this TView. Copying this
8685 * blueprint is faster than creating a new LView from scratch.
8686 */
8687 blueprint: LView;
8688 /**
8689 * The template function used to refresh the view of dynamically created views
8690 * and components. Will be null for inline views.
8691 */
8692 template: ComponentTemplate<{}> | null;
8693 /**
8694 * A function containing query-related instructions.
8695 */
8696 viewQuery: ViewQueriesFunction<{}> | null;
8697 /**
8698 * A `TNode` representing the declaration location of this `TView` (not part of this TView).
8699 */
8700 declTNode: TNode | null;
8701 /** Whether or not this template has been processed in creation mode. */
8702 firstCreatePass: boolean;
8703 /**
8704 * Whether or not this template has been processed in update mode (e.g. change detected)
8705 *
8706 * `firstUpdatePass` is used by styling to set up `TData` to contain metadata about the styling
8707 * instructions. (Mainly to build up a linked list of styling priority order.)
8708 *
8709 * Typically this function gets cleared after first execution. If exception is thrown then this
8710 * flag can remain turned un until there is first successful (no exception) pass. This means that
8711 * individual styling instructions keep track of if they have already been added to the linked
8712 * list to prevent double adding.
8713 */
8714 firstUpdatePass: boolean;
8715 /** Static data equivalent of LView.data[]. Contains TNodes, PipeDefInternal or TI18n. */
8716 data: TData;
8717 /**
8718 * The binding start index is the index at which the data array
8719 * starts to store bindings only. Saving this value ensures that we
8720 * will begin reading bindings at the correct point in the array when
8721 * we are in update mode.
8722 *
8723 * -1 means that it has not been initialized.
8724 */
8725 bindingStartIndex: number;
8726 /**
8727 * The index where the "expando" section of `LView` begins. The expando
8728 * section contains injectors, directive instances, and host binding values.
8729 * Unlike the "decls" and "vars" sections of `LView`, the length of this
8730 * section cannot be calculated at compile-time because directives are matched
8731 * at runtime to preserve locality.
8732 *
8733 * We store this start index so we know where to start checking host bindings
8734 * in `setHostBindings`.
8735 */
8736 expandoStartIndex: number;
8737 /**
8738 * Whether or not there are any static view queries tracked on this view.
8739 *
8740 * We store this so we know whether or not we should do a view query
8741 * refresh after creation mode to collect static query results.
8742 */
8743 staticViewQueries: boolean;
8744 /**
8745 * Whether or not there are any static content queries tracked on this view.
8746 *
8747 * We store this so we know whether or not we should do a content query
8748 * refresh after creation mode to collect static query results.
8749 */
8750 staticContentQueries: boolean;
8751 /**
8752 * A reference to the first child node located in the view.
8753 */
8754 firstChild: TNode | null;
8755 /**
8756 * Stores the OpCodes to be replayed during change-detection to process the `HostBindings`
8757 *
8758 * See `HostBindingOpCodes` for encoding details.
8759 */
8760 hostBindingOpCodes: HostBindingOpCodes | null;
8761 /**
8762 * Full registry of directives and components that may be found in this view.
8763 *
8764 * It's necessary to keep a copy of the full def list on the TView so it's possible
8765 * to render template functions without a host component.
8766 */
8767 directiveRegistry: DirectiveDefList | null;
8768 /**
8769 * Full registry of pipes that may be found in this view.
8770 *
8771 * The property is either an array of `PipeDefs`s or a function which returns the array of
8772 * `PipeDefs`s. The function is necessary to be able to support forward declarations.
8773 *
8774 * It's necessary to keep a copy of the full def list on the TView so it's possible
8775 * to render template functions without a host component.
8776 */
8777 pipeRegistry: PipeDefList | null;
8778 /**
8779 * Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in
8780 * creation mode.
8781 *
8782 * This array has a flat structure and contains TNode indices, directive indices (where an
8783 * instance can be found in `LView`) and hook functions. TNode index is followed by the directive
8784 * index and a hook function. If there are multiple hooks for a given TNode, the TNode index is
8785 * not repeated and the next lifecycle hook information is stored right after the previous hook
8786 * function. This is done so that at runtime the system can efficiently iterate over all of the
8787 * functions to invoke without having to make any decisions/lookups.
8788 */
8789 preOrderHooks: HookData | null;
8790 /**
8791 * Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.
8792 *
8793 * This array has the same structure as the `preOrderHooks` one.
8794 */
8795 preOrderCheckHooks: HookData | null;
8796 /**
8797 * Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed
8798 * for this view in creation mode.
8799 *
8800 * Even indices: Directive index
8801 * Odd indices: Hook function
8802 */
8803 contentHooks: HookData | null;
8804 /**
8805 * Array of ngAfterContentChecked hooks that should be executed for this view in update
8806 * mode.
8807 *
8808 * Even indices: Directive index
8809 * Odd indices: Hook function
8810 */
8811 contentCheckHooks: HookData | null;
8812 /**
8813 * Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for
8814 * this view in creation mode.
8815 *
8816 * Even indices: Directive index
8817 * Odd indices: Hook function
8818 */
8819 viewHooks: HookData | null;
8820 /**
8821 * Array of ngAfterViewChecked hooks that should be executed for this view in
8822 * update mode.
8823 *
8824 * Even indices: Directive index
8825 * Odd indices: Hook function
8826 */
8827 viewCheckHooks: HookData | null;
8828 /**
8829 * Array of ngOnDestroy hooks that should be executed when this view is destroyed.
8830 *
8831 * Even indices: Directive index
8832 * Odd indices: Hook function
8833 */
8834 destroyHooks: DestroyHookData | null;
8835 /**
8836 * When a view is destroyed, listeners need to be released and outputs need to be
8837 * unsubscribed. This cleanup array stores both listener data (in chunks of 4)
8838 * and output data (in chunks of 2) for a particular view. Combining the arrays
8839 * saves on memory (70 bytes per array) and on a few bytes of code size (for two
8840 * separate for loops).
8841 *
8842 * If it's a native DOM listener or output subscription being stored:
8843 * 1st index is: event name `name = tView.cleanup[i+0]`
8844 * 2nd index is: index of native element or a function that retrieves global target (window,
8845 * document or body) reference based on the native element:
8846 * `typeof idxOrTargetGetter === 'function'`: global target getter function
8847 * `typeof idxOrTargetGetter === 'number'`: index of native element
8848 *
8849 * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`
8850 * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`
8851 * `typeof useCaptureOrIndx == 'boolean' : useCapture boolean
8852 * `typeof useCaptureOrIndx == 'number':
8853 * `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`
8854 * `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`
8855 *
8856 * If it's an output subscription or query list destroy hook:
8857 * 1st index is: output unsubscribe function / query list destroy function
8858 * 2nd index is: index of function context in LView.cleanupInstances[]
8859 * `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`
8860 */
8861 cleanup: any[] | null;
8862 /**
8863 * A list of element indices for child components that will need to be
8864 * refreshed when the current view has finished its check. These indices have
8865 * already been adjusted for the HEADER_OFFSET.
8866 *
8867 */
8868 components: number[] | null;
8869 /**
8870 * A collection of queries tracked in a given view.
8871 */
8872 queries: TQueries | null;
8873 /**
8874 * An array of indices pointing to directives with content queries alongside with the
8875 * corresponding query index. Each entry in this array is a tuple of:
8876 * - index of the first content query index declared by a given directive;
8877 * - index of a directive.
8878 *
8879 * We are storing those indexes so we can refresh content queries as part of a view refresh
8880 * process.
8881 */
8882 contentQueries: number[] | null;
8883 /**
8884 * Set of schemas that declare elements to be allowed inside the view.
8885 */
8886 schemas: SchemaMetadata[] | null;
8887 /**
8888 * Array of constants for the view. Includes attribute arrays, local definition arrays etc.
8889 * Used for directive matching, attribute bindings, local definitions and more.
8890 */
8891 consts: TConstants | null;
8892 /**
8893 * Indicates that there was an error before we managed to complete the first create pass of the
8894 * view. This means that the view is likely corrupted and we should try to recover it.
8895 */
8896 incompleteFirstPass: boolean;
8897}
8898
8899/**
8900 * Explicitly marks `TView` as a specific type in `ngDevMode`
8901 *
8902 * It is useful to know conceptually what time of `TView` we are dealing with when
8903 * debugging an application (even if the runtime does not need it.) For this reason
8904 * we store this information in the `ngDevMode` `TView` and than use it for
8905 * better debugging experience.
8906 */
8907declare const enum TViewType {
8908 /**
8909 * Root `TView` is the used to bootstrap components into. It is used in conjunction with
8910 * `LView` which takes an existing DOM node not owned by Angular and wraps it in `TView`/`LView`
8911 * so that other components can be loaded into it.
8912 */
8913 Root = 0,
8914 /**
8915 * `TView` associated with a Component. This would be the `TView` directly associated with the
8916 * component view (as opposed an `Embedded` `TView` which would be a child of `Component` `TView`)
8917 */
8918 Component = 1,
8919 /**
8920 * `TView` associated with a template. Such as `*ngIf`, `<ng-template>` etc... A `Component`
8921 * can have zero or more `Embedede` `TView`s.
8922 */
8923 Embedded = 2
8924}
8925
8926/**
8927 * Special location which allows easy identification of type. If we have an array which was
8928 * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is
8929 * `LContainer`.
8930 */
8931declare const TYPE = 1;
8932
8933/**
8934 * @description
8935 *
8936 * Represents a type that a Component or other object is instances of.
8937 *
8938 * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by
8939 * the `MyCustomComponent` constructor function.
8940 *
8941 * @publicApi
8942 */
8943export declare const Type: FunctionConstructor;
8944
8945export declare interface Type<T> extends Function {
8946 new (...args: any[]): T;
8947}
8948
8949declare type Type_2 = Function;
8950
8951/**
8952 * An interface implemented by all Angular type decorators, which allows them to be used as
8953 * decorators as well as Angular syntax.
8954 *
8955 * ```
8956 * @ng.Component({...})
8957 * class MyClass {...}
8958 * ```
8959 *
8960 * @publicApi
8961 */
8962export declare interface TypeDecorator {
8963 /**
8964 * Invoke as decorator.
8965 */
8966 <T extends Type<any>>(type: T): T;
8967 (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
8968}
8969
8970/**
8971 * Configures the `Injector` to return an instance of `Type` when `Type' is used as the token.
8972 *
8973 * Create an instance by invoking the `new` operator and supplying additional arguments.
8974 * This form is a short form of `TypeProvider`;
8975 *
8976 * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
8977 *
8978 * @usageNotes
8979 *
8980 * {@example core/di/ts/provider_spec.ts region='TypeProvider'}
8981 *
8982 * @publicApi
8983 */
8984export declare interface TypeProvider extends Type<any> {
8985}
8986
8987/**
8988 * Configures the `Injector` to return a value for a token.
8989 * @see ["Dependency Injection Guide"](guide/dependency-injection).
8990 *
8991 * @usageNotes
8992 *
8993 * ### Example
8994 *
8995 * {@example core/di/ts/provider_spec.ts region='ValueProvider'}
8996 *
8997 * ### Multi-value example
8998 *
8999 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
9000 *
9001 * @publicApi
9002 */
9003export declare interface ValueProvider extends ValueSansProvider {
9004 /**
9005 * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
9006 */
9007 provide: any;
9008 /**
9009 * When true, injector returns an array of instances. This is useful to allow multiple
9010 * providers spread across many files to provide configuration information to a common token.
9011 */
9012 multi?: boolean;
9013}
9014
9015/**
9016 * Configures the `Injector` to return a value for a token.
9017 * Base for `ValueProvider` decorator.
9018 *
9019 * @publicApi
9020 */
9021export declare interface ValueSansProvider {
9022 /**
9023 * The value to inject.
9024 */
9025 useValue: any;
9026}
9027
9028/**
9029 * @publicApi
9030 */
9031export declare const VERSION: Version;
9032
9033
9034/**
9035 * @description Represents the version of Angular
9036 *
9037 * @publicApi
9038 */
9039export declare class Version {
9040 full: string;
9041 readonly major: string;
9042 readonly minor: string;
9043 readonly patch: string;
9044 constructor(full: string);
9045}
9046
9047declare const VIEW_REFS = 8;
9048
9049/**
9050 * Type of the ViewChild metadata.
9051 *
9052 * @publicApi
9053 */
9054export declare type ViewChild = Query;
9055
9056/**
9057 * ViewChild decorator and metadata.
9058 *
9059 * @Annotation
9060 * @publicApi
9061 */
9062export declare const ViewChild: ViewChildDecorator;
9063
9064/**
9065 * Type of the ViewChild decorator / constructor function.
9066 *
9067 * @see `ViewChild`.
9068 * @publicApi
9069 */
9070export declare interface ViewChildDecorator {
9071 /**
9072 * @description
9073 * Property decorator that configures a view query.
9074 * The change detector looks for the first element or the directive matching the selector
9075 * in the view DOM. If the view DOM changes, and a new child matches the selector,
9076 * the property is updated.
9077 *
9078 * View queries are set before the `ngAfterViewInit` callback is called.
9079 *
9080 * **Metadata Properties**:
9081 *
9082 * * **selector** - The directive type or the name used for querying.
9083 * * **read** - Used to read a different token from the queried elements.
9084 * * **static** - True to resolve query results before change detection runs,
9085 * false to resolve after change detection. Defaults to false.
9086 *
9087 *
9088 * The following selectors are supported.
9089 * * Any class with the `@Component` or `@Directive` decorator
9090 * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
9091 * with `@ViewChild('cmp')`)
9092 * * Any provider defined in the child component tree of the current component (e.g.
9093 * `@ViewChild(SomeService) someService: SomeService`)
9094 * * Any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:
9095 * any`)
9096 * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)
9097 * template;`)
9098 *
9099 * The following values are supported by `read`:
9100 * * Any class with the `@Component` or `@Directive` decorator
9101 * * Any provider defined on the injector of the component that is matched by the `selector` of
9102 * this query
9103 * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
9104 * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
9105 *
9106 * @usageNotes
9107 *
9108 * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}
9109 *
9110 * ### Example 2
9111 *
9112 * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}
9113 *
9114 * @Annotation
9115 */
9116 (selector: ProviderToken<unknown> | Function | string, opts?: {
9117 read?: any;
9118 static?: boolean;
9119 }): any;
9120 new (selector: ProviderToken<unknown> | Function | string, opts?: {
9121 read?: any;
9122 static?: boolean;
9123 }): ViewChild;
9124}
9125
9126/**
9127 * Type of the ViewChildren metadata.
9128 *
9129 * @publicApi
9130 */
9131export declare type ViewChildren = Query;
9132
9133/**
9134 * ViewChildren decorator and metadata.
9135 *
9136 * @Annotation
9137 * @publicApi
9138 */
9139export declare const ViewChildren: ViewChildrenDecorator;
9140
9141/**
9142 * Type of the ViewChildren decorator / constructor function.
9143 *
9144 * @see `ViewChildren`.
9145 *
9146 * @publicApi
9147 */
9148export declare interface ViewChildrenDecorator {
9149 /**
9150 * @description
9151 * Property decorator that configures a view query.
9152 *
9153 * Use to get the `QueryList` of elements or directives from the view DOM.
9154 * Any time a child element is added, removed, or moved, the query list will be updated,
9155 * and the changes observable of the query list will emit a new value.
9156 *
9157 * View queries are set before the `ngAfterViewInit` callback is called.
9158 *
9159 * **Metadata Properties**:
9160 *
9161 * * **selector** - The directive type or the name used for querying.
9162 * * **read** - Used to read a different token from the queried elements.
9163 * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only
9164 * if the QueryList result has changed. When `false` the `changes` observable might emit even
9165 * if the QueryList has not changed.
9166 * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and
9167 * removed in future versions of Angular.
9168 *
9169 * The following selectors are supported.
9170 * * Any class with the `@Component` or `@Directive` decorator
9171 * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
9172 * with `@ViewChildren('cmp')`)
9173 * * Any provider defined in the child component tree of the current component (e.g.
9174 * `@ViewChildren(SomeService) someService!: SomeService`)
9175 * * Any provider defined through a string token (e.g. `@ViewChildren('someToken')
9176 * someTokenVal!: any`)
9177 * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChildren(TemplateRef)
9178 * template;`)
9179 *
9180 * In addition, multiple string selectors can be separated with a comma (e.g.
9181 * `@ViewChildren('cmp1,cmp2')`)
9182 *
9183 * The following values are supported by `read`:
9184 * * Any class with the `@Component` or `@Directive` decorator
9185 * * Any provider defined on the injector of the component that is matched by the `selector` of
9186 * this query
9187 * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
9188 * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
9189 *
9190 * @usageNotes
9191 *
9192 * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}
9193 *
9194 * ### Another example
9195 *
9196 * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'}
9197 *
9198 * @Annotation
9199 */
9200 (selector: ProviderToken<unknown> | Function | string, opts?: {
9201 read?: any;
9202 emitDistinctChangesOnly?: boolean;
9203 }): any;
9204 new (selector: ProviderToken<unknown> | Function | string, opts?: {
9205 read?: any;
9206 emitDistinctChangesOnly?: boolean;
9207 }): ViewChildren;
9208}
9209
9210/**
9211 * Represents a container where one or more views can be attached to a component.
9212 *
9213 * Can contain *host views* (created by instantiating a
9214 * component with the `createComponent()` method), and *embedded views*
9215 * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
9216 *
9217 * A view container instance can contain other view containers,
9218 * creating a [view hierarchy](guide/glossary#view-tree).
9219 *
9220 * @see `ComponentRef`
9221 * @see `EmbeddedViewRef`
9222 *
9223 * @publicApi
9224 */
9225export declare abstract class ViewContainerRef {
9226 /**
9227 * Anchor element that specifies the location of this container in the containing view.
9228 * Each view container can have only one anchor element, and each anchor element
9229 * can have only a single view container.
9230 *
9231 * Root elements of views attached to this container become siblings of the anchor element in
9232 * the rendered view.
9233 *
9234 * Access the `ViewContainerRef` of an element by placing a `Directive` injected
9235 * with `ViewContainerRef` on the element, or use a `ViewChild` query.
9236 *
9237 * <!-- TODO: rename to anchorElement -->
9238 */
9239 abstract get element(): ElementRef;
9240 /**
9241 * The [dependency injector](guide/glossary#injector) for this view container.
9242 */
9243 abstract get injector(): Injector;
9244 /** @deprecated No replacement */
9245 abstract get parentInjector(): Injector;
9246 /**
9247 * Destroys all views in this container.
9248 */
9249 abstract clear(): void;
9250 /**
9251 * Retrieves a view from this container.
9252 * @param index The 0-based index of the view to retrieve.
9253 * @returns The `ViewRef` instance, or null if the index is out of range.
9254 */
9255 abstract get(index: number): ViewRef | null;
9256 /**
9257 * Reports how many views are currently attached to this container.
9258 * @returns The number of views.
9259 */
9260 abstract get length(): number;
9261 /**
9262 * Instantiates an embedded view and inserts it
9263 * into this container.
9264 * @param templateRef The HTML template that defines the view.
9265 * @param context The data-binding context of the embedded view, as declared
9266 * in the `<ng-template>` usage.
9267 * @param index The 0-based index at which to insert the new view into this container.
9268 * If not specified, appends the new view as the last entry.
9269 *
9270 * @returns The `ViewRef` instance for the newly created view.
9271 */
9272 abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
9273 /**
9274 * Instantiates a single component and inserts its host view into this container.
9275 *
9276 * @param componentType Component Type to use.
9277 * @param options An object that contains extra parameters:
9278 * * index: the index at which to insert the new component's host view into this container.
9279 * If not specified, appends the new view as the last entry.
9280 * * injector: the injector to use as the parent for the new component.
9281 * * ngModuleRef: an NgModuleRef of the component's NgModule, you should almost always provide
9282 * this to ensure that all expected providers are available for the component
9283 * instantiation.
9284 * * projectableNodes: list of DOM nodes that should be projected through
9285 * [`<ng-content>`](api/core/ng-content) of the new component instance.
9286 *
9287 * @returns The new `ComponentRef` which contains the component instance and the host view.
9288 */
9289 abstract createComponent<C>(componentType: Type<C>, options?: {
9290 index?: number;
9291 injector?: Injector;
9292 ngModuleRef?: NgModuleRef<unknown>;
9293 projectableNodes?: Node[][];
9294 }): ComponentRef<C>;
9295 /**
9296 * Instantiates a single component and inserts its host view into this container.
9297 *
9298 * @param componentFactory Component factory to use.
9299 * @param index The index at which to insert the new component's host view into this container.
9300 * If not specified, appends the new view as the last entry.
9301 * @param injector The injector to use as the parent for the new component.
9302 * @param projectableNodes List of DOM nodes that should be projected through
9303 * [`<ng-content>`](api/core/ng-content) of the new component instance.
9304 * @param ngModuleRef An instance of the NgModuleRef that represent an NgModule.
9305 * This information is used to retrieve corresponding NgModule injector.
9306 *
9307 * @returns The new `ComponentRef` which contains the component instance and the host view.
9308 *
9309 * @deprecated Angular no longer requires component factories to dynamically create components.
9310 * Use different signature of the `createComponent` method, which allows passing
9311 * Component class directly.
9312 */
9313 abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], ngModuleRef?: NgModuleRef<any>): ComponentRef<C>;
9314 /**
9315 * Inserts a view into this container.
9316 * @param viewRef The view to insert.
9317 * @param index The 0-based index at which to insert the view.
9318 * If not specified, appends the new view as the last entry.
9319 * @returns The inserted `ViewRef` instance.
9320 *
9321 */
9322 abstract insert(viewRef: ViewRef, index?: number): ViewRef;
9323 /**
9324 * Moves a view to a new location in this container.
9325 * @param viewRef The view to move.
9326 * @param index The 0-based index of the new location.
9327 * @returns The moved `ViewRef` instance.
9328 */
9329 abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;
9330 /**
9331 * Returns the index of a view within the current container.
9332 * @param viewRef The view to query.
9333 * @returns The 0-based index of the view's position in this container,
9334 * or `-1` if this container doesn't contain the view.
9335 */
9336 abstract indexOf(viewRef: ViewRef): number;
9337 /**
9338 * Destroys a view attached to this container
9339 * @param index The 0-based index of the view to destroy.
9340 * If not specified, the last view in the container is removed.
9341 */
9342 abstract remove(index?: number): void;
9343 /**
9344 * Detaches a view from this container without destroying it.
9345 * Use along with `insert()` to move a view within the current container.
9346 * @param index The 0-based index of the view to detach.
9347 * If not specified, the last view in the container is detached.
9348 */
9349 abstract detach(index?: number): ViewRef | null;
9350}
9351
9352/**
9353 * View instance data.
9354 * Attention: Adding fields to this is performance sensitive!
9355 */
9356declare interface ViewData {
9357 def: ɵViewDefinition;
9358 root: RootData;
9359 renderer: Renderer2;
9360 parentNodeDef: NodeDef | null;
9361 parent: ViewData | null;
9362 viewContainerParent: ViewData | null;
9363 component: any;
9364 context: any;
9365 nodes: {
9366 [key: number]: NodeData;
9367 };
9368 state: ViewState;
9369 oldValues: any[];
9370 disposables: DisposableFn[] | null;
9371 initIndex: number;
9372}
9373
9374declare interface ViewDefinitionFactory extends DefinitionFactory<ɵViewDefinition> {
9375}
9376
9377
9378/**
9379 * Defines template and style encapsulation options available for Component's {@link Component}.
9380 *
9381 * See {@link Component#encapsulation encapsulation}.
9382 *
9383 * @usageNotes
9384 * ### Example
9385 *
9386 * {@example core/ts/metadata/encapsulation.ts region='longform'}
9387 *
9388 * @publicApi
9389 */
9390export declare enum ViewEncapsulation {
9391 /**
9392 * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host
9393 * Element and pre-processing the style rules provided via {@link Component#styles styles} or
9394 * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all
9395 * selectors.
9396 *
9397 * This is the default option.
9398 */
9399 Emulated = 0,
9400 /**
9401 * Don't provide any template or style encapsulation.
9402 */
9403 None = 2,
9404 /**
9405 * Use Shadow DOM to encapsulate styles.
9406 *
9407 * For the DOM this means using modern [Shadow
9408 * DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and
9409 * creating a ShadowRoot for Component's Host Element.
9410 */
9411 ShadowDom = 3
9412}
9413
9414declare enum ViewEncapsulation_2 {
9415 Emulated = 0,
9416 None = 2,
9417 ShadowDom = 3
9418}
9419
9420declare interface viewEngine_ChangeDetectorRef_interface extends ChangeDetectorRef {
9421}
9422
9423declare interface ViewHandleEventFn {
9424 (view: ViewData, nodeIndex: number, eventName: string, event: any): boolean;
9425}
9426
9427/**
9428 * Definition of what a view queries function should look like.
9429 */
9430declare type ViewQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U) => void;
9431
9432/**
9433 * Represents an Angular [view](guide/glossary#view "Definition").
9434 *
9435 * @see {@link ChangeDetectorRef#usage-notes Change detection usage}
9436 *
9437 * @publicApi
9438 */
9439export declare abstract class ViewRef extends ChangeDetectorRef {
9440 /**
9441 * Destroys this view and all of the data structures associated with it.
9442 */
9443 abstract destroy(): void;
9444 /**
9445 * Reports whether this view has been destroyed.
9446 * @returns True after the `destroy()` method has been called, false otherwise.
9447 */
9448 abstract get destroyed(): boolean;
9449 /**
9450 * A lifecycle hook that provides additional developer-defined cleanup
9451 * functionality for views.
9452 * @param callback A handler function that cleans up developer-defined data
9453 * associated with a view. Called when the `destroy()` method is invoked.
9454 */
9455 abstract onDestroy(callback: Function): any /** TODO #9100 */;
9456}
9457
9458/**
9459 * Interface for tracking root `ViewRef`s in `ApplicationRef`.
9460 *
9461 * NOTE: Importing `ApplicationRef` here directly creates circular dependency, which is why we have
9462 * a subset of the `ApplicationRef` interface `ViewRefTracker` here.
9463 */
9464declare interface ViewRefTracker {
9465 detachView(viewRef: ViewRef): void;
9466}
9467
9468/**
9469 * Bitmask of states
9470 */
9471declare const enum ViewState {
9472 BeforeFirstCheck = 1,
9473 FirstCheck = 2,
9474 Attached = 4,
9475 ChecksEnabled = 8,
9476 IsProjectedView = 16,
9477 CheckProjectedView = 32,
9478 CheckProjectedViews = 64,
9479 Destroyed = 128,
9480 InitState_Mask = 1792,
9481 InitState_BeforeInit = 0,
9482 InitState_CallingOnInit = 256,
9483 InitState_CallingAfterContentInit = 512,
9484 InitState_CallingAfterViewInit = 768,
9485 InitState_AfterInit = 1024,
9486 CatDetectChanges = 12,
9487 CatInit = 13
9488}
9489
9490declare interface ViewUpdateFn {
9491 (check: NodeCheckFn, view: ViewData): void;
9492}
9493
9494/**
9495 * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to
9496 * the DOM in a browser environment.
9497 */
9498export declare function ɵ_sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): TrustedHTML | string;
9499
9500
9501export declare function ɵ_sanitizeUrl(url: string): string;
9502
9503export declare const ɵALLOW_MULTIPLE_PLATFORMS: InjectionToken<boolean>;
9504
9505export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Html): value is ɵSafeHtml;
9506
9507export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.ResourceUrl): value is ɵSafeResourceUrl;
9508
9509export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Script): value is ɵSafeScript;
9510
9511export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Style): value is ɵSafeStyle;
9512
9513export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Url): value is ɵSafeUrl;
9514
9515export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType): boolean;
9516
9517export declare function ɵand(flags: ɵNodeFlags, matchedQueriesDsl: null | [string | number, ɵQueryValueType][], ngContentIndex: null | number, childCount: number, handleEvent?: null | ElementHandleEventFn, templateFactory?: ViewDefinitionFactory): NodeDef;
9518
9519/**
9520 * Providers that generate a random `APP_ID_TOKEN`.
9521 * @publicApi
9522 */
9523export declare const ɵAPP_ID_RANDOM_PROVIDER: {
9524 provide: InjectionToken<string>;
9525 useFactory: typeof _appIdRandomProviderFactory;
9526 deps: any[];
9527};
9528
9529export declare const enum ɵArgumentType {
9530 Inline = 0,
9531 Dynamic = 1
9532}
9533
9534/**
9535 * A set of marker values to be used in the attributes arrays. These markers indicate that some
9536 * items are not regular attributes and the processing should be adapted accordingly.
9537 */
9538export declare const enum ɵAttributeMarker {
9539 /**
9540 * An implicit marker which indicates that the value in the array are of `attributeKey`,
9541 * `attributeValue` format.
9542 *
9543 * NOTE: This is implicit as it is the type when no marker is present in array. We indicate that
9544 * it should not be present at runtime by the negative number.
9545 */
9546 ImplicitAttributes = -1,
9547 /**
9548 * Marker indicates that the following 3 values in the attributes array are:
9549 * namespaceUri, attributeName, attributeValue
9550 * in that order.
9551 */
9552 NamespaceURI = 0,
9553 /**
9554 * Signals class declaration.
9555 *
9556 * Each value following `Classes` designates a class name to include on the element.
9557 * ## Example:
9558 *
9559 * Given:
9560 * ```
9561 * <div class="foo bar baz">...<d/vi>
9562 * ```
9563 *
9564 * the generated code is:
9565 * ```
9566 * var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];
9567 * ```
9568 */
9569 Classes = 1,
9570 /**
9571 * Signals style declaration.
9572 *
9573 * Each pair of values following `Styles` designates a style name and value to include on the
9574 * element.
9575 * ## Example:
9576 *
9577 * Given:
9578 * ```
9579 * <div style="width:100px; height:200px; color:red">...</div>
9580 * ```
9581 *
9582 * the generated code is:
9583 * ```
9584 * var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];
9585 * ```
9586 */
9587 Styles = 2,
9588 /**
9589 * Signals that the following attribute names were extracted from input or output bindings.
9590 *
9591 * For example, given the following HTML:
9592 *
9593 * ```
9594 * <div moo="car" [foo]="exp" (bar)="doSth()">
9595 * ```
9596 *
9597 * the generated code is:
9598 *
9599 * ```
9600 * var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];
9601 * ```
9602 */
9603 Bindings = 3,
9604 /**
9605 * Signals that the following attribute names were hoisted from an inline-template declaration.
9606 *
9607 * For example, given the following HTML:
9608 *
9609 * ```
9610 * <div *ngFor="let value of values; trackBy:trackBy" dirA [dirB]="value">
9611 * ```
9612 *
9613 * the generated code for the `template()` instruction would include:
9614 *
9615 * ```
9616 * ['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf',
9617 * 'ngForTrackBy', 'let-value']
9618 * ```
9619 *
9620 * while the generated code for the `element()` instruction inside the template function would
9621 * include:
9622 *
9623 * ```
9624 * ['dirA', '', AttributeMarker.Bindings, 'dirB']
9625 * ```
9626 */
9627 Template = 4,
9628 /**
9629 * Signals that the following attribute is `ngProjectAs` and its value is a parsed
9630 * `CssSelector`.
9631 *
9632 * For example, given the following HTML:
9633 *
9634 * ```
9635 * <h1 attr="value" ngProjectAs="[title]">
9636 * ```
9637 *
9638 * the generated code for the `element()` instruction would include:
9639 *
9640 * ```
9641 * ['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]
9642 * ```
9643 */
9644 ProjectAs = 5,
9645 /**
9646 * Signals that the following attribute will be translated by runtime i18n
9647 *
9648 * For example, given the following HTML:
9649 *
9650 * ```
9651 * <div moo="car" foo="value" i18n-foo [bar]="binding" i18n-bar>
9652 * ```
9653 *
9654 * the generated code is:
9655 *
9656 * ```
9657 * var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];
9658 */
9659 I18n = 6
9660}
9661
9662export declare const enum ɵBindingFlags {
9663 TypeElementAttribute = 1,
9664 TypeElementClass = 2,
9665 TypeElementStyle = 4,
9666 TypeProperty = 8,
9667 SyntheticProperty = 16,
9668 SyntheticHostProperty = 32,
9669 CatSyntheticProperty = 48,
9670 Types = 15
9671}
9672
9673/**
9674 * Mark `html` string as trusted.
9675 *
9676 * This function wraps the trusted string in `String` and brands it in a way which makes it
9677 * recognizable to {@link htmlSanitizer} to be trusted implicitly.
9678 *
9679 * @param trustedHtml `html` string which needs to be implicitly trusted.
9680 * @returns a `html` which has been branded to be implicitly trusted.
9681 */
9682export declare function ɵbypassSanitizationTrustHtml(trustedHtml: string): ɵSafeHtml;
9683
9684/**
9685 * Mark `url` string as trusted.
9686 *
9687 * This function wraps the trusted string in `String` and brands it in a way which makes it
9688 * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.
9689 *
9690 * @param trustedResourceUrl `url` string which needs to be implicitly trusted.
9691 * @returns a `url` which has been branded to be implicitly trusted.
9692 */
9693export declare function ɵbypassSanitizationTrustResourceUrl(trustedResourceUrl: string): ɵSafeResourceUrl;
9694
9695/**
9696 * Mark `script` string as trusted.
9697 *
9698 * This function wraps the trusted string in `String` and brands it in a way which makes it
9699 * recognizable to {@link scriptSanitizer} to be trusted implicitly.
9700 *
9701 * @param trustedScript `script` string which needs to be implicitly trusted.
9702 * @returns a `script` which has been branded to be implicitly trusted.
9703 */
9704export declare function ɵbypassSanitizationTrustScript(trustedScript: string): ɵSafeScript;
9705
9706/**
9707 * Mark `style` string as trusted.
9708 *
9709 * This function wraps the trusted string in `String` and brands it in a way which makes it
9710 * recognizable to {@link styleSanitizer} to be trusted implicitly.
9711 *
9712 * @param trustedStyle `style` string which needs to be implicitly trusted.
9713 * @returns a `style` hich has been branded to be implicitly trusted.
9714 */
9715export declare function ɵbypassSanitizationTrustStyle(trustedStyle: string): ɵSafeStyle;
9716
9717/**
9718 * Mark `url` string as trusted.
9719 *
9720 * This function wraps the trusted string in `String` and brands it in a way which makes it
9721 * recognizable to {@link urlSanitizer} to be trusted implicitly.
9722 *
9723 * @param trustedUrl `url` string which needs to be implicitly trusted.
9724 * @returns a `url` which has been branded to be implicitly trusted.
9725 */
9726export declare function ɵbypassSanitizationTrustUrl(trustedUrl: string): ɵSafeUrl;
9727
9728
9729export declare const enum ɵBypassType {
9730 Url = "URL",
9731 Html = "HTML",
9732 ResourceUrl = "ResourceURL",
9733 Script = "Script",
9734 Style = "Style"
9735}
9736
9737export declare function ɵccf(selector: string, componentType: Type<any>, viewDefFactory: ViewDefinitionFactory, inputs: {
9738 [propName: string]: string;
9739} | null, outputs: {
9740 [propName: string]: string;
9741}, ngContentSelectors: string[]): ComponentFactory<any>;
9742
9743/**
9744 * Defines the possible states of the default change detector.
9745 * @see `ChangeDetectorRef`
9746 */
9747export declare enum ɵChangeDetectorStatus {
9748 /**
9749 * A state in which, after calling `detectChanges()`, the change detector
9750 * state becomes `Checked`, and must be explicitly invoked or reactivated.
9751 */
9752 CheckOnce = 0,
9753 /**
9754 * A state in which change detection is skipped until the change detector mode
9755 * becomes `CheckOnce`.
9756 */
9757 Checked = 1,
9758 /**
9759 * A state in which change detection continues automatically until explicitly
9760 * deactivated.
9761 */
9762 CheckAlways = 2,
9763 /**
9764 * A state in which a change detector sub tree is not a part of the main tree and
9765 * should be skipped.
9766 */
9767 Detached = 3,
9768 /**
9769 * Indicates that the change detector encountered an error checking a binding
9770 * or calling a directive lifecycle method and is now in an inconsistent state. Change
9771 * detectors in this state do not detect changes.
9772 */
9773 Errored = 4,
9774 /**
9775 * Indicates that the change detector has been destroyed.
9776 */
9777 Destroyed = 5
9778}
9779
9780export declare function ɵclearOverrides(): void;
9781
9782export declare function ɵclearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component>;
9783
9784export declare function ɵcmf(ngModuleType: Type<any>, bootstrapComponents: Type<any>[], defFactory: NgModuleDefinitionFactory): NgModuleFactory<any>;
9785
9786export declare class ɵCodegenComponentFactoryResolver implements ComponentFactoryResolver {
9787 private _parent;
9788 private _ngModule;
9789 private _factories;
9790 constructor(factories: ComponentFactory<any>[], _parent: ComponentFactoryResolver, _ngModule: NgModuleRef<any>);
9791 resolveComponentFactory<T>(component: {
9792 new (...args: any[]): T;
9793 }): ComponentFactory<T>;
9794}
9795
9796/**
9797 * Compile an Angular component according to its decorator metadata, and patch the resulting
9798 * component def (ɵcmp) onto the component type.
9799 *
9800 * Compilation may be asynchronous (due to the need to resolve URLs for the component template or
9801 * other resources, for example). In the event that compilation is not immediate, `compileComponent`
9802 * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`
9803 * until the global queue has been resolved with a call to `resolveComponentResources`.
9804 */
9805export declare function ɵcompileComponent(type: Type<any>, metadata: Component): void;
9806
9807/**
9808 * Compile an Angular directive according to its decorator metadata, and patch the resulting
9809 * directive def onto the component type.
9810 *
9811 * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which
9812 * will resolve when compilation completes and the directive becomes usable.
9813 */
9814export declare function ɵcompileDirective(type: Type<any>, directive: Directive | null): void;
9815
9816/**
9817 * Compiles a module in JIT mode.
9818 *
9819 * This function automatically gets called when a class has a `@NgModule` decorator.
9820 */
9821export declare function ɵcompileNgModule(moduleType: Type<any>, ngModule?: NgModule): void;
9822
9823/**
9824 * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.
9825 *
9826 * It's possible to compile a module via this API which will allow duplicate declarations in its
9827 * root.
9828 */
9829export declare function ɵcompileNgModuleDefs(moduleType: ɵNgModuleType, ngModule: NgModule, allowDuplicateDeclarationsInRoot?: boolean): void;
9830
9831export declare function ɵcompileNgModuleFactory__POST_R3__<M>(injector: Injector, options: CompilerOptions, moduleType: Type<M>): Promise<NgModuleFactory<M>>;
9832
9833export declare function ɵcompilePipe(type: Type<any>, meta: Pipe): void;
9834
9835export declare const ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__: <T>(moduleType: Type<T>) => Promise<ModuleWithComponentFactories<T>>;
9836
9837export declare const ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__: <T>(moduleType: Type<T>) => ModuleWithComponentFactories<T>;
9838
9839export declare const ɵCompiler_compileModuleAsync__POST_R3__: <T>(moduleType: Type<T>) => Promise<NgModuleFactory<T>>;
9840
9841export declare const ɵCompiler_compileModuleSync__POST_R3__: <T>(moduleType: Type<T>) => NgModuleFactory<T>;
9842
9843/**
9844 * Runtime link information for Components.
9845 *
9846 * This is an internal data structure used by the render to link
9847 * components into templates.
9848 *
9849 * NOTE: Always use `defineComponent` function to create this object,
9850 * never create the object directly since the shape of this object
9851 * can change between versions.
9852 *
9853 * See: {@link defineComponent}
9854 */
9855export declare interface ɵComponentDef<T> extends ɵDirectiveDef<T> {
9856 /**
9857 * Runtime unique component ID.
9858 */
9859 readonly id: string;
9860 /**
9861 * The View template of the component.
9862 */
9863 readonly template: ComponentTemplate<T>;
9864 /** Constants associated with the component's view. */
9865 readonly consts: TConstantsOrFactory | null;
9866 /**
9867 * An array of `ngContent[selector]` values that were found in the template.
9868 */
9869 readonly ngContentSelectors?: string[];
9870 /**
9871 * A set of styles that the component needs to be present for component to render correctly.
9872 */
9873 readonly styles: string[];
9874 /**
9875 * The number of nodes, local refs, and pipes in this component template.
9876 *
9877 * Used to calculate the length of the component's LView array, so we
9878 * can pre-fill the array and set the binding start index.
9879 */
9880 readonly decls: number;
9881 /**
9882 * The number of bindings in this component template (including pure fn bindings).
9883 *
9884 * Used to calculate the length of the component's LView array, so we
9885 * can pre-fill the array and set the host binding start index.
9886 */
9887 readonly vars: number;
9888 /**
9889 * Query-related instructions for a component.
9890 */
9891 viewQuery: ViewQueriesFunction<T> | null;
9892 /**
9893 * The view encapsulation type, which determines how styles are applied to
9894 * DOM elements. One of
9895 * - `Emulated` (default): Emulate native scoping of styles.
9896 * - `Native`: Use the native encapsulation mechanism of the renderer.
9897 * - `ShadowDom`: Use modern [ShadowDOM](https://w3c.github.io/webcomponents/spec/shadow/) and
9898 * create a ShadowRoot for component's host element.
9899 * - `None`: Do not provide any template or style encapsulation.
9900 */
9901 readonly encapsulation: ViewEncapsulation;
9902 /**
9903 * Defines arbitrary developer-defined data to be stored on a renderer instance.
9904 * This is useful for renderers that delegate to other renderers.
9905 */
9906 readonly data: {
9907 [kind: string]: any;
9908 };
9909 /** Whether or not this component's ChangeDetectionStrategy is OnPush */
9910 readonly onPush: boolean;
9911 /**
9912 * Registry of directives and components that may be found in this view.
9913 *
9914 * The property is either an array of `DirectiveDef`s or a function which returns the array of
9915 * `DirectiveDef`s. The function is necessary to be able to support forward declarations.
9916 */
9917 directiveDefs: DirectiveDefListOrFactory | null;
9918 /**
9919 * Registry of pipes that may be found in this view.
9920 *
9921 * The property is either an array of `PipeDefs`s or a function which returns the array of
9922 * `PipeDefs`s. The function is necessary to be able to support forward declarations.
9923 */
9924 pipeDefs: PipeDefListOrFactory | null;
9925 /**
9926 * The set of schemas that declare elements to be allowed in the component's template.
9927 */
9928 schemas: SchemaMetadata[] | null;
9929 /**
9930 * Ivy runtime uses this place to store the computed tView for the component. This gets filled on
9931 * the first run of component.
9932 */
9933 tView: TView | null;
9934 /**
9935 * Used to store the result of `noSideEffects` function so that it is not removed by closure
9936 * compiler. The property should never be read.
9937 */
9938 readonly _?: unknown;
9939}
9940
9941/**
9942 * A subclass of `Type` which has a static `ɵcmp`:`ComponentDef` field making it
9943 * consumable for rendering.
9944 */
9945export declare interface ɵComponentType<T> extends Type<T> {
9946 ɵcmp: unknown;
9947}
9948
9949export declare class ɵConsole {
9950 log(message: string): void;
9951 warn(message: string): void;
9952 static ɵfac: i0.ɵɵFactoryDeclaration<ɵConsole, never>;
9953 static ɵprov: i0.ɵɵInjectableDeclaration<ɵConsole>;
9954}
9955
9956export declare function ɵCREATE_ATTRIBUTE_DECORATOR__POST_R3__(): AttributeDecorator;
9957
9958/**
9959 * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
9960 *
9961 * @publicApi
9962 */
9963export declare function ɵcreateInjector(defType: any, parent?: Injector | null, additionalProviders?: StaticProvider[] | null, name?: string): Injector;
9964
9965export declare function ɵcrt(values: {
9966 styles: (string | any[])[];
9967 encapsulation: ViewEncapsulation;
9968 data: {
9969 [kind: string]: any[];
9970 };
9971}): RendererType2;
9972
9973/**
9974 * A list of CssSelectors.
9975 *
9976 * A directive or component can have multiple selectors. This type is used for
9977 * directive defs so any of the selectors in the list will match that directive.
9978 *
9979 * Original: 'form, [ngForm]'
9980 * Parsed: [['form'], ['', 'ngForm', '']]
9981 */
9982export declare type ɵCssSelectorList = CssSelector[];
9983
9984/**
9985 * Index of each value in currency data (used to describe CURRENCIES_EN in currencies.ts)
9986 */
9987export declare const enum ɵCurrencyIndex {
9988 Symbol = 0,
9989 SymbolNarrow = 1,
9990 NbOfDigits = 2
9991}
9992
9993/**
9994 * The locale id that the application is using by default (for translations and ICU expressions).
9995 */
9996export declare const ɵDEFAULT_LOCALE_ID = "en-US";
9997
9998export declare const ɵdefaultIterableDiffers: IterableDiffers;
9999
10000export declare const ɵdefaultKeyValueDiffers: KeyValueDiffers;
10001
10002/**
10003 * Bitmask for DI flags
10004 */
10005export declare const enum ɵDepFlags {
10006 None = 0,
10007 SkipSelf = 1,
10008 Optional = 2,
10009 Self = 4,
10010 Value = 8
10011}
10012
10013
10014/**
10015 * Synchronously perform change detection on a component (and possibly its sub-components).
10016 *
10017 * This function triggers change detection in a synchronous way on a component.
10018 *
10019 * @param component The component which the change detection should be performed on.
10020 */
10021export declare function ɵdetectChanges(component: {}): void;
10022
10023
10024export declare function ɵdevModeEqual(a: any, b: any): boolean;
10025
10026export declare function ɵdid(checkIndex: number, flags: ɵNodeFlags, matchedQueries: null | [string | number, ɵQueryValueType][], childCount: number, ctor: any, deps: ([ɵDepFlags, any] | any)[], props?: null | {
10027 [name: string]: [number, string];
10028}, outputs?: null | {
10029 [name: string]: string;
10030}): NodeDef;
10031
10032/**
10033 * Runtime link information for Directives.
10034 *
10035 * This is an internal data structure used by the render to link
10036 * directives into templates.
10037 *
10038 * NOTE: Always use `defineDirective` function to create this object,
10039 * never create the object directly since the shape of this object
10040 * can change between versions.
10041 *
10042 * @param Selector type metadata specifying the selector of the directive or component
10043 *
10044 * See: {@link defineDirective}
10045 */
10046export declare interface ɵDirectiveDef<T> {
10047 /**
10048 * A dictionary mapping the inputs' minified property names to their public API names, which
10049 * are their aliases if any, or their original unminified property names
10050 * (as in `@Input('alias') propertyName: any;`).
10051 */
10052 readonly inputs: {
10053 [P in keyof T]: string;
10054 };
10055 /**
10056 * @deprecated This is only here because `NgOnChanges` incorrectly uses declared name instead of
10057 * public or minified name.
10058 */
10059 readonly declaredInputs: {
10060 [P in keyof T]: string;
10061 };
10062 /**
10063 * A dictionary mapping the outputs' minified property names to their public API names, which
10064 * are their aliases if any, or their original unminified property names
10065 * (as in `@Output('alias') propertyName: any;`).
10066 */
10067 readonly outputs: {
10068 [P in keyof T]: string;
10069 };
10070 /**
10071 * Function to create and refresh content queries associated with a given directive.
10072 */
10073 contentQueries: ContentQueriesFunction<T> | null;
10074 /**
10075 * Query-related instructions for a directive. Note that while directives don't have a
10076 * view and as such view queries won't necessarily do anything, there might be
10077 * components that extend the directive.
10078 */
10079 viewQuery: ViewQueriesFunction<T> | null;
10080 /**
10081 * Refreshes host bindings on the associated directive.
10082 */
10083 readonly hostBindings: HostBindingsFunction<T> | null;
10084 /**
10085 * The number of bindings in this directive `hostBindings` (including pure fn bindings).
10086 *
10087 * Used to calculate the length of the component's LView array, so we
10088 * can pre-fill the array and set the host binding start index.
10089 */
10090 readonly hostVars: number;
10091 /**
10092 * Assign static attribute values to a host element.
10093 *
10094 * This property will assign static attribute values as well as class and style
10095 * values to a host element. Since attribute values can consist of different types of values, the
10096 * `hostAttrs` array must include the values in the following format:
10097 *
10098 * attrs = [
10099 * // static attributes (like `title`, `name`, `id`...)
10100 * attr1, value1, attr2, value,
10101 *
10102 * // a single namespace value (like `x:id`)
10103 * NAMESPACE_MARKER, namespaceUri1, name1, value1,
10104 *
10105 * // another single namespace value (like `x:name`)
10106 * NAMESPACE_MARKER, namespaceUri2, name2, value2,
10107 *
10108 * // a series of CSS classes that will be applied to the element (no spaces)
10109 * CLASSES_MARKER, class1, class2, class3,
10110 *
10111 * // a series of CSS styles (property + value) that will be applied to the element
10112 * STYLES_MARKER, prop1, value1, prop2, value2
10113 * ]
10114 *
10115 * All non-class and non-style attributes must be defined at the start of the list
10116 * first before all class and style values are set. When there is a change in value
10117 * type (like when classes and styles are introduced) a marker must be used to separate
10118 * the entries. The marker values themselves are set via entries found in the
10119 * [AttributeMarker] enum.
10120 */
10121 readonly hostAttrs: TAttributes | null;
10122 /** Token representing the directive. Used by DI. */
10123 readonly type: Type<T>;
10124 /** Function that resolves providers and publishes them into the DI system. */
10125 providersResolver: (<U extends T>(def: ɵDirectiveDef<U>, processProvidersFn?: ProcessProvidersFunction) => void) | null;
10126 /** The selectors that will be used to match nodes to this directive. */
10127 readonly selectors: ɵCssSelectorList;
10128 /**
10129 * Name under which the directive is exported (for use with local references in template)
10130 */
10131 readonly exportAs: string[] | null;
10132 /**
10133 * Factory function used to create a new directive instance. Will be null initially.
10134 * Populated when the factory is first requested by directive instantiation logic.
10135 */
10136 readonly factory: FactoryFn<T> | null;
10137 /**
10138 * The features applied to this directive
10139 */
10140 readonly features: DirectiveDefFeature[] | null;
10141 setInput: (<U extends T>(this: ɵDirectiveDef<U>, instance: U, value: any, publicName: string, privateName: string) => void) | null;
10142}
10143
10144/**
10145 * A subclass of `Type` which has a static `ɵdir`:`DirectiveDef` field making it
10146 * consumable for rendering.
10147 */
10148export declare interface ɵDirectiveType<T> extends Type<T> {
10149 ɵdir: unknown;
10150 ɵfac: unknown;
10151}
10152
10153export 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;
10154
10155export declare const ɵEMPTY_ARRAY: any[];
10156
10157export declare const ɵEMPTY_MAP: {
10158 [key: string]: any;
10159};
10160
10161/**
10162 * Index of each type of locale data from the extra locale data array
10163 */
10164export declare const enum ɵExtraLocaleDataIndex {
10165 ExtraDayPeriodFormats = 0,
10166 ExtraDayPeriodStandalone = 1,
10167 ExtraDayPeriodsRules = 2
10168}
10169
10170/**
10171 * Finds the locale data for a given locale.
10172 *
10173 * @param locale The locale code.
10174 * @returns The locale data.
10175 * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
10176 */
10177export declare function ɵfindLocaleData(locale: string): any;
10178
10179/**
10180 * Loops over queued module definitions, if a given module definition has all of its
10181 * declarations resolved, it dequeues that module definition and sets the scope on
10182 * its declarations.
10183 */
10184export declare function ɵflushModuleScopingQueueAsMuchAsPossible(): void;
10185
10186export declare function ɵgetComponentViewDefinitionFactory(componentFactory: ComponentFactory<any>): ViewDefinitionFactory;
10187
10188export declare function ɵgetDebugNode__POST_R3__(nativeNode: Element): DebugElement__POST_R3__;
10189
10190export declare function ɵgetDebugNode__POST_R3__(nativeNode: Node): DebugNode__POST_R3__;
10191
10192export declare function ɵgetDebugNode__POST_R3__(nativeNode: null): null;
10193
10194export declare const ɵgetDebugNodeR2: (nativeNode: any) => DebugNode | null;
10195
10196/**
10197 * Retrieves directive instances associated with a given DOM node. Does not include
10198 * component instances.
10199 *
10200 * @usageNotes
10201 * Given the following DOM structure:
10202 *
10203 * ```html
10204 * <app-root>
10205 * <button my-button></button>
10206 * <my-comp></my-comp>
10207 * </app-root>
10208 * ```
10209 *
10210 * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`
10211 * directive that is associated with the DOM node.
10212 *
10213 * Calling `getDirectives` on `<my-comp>` will return an empty array.
10214 *
10215 * @param node DOM node for which to get the directives.
10216 * @returns Array of directives associated with the node.
10217 *
10218 * @publicApi
10219 * @globalApi ng
10220 */
10221export declare function ɵgetDirectives(node: Node): {}[];
10222
10223/**
10224 * Retrieves the host element of a component or directive instance.
10225 * The host element is the DOM element that matched the selector of the directive.
10226 *
10227 * @param componentOrDirective Component or directive instance for which the host
10228 * element should be retrieved.
10229 * @returns Host element of the target.
10230 *
10231 * @publicApi
10232 * @globalApi ng
10233 */
10234export declare function ɵgetHostElement(componentOrDirective: {}): Element;
10235
10236/**
10237 * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading
10238 * inherited value.
10239 *
10240 * @param type A type which may have its own (non-inherited) `ɵprov`.
10241 */
10242export declare function ɵgetInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null;
10243
10244/**
10245 * Returns the matching `LContext` data for a given DOM node, directive or component instance.
10246 *
10247 * This function will examine the provided DOM element, component, or directive instance\'s
10248 * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched
10249 * value will be that of the newly created `LContext`.
10250 *
10251 * If the monkey-patched value is the `LView` instance then the context value for that
10252 * target will be created and the monkey-patch reference will be updated. Therefore when this
10253 * function is called it may mutate the provided element\'s, component\'s or any of the associated
10254 * directive\'s monkey-patch values.
10255 *
10256 * If the monkey-patch value is not detected then the code will walk up the DOM until an element
10257 * is found which contains a monkey-patch reference. When that occurs then the provided element
10258 * will be updated with a new context (which is then returned). If the monkey-patch value is not
10259 * detected for a component/directive instance then it will throw an error (all components and
10260 * directives should be automatically monkey-patched by ivy).
10261 *
10262 * @param target Component, Directive or DOM Node.
10263 */
10264export declare function ɵgetLContext(target: any): ɵLContext | null;
10265
10266/**
10267 * Retrieves the default currency code for the given locale.
10268 *
10269 * The default is defined as the first currency which is still in use.
10270 *
10271 * @param locale The code of the locale whose currency code we want.
10272 * @returns The code of the default currency for the given locale.
10273 *
10274 */
10275export declare function ɵgetLocaleCurrencyCode(locale: string): string | null;
10276
10277/**
10278 * Retrieves the plural function used by ICU expressions to determine the plural case to use
10279 * for a given locale.
10280 * @param locale A locale code for the locale format rules to use.
10281 * @returns The plural function for the locale.
10282 * @see `NgPlural`
10283 * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
10284 */
10285export declare function ɵgetLocalePluralCase(locale: string): (value: number) => number;
10286
10287export declare function ɵgetModuleFactory__POST_R3__(id: string): NgModuleFactory<any>;
10288
10289export declare function ɵgetNgModuleById__POST_R3__(id: string): ɵNgModuleType;
10290
10291export declare function ɵgetSanitizationBypassType(value: any): ɵBypassType | null;
10292
10293export declare type ɵGetterFn = (obj: any) => any;
10294
10295
10296export declare const ɵglobal: any;
10297
10298export declare function ɵinitServicesIfNeeded(): void;
10299
10300export declare function ɵINJECTOR_IMPL__POST_R3__(providers: StaticProvider[], parent: Injector | undefined, name: string): Injector;
10301
10302/**
10303 * An internal token whose presence in an injector indicates that the injector should treat itself
10304 * as a root scoped injector when processing requests for unknown tokens which may indicate
10305 * they are provided in the root scope.
10306 */
10307export declare const ɵINJECTOR_SCOPE: InjectionToken<"root" | "platform" | null>;
10308
10309export 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;
10310
10311export declare function ɵinterpolate(valueCount: number, constAndInterp: string[]): string;
10312
10313export declare function ɵisBoundToModule__POST_R3__<C>(cf: ComponentFactory<C>): boolean;
10314
10315/**
10316 * Reports whether a given strategy is currently the default for change detection.
10317 * @param changeDetectionStrategy The strategy to check.
10318 * @returns True if the given strategy is the current default, false otherwise.
10319 * @see `ChangeDetectorStatus`
10320 * @see `ChangeDetectorRef`
10321 */
10322export declare function ɵisDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy): boolean;
10323
10324export declare function ɵisListLikeIterable(obj: any): boolean;
10325
10326/**
10327 * Determine if the argument is an Observable
10328 *
10329 * Strictly this tests that the `obj` is `Subscribable`, since `Observable`
10330 * types need additional methods, such as `lift()`. But it is adequate for our
10331 * needs since within the Angular framework code we only ever need to use the
10332 * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects
10333 * into `Observable` as needed.
10334 */
10335export declare const ɵisObservable: (obj: any | Observable<any>) => obj is Observable<any>;
10336
10337/**
10338 * Determine if the argument is shaped like a Promise
10339 */
10340export declare function ɵisPromise<T = any>(obj: any): obj is Promise<T>;
10341
10342/**
10343 * Determine if the argument is a Subscribable
10344 */
10345export declare function ɵisSubscribable(obj: any | Subscribable<any>): obj is Subscribable<any>;
10346
10347export declare const ɵivyEnabled = false;
10348
10349/**
10350 * The internal view context which is specific to a given DOM element, directive or
10351 * component instance. Each value in here (besides the LView and element node details)
10352 * can be present, null or undefined. If undefined then it implies the value has not been
10353 * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
10354 *
10355 * Each value will get filled when the respective value is examined within the getContext
10356 * function. The component, element and each directive instance will share the same instance
10357 * of the context.
10358 */
10359export declare interface ɵLContext {
10360 /**
10361 * The component's parent view data.
10362 */
10363 lView: LView;
10364 /**
10365 * The index instance of the node.
10366 */
10367 nodeIndex: number;
10368 /**
10369 * The instance of the DOM node that is attached to the lNode.
10370 */
10371 native: RNode;
10372 /**
10373 * The instance of the Component node.
10374 */
10375 component: {} | null | undefined;
10376 /**
10377 * The list of active directives that exist on this element.
10378 */
10379 directives: any[] | null | undefined;
10380 /**
10381 * The map of local references (local reference name => element or directive instance) that exist
10382 * on this element.
10383 */
10384 localRefs: {
10385 [key: string]: any;
10386 } | null | undefined;
10387}
10388
10389/**
10390 * Used to enable lifecycle hooks on the root component.
10391 *
10392 * Include this feature when calling `renderComponent` if the root component
10393 * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't
10394 * be called properly.
10395 *
10396 * Example:
10397 *
10398 * ```
10399 * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});
10400 * ```
10401 */
10402export declare function ɵLifecycleHooksFeature(component: any, def: ɵComponentDef<any>): void;
10403
10404/**
10405 * Index of each type of locale data from the locale data array
10406 */
10407export declare enum ɵLocaleDataIndex {
10408 LocaleId = 0,
10409 DayPeriodsFormat = 1,
10410 DayPeriodsStandalone = 2,
10411 DaysFormat = 3,
10412 DaysStandalone = 4,
10413 MonthsFormat = 5,
10414 MonthsStandalone = 6,
10415 Eras = 7,
10416 FirstDayOfWeek = 8,
10417 WeekendRange = 9,
10418 DateFormat = 10,
10419 TimeFormat = 11,
10420 DateTimeFormat = 12,
10421 NumberSymbols = 13,
10422 NumberFormats = 14,
10423 CurrencyCode = 15,
10424 CurrencySymbol = 16,
10425 CurrencyName = 17,
10426 Currencies = 18,
10427 Directionality = 19,
10428 PluralCase = 20,
10429 ExtraData = 21
10430}
10431
10432/**
10433 * @suppress {globalThis}
10434 */
10435export declare function ɵmakeDecorator<T>(name: string, props?: (...args: any[]) => any, parentClass?: any, additionalProcessing?: (type: Type<T>) => void, typeFn?: (type: Type<T>, ...args: any[]) => void): {
10436 new (...args: any[]): any;
10437 (...args: any[]): any;
10438 (...args: any[]): (cls: any) => any;
10439};
10440
10441/**
10442 * Marks the component as dirty (needing change detection). Marking a component dirty will
10443 * schedule a change detection on it at some point in the future.
10444 *
10445 * Marking an already dirty component as dirty won't do anything. Only one outstanding change
10446 * detection can be scheduled per component tree.
10447 *
10448 * @param component Component to mark as dirty.
10449 */
10450export declare function ɵmarkDirty(component: {}): void;
10451
10452export declare type ɵMethodFn = (obj: any, args: any[]) => any;
10453
10454export declare function ɵmod(providers: NgModuleProviderDef[]): NgModuleDefinition;
10455
10456export declare function ɵmpd(flags: ɵNodeFlags, token: any, value: any, deps: ([ɵDepFlags, any] | any)[]): NgModuleProviderDef;
10457
10458export declare function ɵncd(ngContentIndex: null | number, index: number): NodeDef;
10459
10460
10461export declare const ɵNG_COMP_DEF: string;
10462
10463export declare const ɵNG_DIR_DEF: string;
10464
10465/**
10466 * If a directive is diPublic, bloomAdd sets a property on the type with this constant as
10467 * the key and the directive's unique ID as the value. This allows us to map directives to their
10468 * bloom filter bit for DI.
10469 */
10470export declare const ɵNG_ELEMENT_ID: string;
10471
10472export declare const ɵNG_INJ_DEF: string;
10473
10474export declare const ɵNG_MOD_DEF: string;
10475
10476export declare const ɵNG_PIPE_DEF: string;
10477
10478export declare const ɵNG_PROV_DEF: string;
10479
10480/**
10481 * Runtime link information for NgModules.
10482 *
10483 * This is the internal data structure used by the runtime to assemble components, directives,
10484 * pipes, and injectors.
10485 *
10486 * NOTE: Always use `ɵɵdefineNgModule` function to create this object,
10487 * never create the object directly since the shape of this object
10488 * can change between versions.
10489 */
10490export declare interface ɵNgModuleDef<T> {
10491 /** Token representing the module. Used by DI. */
10492 type: T;
10493 /** List of components to bootstrap. */
10494 bootstrap: Type<any>[] | (() => Type<any>[]);
10495 /** List of components, directives, and pipes declared by this module. */
10496 declarations: Type<any>[] | (() => Type<any>[]);
10497 /** List of modules or `ModuleWithProviders` imported by this module. */
10498 imports: Type<any>[] | (() => Type<any>[]);
10499 /**
10500 * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
10501 * module.
10502 */
10503 exports: Type<any>[] | (() => Type<any>[]);
10504 /**
10505 * Cached value of computed `transitiveCompileScopes` for this module.
10506 *
10507 * This should never be read directly, but accessed via `transitiveScopesFor`.
10508 */
10509 transitiveCompileScopes: ɵNgModuleTransitiveScopes | null;
10510 /** The set of schemas that declare elements to be allowed in the NgModule. */
10511 schemas: SchemaMetadata[] | null;
10512 /** Unique ID for the module with which it should be registered. */
10513 id: string | null;
10514}
10515
10516export declare class ɵNgModuleFactory<T> extends NgModuleFactory<T> {
10517 moduleType: Type<T>;
10518 constructor(moduleType: Type<T>);
10519 create(parentInjector: Injector | null): NgModuleRef<T>;
10520}
10521
10522/**
10523 * Represents the expansion of an `NgModule` into its scopes.
10524 *
10525 * A scope is a set of directives and pipes that are visible in a particular context. Each
10526 * `NgModule` has two scopes. The `compilation` scope is the set of directives and pipes that will
10527 * be recognized in the templates of components declared by the module. The `exported` scope is the
10528 * set of directives and pipes exported by a module (that is, module B's exported scope gets added
10529 * to module A's compilation scope when module A imports B).
10530 */
10531export declare interface ɵNgModuleTransitiveScopes {
10532 compilation: {
10533 directives: Set<any>;
10534 pipes: Set<any>;
10535 };
10536 exported: {
10537 directives: Set<any>;
10538 pipes: Set<any>;
10539 };
10540 schemas: SchemaMetadata[] | null;
10541}
10542
10543export declare interface ɵNgModuleType<T = any> extends Type<T> {
10544 ɵmod: ɵNgModuleDef<T>;
10545}
10546
10547
10548export declare interface ɵNO_CHANGE {
10549 __brand__: 'NO_CHANGE';
10550}
10551
10552/** A special value which designates that a value has not changed. */
10553export declare const ɵNO_CHANGE: ɵNO_CHANGE;
10554
10555/**
10556 * Bitmask for NodeDef.flags.
10557 * Naming convention:
10558 * - `Type...`: flags that are mutually exclusive
10559 * - `Cat...`: union of multiple `Type...` (short for category).
10560 */
10561export declare const enum ɵNodeFlags {
10562 None = 0,
10563 TypeElement = 1,
10564 TypeText = 2,
10565 ProjectedTemplate = 4,
10566 CatRenderNode = 3,
10567 TypeNgContent = 8,
10568 TypePipe = 16,
10569 TypePureArray = 32,
10570 TypePureObject = 64,
10571 TypePurePipe = 128,
10572 CatPureExpression = 224,
10573 TypeValueProvider = 256,
10574 TypeClassProvider = 512,
10575 TypeFactoryProvider = 1024,
10576 TypeUseExistingProvider = 2048,
10577 LazyProvider = 4096,
10578 PrivateProvider = 8192,
10579 TypeDirective = 16384,
10580 Component = 32768,
10581 CatProviderNoDirective = 3840,
10582 CatProvider = 20224,
10583 OnInit = 65536,
10584 OnDestroy = 131072,
10585 DoCheck = 262144,
10586 OnChanges = 524288,
10587 AfterContentInit = 1048576,
10588 AfterContentChecked = 2097152,
10589 AfterViewInit = 4194304,
10590 AfterViewChecked = 8388608,
10591 EmbeddedViews = 16777216,
10592 ComponentView = 33554432,
10593 TypeContentQuery = 67108864,
10594 TypeViewQuery = 134217728,
10595 StaticQuery = 268435456,
10596 DynamicQuery = 536870912,
10597 TypeNgModule = 1073741824,
10598 EmitDistinctChangesOnly = -2147483648,
10599 CatQuery = 201326592,
10600 Types = 201347067
10601}
10602
10603/**
10604 * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls
10605 * to framework to perform rendering.
10606 */
10607export declare class ɵNoopNgZone implements NgZone {
10608 readonly hasPendingMicrotasks: boolean;
10609 readonly hasPendingMacrotasks: boolean;
10610 readonly isStable: boolean;
10611 readonly onUnstable: EventEmitter<any>;
10612 readonly onMicrotaskEmpty: EventEmitter<any>;
10613 readonly onStable: EventEmitter<any>;
10614 readonly onError: EventEmitter<any>;
10615 run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any): T;
10616 runGuarded<T>(fn: (...args: any[]) => any, applyThis?: any, applyArgs?: any): T;
10617 runOutsideAngular<T>(fn: (...args: any[]) => T): T;
10618 runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any, name?: string): T;
10619}
10620
10621
10622/**
10623 * Convince closure compiler that the wrapped function has no side-effects.
10624 *
10625 * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to
10626 * allow us to execute a function but have closure compiler mark the call as no-side-effects.
10627 * It is important that the return value for the `noSideEffects` function be assigned
10628 * to something which is retained otherwise the call to `noSideEffects` will be removed by closure
10629 * compiler.
10630 */
10631export declare function ɵnoSideEffects<T>(fn: () => T): T;
10632
10633
10634export declare const ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR: {};
10635
10636export declare function ɵnov(view: ViewData, index: number): any;
10637
10638export declare function ɵoverrideComponentView(comp: Type<any>, componentFactory: ComponentFactory<any>): void;
10639
10640export declare function ɵoverrideProvider(override: ProviderOverride): void;
10641
10642export declare function ɵpad(checkIndex: number, argCount: number): NodeDef;
10643
10644/**
10645 * Patch the definition of a component with directives and pipes from the compilation scope of
10646 * a given module.
10647 */
10648export declare function ɵpatchComponentDefWithScope<C>(componentDef: ɵComponentDef<C>, transitiveScopes: ɵNgModuleTransitiveScopes): void;
10649
10650export declare function ɵpid(flags: ɵNodeFlags, ctor: any, deps: ([ɵDepFlags, any] | any)[]): NodeDef;
10651
10652/**
10653 * Runtime link information for Pipes.
10654 *
10655 * This is an internal data structure used by the renderer to link
10656 * pipes into templates.
10657 *
10658 * NOTE: Always use `definePipe` function to create this object,
10659 * never create the object directly since the shape of this object
10660 * can change between versions.
10661 *
10662 * See: {@link definePipe}
10663 */
10664export declare interface ɵPipeDef<T> {
10665 /** Token representing the pipe. */
10666 type: Type<T>;
10667 /**
10668 * Pipe name.
10669 *
10670 * Used to resolve pipe in templates.
10671 */
10672 readonly name: string;
10673 /**
10674 * Factory function used to create a new pipe instance. Will be null initially.
10675 * Populated when the factory is first requested by pipe instantiation logic.
10676 */
10677 factory: FactoryFn<T> | null;
10678 /**
10679 * Whether or not the pipe is pure.
10680 *
10681 * Pure pipes result only depends on the pipe input and not on internal
10682 * state of the pipe.
10683 */
10684 readonly pure: boolean;
10685 onDestroy: (() => void) | null;
10686}
10687
10688
10689/**
10690 * A shared interface which contains an animation player
10691 */
10692export declare interface ɵPlayer {
10693 parent?: ɵPlayer | null;
10694 state: ɵPlayState;
10695 play(): void;
10696 pause(): void;
10697 finish(): void;
10698 destroy(): void;
10699 addEventListener(state: ɵPlayState | string, cb: (data?: any) => any): void;
10700}
10701
10702/**
10703 * Used as a reference to build a player from a styling template binding
10704 * (`[style]` and `[class]`).
10705 *
10706 * The `fn` function will be called once any styling-related changes are
10707 * evaluated on an element and is expected to return a player that will
10708 * be then run on the element.
10709 *
10710 * `[style]`, `[style.prop]`, `[class]` and `[class.name]` template bindings
10711 * all accept a `PlayerFactory` as input and this player factories.
10712 */
10713export declare interface ɵPlayerFactory {
10714 '__brand__': 'Brand for PlayerFactory that nothing will match';
10715}
10716
10717/**
10718 * Designed to be used as an injection service to capture all animation players.
10719 *
10720 * When present all animation players will be passed into the flush method below.
10721 * This feature is designed to service application-wide animation testing, live
10722 * debugging as well as custom animation choreographing tools.
10723 */
10724export declare interface ɵPlayerHandler {
10725 /**
10726 * Designed to kick off the player at the end of change detection
10727 */
10728 flushPlayers(): void;
10729 /**
10730 * @param player The player that has been scheduled to run within the application.
10731 * @param context The context as to where the player was bound to
10732 */
10733 queuePlayer(player: ɵPlayer, context: ComponentInstance | DirectiveInstance | HTMLElement): void;
10734}
10735
10736/**
10737 * The state of a given player
10738 *
10739 * Do not change the increasing nature of the numbers since the player
10740 * code may compare state by checking if a number is higher or lower than
10741 * a certain numeric value.
10742 */
10743export declare const enum ɵPlayState {
10744 Pending = 0,
10745 Running = 1,
10746 Paused = 2,
10747 Finished = 100,
10748 Destroyed = 200
10749}
10750
10751export declare function ɵpod(checkIndex: number, propToIndex: {
10752 [p: string]: number;
10753}): NodeDef;
10754
10755export declare function ɵppd(checkIndex: number, argCount: number): NodeDef;
10756
10757export declare function ɵprd(flags: ɵNodeFlags, matchedQueries: null | [string | number, ɵQueryValueType][], token: any, value: any, deps: ([ɵDepFlags, any] | any)[]): NodeDef;
10758
10759/**
10760 * Profiler function which the runtime will invoke before and after user code.
10761 */
10762export declare interface ɵProfiler {
10763 (event: ɵProfilerEvent, instance: {} | null, hookOrListener?: (e?: any) => any): void;
10764}
10765
10766
10767/**
10768 * Profiler events is an enum used by the profiler to distinguish between different calls of user
10769 * code invoked throughout the application lifecycle.
10770 */
10771export declare const enum ɵProfilerEvent {
10772 /**
10773 * Corresponds to the point in time before the runtime has called the template function of a
10774 * component with `RenderFlags.Create`.
10775 */
10776 TemplateCreateStart = 0,
10777 /**
10778 * Corresponds to the point in time after the runtime has called the template function of a
10779 * component with `RenderFlags.Create`.
10780 */
10781 TemplateCreateEnd = 1,
10782 /**
10783 * Corresponds to the point in time before the runtime has called the template function of a
10784 * component with `RenderFlags.Update`.
10785 */
10786 TemplateUpdateStart = 2,
10787 /**
10788 * Corresponds to the point in time after the runtime has called the template function of a
10789 * component with `RenderFlags.Update`.
10790 */
10791 TemplateUpdateEnd = 3,
10792 /**
10793 * Corresponds to the point in time before the runtime has called a lifecycle hook of a component
10794 * or directive.
10795 */
10796 LifecycleHookStart = 4,
10797 /**
10798 * Corresponds to the point in time after the runtime has called a lifecycle hook of a component
10799 * or directive.
10800 */
10801 LifecycleHookEnd = 5,
10802 /**
10803 * Corresponds to the point in time before the runtime has evaluated an expression associated with
10804 * an event or an output.
10805 */
10806 OutputStart = 6,
10807 /**
10808 * Corresponds to the point in time after the runtime has evaluated an expression associated with
10809 * an event or an output.
10810 */
10811 OutputEnd = 7
10812}
10813
10814/**
10815 * Publishes a collection of default debug tools onto`window.ng`.
10816 *
10817 * These functions are available globally when Angular is in development
10818 * mode and are automatically stripped away from prod mode is on.
10819 */
10820export declare function ɵpublishDefaultGlobalUtils(): void;
10821
10822/**
10823 * Publishes the given function to `window.ng` so that it can be
10824 * used from the browser console when an application is not in production.
10825 */
10826export declare function ɵpublishGlobalUtil(name: string, fn: Function): void;
10827
10828export declare function ɵqud(flags: ɵNodeFlags, id: number, bindings: {
10829 [propName: string]: ɵQueryBindingType;
10830}): NodeDef;
10831
10832export declare const enum ɵQueryBindingType {
10833 First = 0,
10834 All = 1
10835}
10836
10837export declare const enum ɵQueryValueType {
10838 ElementRef = 0,
10839 RenderElement = 1,
10840 TemplateRef = 2,
10841 ViewContainerRef = 3,
10842 Provider = 4
10843}
10844
10845export declare class ɵReflectionCapabilities implements PlatformReflectionCapabilities {
10846 private _reflect;
10847 constructor(reflect?: any);
10848 isReflectionEnabled(): boolean;
10849 factory<T>(t: Type<T>): (args: any[]) => T;
10850 private _ownParameters;
10851 parameters(type: Type<any>): any[][];
10852 private _ownAnnotations;
10853 annotations(typeOrFunc: Type<any>): any[];
10854 private _ownPropMetadata;
10855 propMetadata(typeOrFunc: any): {
10856 [key: string]: any[];
10857 };
10858 ownPropMetadata(typeOrFunc: any): {
10859 [key: string]: any[];
10860 };
10861 hasLifecycleHook(type: any, lcProperty: string): boolean;
10862 guards(type: any): {
10863 [key: string]: any;
10864 };
10865 getter(name: string): ɵGetterFn;
10866 setter(name: string): ɵSetterFn;
10867 method(name: string): ɵMethodFn;
10868 importUri(type: any): string;
10869 resourceUri(type: any): string;
10870 resolveIdentifier(name: string, moduleUrl: string, members: string[], runtime: any): any;
10871 resolveEnum(enumIdentifier: any, name: string): any;
10872}
10873
10874/**
10875 * Register locale data to be used internally by Angular. See the
10876 * ["I18n guide"](guide/i18n-common-format-data-locale) to know how to import additional locale
10877 * data.
10878 *
10879 * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1
10880 */
10881export declare function ɵregisterLocaleData(data: any, localeId?: string | any, extraData?: any): void;
10882
10883/**
10884 * Registers a loaded module. Should only be called from generated NgModuleFactory code.
10885 * @publicApi
10886 */
10887export declare function ɵregisterModuleFactory(id: string, factory: NgModuleFactory<any>): void;
10888
10889export declare function ɵregisterNgModuleType(ngModuleType: ɵNgModuleType): void;
10890
10891/**
10892 * Render3 implementation of {@link viewEngine_ComponentFactory}.
10893 */
10894export declare class ɵRender3ComponentFactory<T> extends ComponentFactory<T> {
10895 private componentDef;
10896 private ngModule?;
10897 selector: string;
10898 componentType: Type<any>;
10899 ngContentSelectors: string[];
10900 isBoundToModule: boolean;
10901 get inputs(): {
10902 propName: string;
10903 templateName: string;
10904 }[];
10905 get outputs(): {
10906 propName: string;
10907 templateName: string;
10908 }[];
10909 /**
10910 * @param componentDef The component definition.
10911 * @param ngModule The NgModuleRef to which the factory is bound.
10912 */
10913 constructor(componentDef: ɵComponentDef<any>, ngModule?: NgModuleRef<any> | undefined);
10914 create(injector: Injector, projectableNodes?: any[][] | undefined, rootSelectorOrNode?: any, ngModule?: NgModuleRef<any> | undefined): ComponentRef<T>;
10915}
10916
10917/**
10918 * Represents an instance of a Component created via a {@link ComponentFactory}.
10919 *
10920 * `ComponentRef` provides access to the Component Instance as well other objects related to this
10921 * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}
10922 * method.
10923 *
10924 */
10925export declare class ɵRender3ComponentRef<T> extends ComponentRef<T> {
10926 location: ElementRef;
10927 private _rootLView;
10928 private _tNode;
10929 instance: T;
10930 hostView: ɵViewRef<T>;
10931 changeDetectorRef: ChangeDetectorRef;
10932 componentType: Type<T>;
10933 constructor(componentType: Type<T>, instance: T, location: ElementRef, _rootLView: LView, _tNode: TElementNode | TContainerNode | TElementContainerNode);
10934 get injector(): Injector;
10935 destroy(): void;
10936 onDestroy(callback: () => void): void;
10937}
10938
10939export declare class ɵRender3NgModuleRef<T> extends NgModuleRef<T> implements InternalNgModuleRef<T> {
10940 _parent: Injector | null;
10941 _bootstrapComponents: Type<any>[];
10942 _r3Injector: R3Injector;
10943 injector: Injector;
10944 instance: T;
10945 destroyCbs: (() => void)[] | null;
10946 readonly componentFactoryResolver: ComponentFactoryResolver_2;
10947 constructor(ngModuleType: Type<T>, _parent: Injector | null);
10948 get(token: any, notFoundValue?: any, injectFlags?: InjectFlags): any;
10949 destroy(): void;
10950 onDestroy(callback: () => void): void;
10951}
10952
10953/**
10954 * Bootstraps a Component into an existing host element and returns an instance
10955 * of the component.
10956 *
10957 * Use this function to bootstrap a component into the DOM tree. Each invocation
10958 * of this function will create a separate tree of components, injectors and
10959 * change detection cycles and lifetimes. To dynamically insert a new component
10960 * into an existing tree such that it shares the same injection, change detection
10961 * and object lifetime, use {@link ViewContainer#createComponent}.
10962 *
10963 * @param componentType Component to bootstrap
10964 * @param options Optional parameters which control bootstrapping
10965 */
10966export declare function ɵrenderComponent<T>(componentType: ɵComponentType<T> | Type<T>, opts?: CreateComponentOptions): T;
10967
10968/**
10969 * Flags passed into template functions to determine which blocks (i.e. creation, update)
10970 * should be executed.
10971 *
10972 * Typically, a template runs both the creation block and the update block on initialization and
10973 * subsequent runs only execute the update block. However, dynamically created views require that
10974 * the creation block be executed separately from the update block (for backwards compat).
10975 */
10976export declare const enum ɵRenderFlags {
10977 Create = 1,
10978 Update = 2
10979}
10980
10981export declare function ɵresetCompiledComponents(): void;
10982
10983export declare function ɵresetJitOptions(): void;
10984
10985/**
10986 * Used to resolve resource URLs on `@Component` when used with JIT compilation.
10987 *
10988 * Example:
10989 * ```
10990 * @Component({
10991 * selector: 'my-comp',
10992 * templateUrl: 'my-comp.html', // This requires asynchronous resolution
10993 * })
10994 * class MyComponent{
10995 * }
10996 *
10997 * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process
10998 * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.
10999 *
11000 * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into
11001 * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.
11002 *
11003 * // Use browser's `fetch()` function as the default resource resolution strategy.
11004 * resolveComponentResources(fetch).then(() => {
11005 * // After resolution all URLs have been converted into `template` strings.
11006 * renderComponent(MyComponent);
11007 * });
11008 *
11009 * ```
11010 *
11011 * NOTE: In AOT the resolution happens during compilation, and so there should be no need
11012 * to call this method outside JIT mode.
11013 *
11014 * @param resourceResolver a function which is responsible for returning a `Promise` to the
11015 * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.
11016 */
11017export declare function ɵresolveComponentResources(resourceResolver: (url: string) => (Promise<string | {
11018 text(): Promise<string>;
11019}>)): Promise<void>;
11020
11021export declare class ɵRuntimeError extends Error {
11022 code: ɵRuntimeErrorCode;
11023 constructor(code: ɵRuntimeErrorCode, message: string);
11024}
11025
11026
11027export declare const enum ɵRuntimeErrorCode {
11028 EXPRESSION_CHANGED_AFTER_CHECKED = "100",
11029 CYCLIC_DI_DEPENDENCY = "200",
11030 PROVIDER_NOT_FOUND = "201",
11031 MULTIPLE_COMPONENTS_MATCH = "300",
11032 EXPORT_NOT_FOUND = "301",
11033 PIPE_NOT_FOUND = "302",
11034 UNKNOWN_BINDING = "303",
11035 UNKNOWN_ELEMENT = "304",
11036 TEMPLATE_STRUCTURE_ERROR = "305"
11037}
11038
11039/**
11040 * Marker interface for a value that's safe to use as HTML.
11041 *
11042 * @publicApi
11043 */
11044export declare interface ɵSafeHtml extends ɵSafeValue {
11045}
11046
11047/**
11048 * Marker interface for a value that's safe to use as a URL to load executable code from.
11049 *
11050 * @publicApi
11051 */
11052export declare interface ɵSafeResourceUrl extends ɵSafeValue {
11053}
11054
11055/**
11056 * Marker interface for a value that's safe to use as JavaScript.
11057 *
11058 * @publicApi
11059 */
11060export declare interface ɵSafeScript extends ɵSafeValue {
11061}
11062
11063/**
11064 * Marker interface for a value that's safe to use as style (CSS).
11065 *
11066 * @publicApi
11067 */
11068export declare interface ɵSafeStyle extends ɵSafeValue {
11069}
11070
11071/**
11072 * Marker interface for a value that's safe to use as a URL linking to a document.
11073 *
11074 * @publicApi
11075 */
11076export declare interface ɵSafeUrl extends ɵSafeValue {
11077}
11078
11079/**
11080 * Marker interface for a value that's safe to use in a particular context.
11081 *
11082 * @publicApi
11083 */
11084export declare interface ɵSafeValue {
11085}
11086
11087/**
11088 * Adds decorator, constructor, and property metadata to a given type via static metadata fields
11089 * on the type.
11090 *
11091 * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.
11092 *
11093 * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments
11094 * being tree-shaken away during production builds.
11095 */
11096export declare function ɵsetClassMetadata(type: Type<any>, decorators: any[] | null, ctorParameters: (() => any[]) | null, propDecorators: {
11097 [field: string]: any;
11098} | null): void;
11099
11100export declare function ɵsetCurrentInjector(injector: Injector | null | undefined): Injector | undefined | null;
11101
11102
11103/**
11104 * Tell ivy what the `document` is for this platform.
11105 *
11106 * It is only necessary to call this if the current platform is not a browser.
11107 *
11108 * @param document The object representing the global `document` in this environment.
11109 */
11110export declare function ɵsetDocument(document: Document | undefined): void;
11111
11112
11113/**
11114 * Sets the locale id that will be used for translations and ICU expressions.
11115 * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
11116 * but is now defined as a global value.
11117 *
11118 * @param localeId
11119 */
11120export declare function ɵsetLocaleId(localeId: string): void;
11121
11122
11123export declare type ɵSetterFn = (obj: any, value: any) => void;
11124
11125/** Store a value in the `data` at a given `index`. */
11126export declare function ɵstore<T>(tView: TView, lView: LView, index: number, value: T): void;
11127
11128
11129export declare function ɵstringify(token: any): string;
11130
11131export declare const ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__: typeof injectChangeDetectorRef;
11132
11133export declare const ɵSWITCH_COMPILE_COMPONENT__POST_R3__: typeof ɵcompileComponent;
11134
11135export declare const ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__: typeof ɵcompileDirective;
11136
11137export declare const ɵSWITCH_COMPILE_INJECTABLE__POST_R3__: typeof compileInjectable;
11138
11139export declare const ɵSWITCH_COMPILE_NGMODULE__POST_R3__: typeof ɵcompileNgModule;
11140
11141export declare const ɵSWITCH_COMPILE_PIPE__POST_R3__: typeof ɵcompilePipe;
11142
11143export declare const ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__: typeof injectElementRef;
11144
11145
11146export declare const ɵSWITCH_IVY_ENABLED__POST_R3__ = true;
11147
11148export declare const ɵSWITCH_RENDERER2_FACTORY__POST_R3__: typeof injectRenderer2;
11149
11150export declare const ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__: typeof injectTemplateRef;
11151
11152export declare const ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__: typeof injectViewContainerRef;
11153
11154export declare function ɵted(checkIndex: number, ngContentIndex: number | null, staticText: string[]): NodeDef;
11155
11156/**
11157 * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.
11158 *
11159 * This operation is memoized and the result is cached on the module's definition. This function can
11160 * be called on modules with components that have not fully compiled yet, but the result should not
11161 * be used until they have.
11162 *
11163 * @param moduleType module that transitive scope should be calculated for.
11164 */
11165export declare function ɵtransitiveScopesFor<T>(moduleType: Type<T>): ɵNgModuleTransitiveScopes;
11166
11167/**
11168 * Helper function to remove all the locale data from `LOCALE_DATA`.
11169 */
11170export declare function ɵunregisterLocaleData(): void;
11171
11172export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
11173
11174export declare function ɵunwrapSafeValue<T>(value: T): T;
11175
11176export declare function ɵvid(flags: ɵViewFlags, nodes: NodeDef[], updateDirectives?: null | ViewUpdateFn, updateRenderer?: null | ViewUpdateFn): ɵViewDefinition;
11177
11178export declare interface ɵViewDefinition extends Definition<ViewDefinitionFactory> {
11179 flags: ɵViewFlags;
11180 updateDirectives: ViewUpdateFn;
11181 updateRenderer: ViewUpdateFn;
11182 handleEvent: ViewHandleEventFn;
11183 /**
11184 * Order: Depth first.
11185 * Especially providers are before elements / anchors.
11186 */
11187 nodes: NodeDef[];
11188 /** aggregated NodeFlags for all nodes **/
11189 nodeFlags: ɵNodeFlags;
11190 rootNodeFlags: ɵNodeFlags;
11191 lastRenderRootNode: NodeDef | null;
11192 bindingCount: number;
11193 outputCount: number;
11194 /**
11195 * Binary or of all query ids that are matched by one of the nodes.
11196 * This includes query ids from templates as well.
11197 * Used as a bloom filter.
11198 */
11199 nodeMatchedQueries: number;
11200}
11201
11202/**
11203 * Bitmask for ViewDefinition.flags.
11204 */
11205export declare const enum ɵViewFlags {
11206 None = 0,
11207 OnPush = 2
11208}
11209
11210export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, InternalViewRef, viewEngine_ChangeDetectorRef_interface {
11211 /**
11212 * This represents the `LView` associated with the point where `ChangeDetectorRef` was
11213 * requested.
11214 *
11215 * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
11216 */
11217 private _cdRefInjectingView?;
11218 private _appRef;
11219 private _attachedToViewContainer;
11220 get rootNodes(): any[];
11221 constructor(
11222 /**
11223 * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.
11224 *
11225 * When ViewRef is created for a dynamic component, this also represents the `LView` for the
11226 * component.
11227 *
11228 * For a "regular" ViewRef created for an embedded view, this is the `LView` for the embedded
11229 * view.
11230 *
11231 * @internal
11232 */
11233 _lView: LView,
11234 /**
11235 * This represents the `LView` associated with the point where `ChangeDetectorRef` was
11236 * requested.
11237 *
11238 * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
11239 */
11240 _cdRefInjectingView?: LView | undefined);
11241 get context(): T;
11242 set context(value: T);
11243 get destroyed(): boolean;
11244 destroy(): void;
11245 onDestroy(callback: Function): void;
11246 /**
11247 * Marks a view and all of its ancestors dirty.
11248 *
11249 * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is
11250 * checked when it needs to be re-rendered but the two normal triggers haven't marked it
11251 * dirty (i.e. inputs haven't changed and events haven't fired in the view).
11252 *
11253 * <!-- TODO: Add a link to a chapter on OnPush components -->
11254 *
11255 * @usageNotes
11256 * ### Example
11257 *
11258 * ```typescript
11259 * @Component({
11260 * selector: 'app-root',
11261 * template: `Number of ticks: {{numberOfTicks}}`
11262 * changeDetection: ChangeDetectionStrategy.OnPush,
11263 * })
11264 * class AppComponent {
11265 * numberOfTicks = 0;
11266 *
11267 * constructor(private ref: ChangeDetectorRef) {
11268 * setInterval(() => {
11269 * this.numberOfTicks++;
11270 * // the following is required, otherwise the view will not be updated
11271 * this.ref.markForCheck();
11272 * }, 1000);
11273 * }
11274 * }
11275 * ```
11276 */
11277 markForCheck(): void;
11278 /**
11279 * Detaches the view from the change detection tree.
11280 *
11281 * Detached views will not be checked during change detection runs until they are
11282 * re-attached, even if they are dirty. `detach` can be used in combination with
11283 * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
11284 * detection checks.
11285 *
11286 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
11287 * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
11288 *
11289 * @usageNotes
11290 * ### Example
11291 *
11292 * The following example defines a component with a large list of readonly data.
11293 * Imagine the data changes constantly, many times per second. For performance reasons,
11294 * we want to check and update the list every five seconds. We can do that by detaching
11295 * the component's change detector and doing a local check every five seconds.
11296 *
11297 * ```typescript
11298 * class DataProvider {
11299 * // in a real application the returned data will be different every time
11300 * get data() {
11301 * return [1,2,3,4,5];
11302 * }
11303 * }
11304 *
11305 * @Component({
11306 * selector: 'giant-list',
11307 * template: `
11308 * <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
11309 * `,
11310 * })
11311 * class GiantList {
11312 * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
11313 * ref.detach();
11314 * setInterval(() => {
11315 * this.ref.detectChanges();
11316 * }, 5000);
11317 * }
11318 * }
11319 *
11320 * @Component({
11321 * selector: 'app',
11322 * providers: [DataProvider],
11323 * template: `
11324 * <giant-list><giant-list>
11325 * `,
11326 * })
11327 * class App {
11328 * }
11329 * ```
11330 */
11331 detach(): void;
11332 /**
11333 * Re-attaches a view to the change detection tree.
11334 *
11335 * This can be used to re-attach views that were previously detached from the tree
11336 * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
11337 *
11338 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
11339 *
11340 * @usageNotes
11341 * ### Example
11342 *
11343 * The following example creates a component displaying `live` data. The component will detach
11344 * its change detector from the main change detector tree when the component's live property
11345 * is set to false.
11346 *
11347 * ```typescript
11348 * class DataProvider {
11349 * data = 1;
11350 *
11351 * constructor() {
11352 * setInterval(() => {
11353 * this.data = this.data * 2;
11354 * }, 500);
11355 * }
11356 * }
11357 *
11358 * @Component({
11359 * selector: 'live-data',
11360 * inputs: ['live'],
11361 * template: 'Data: {{dataProvider.data}}'
11362 * })
11363 * class LiveData {
11364 * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
11365 *
11366 * set live(value) {
11367 * if (value) {
11368 * this.ref.reattach();
11369 * } else {
11370 * this.ref.detach();
11371 * }
11372 * }
11373 * }
11374 *
11375 * @Component({
11376 * selector: 'app-root',
11377 * providers: [DataProvider],
11378 * template: `
11379 * Live Update: <input type="checkbox" [(ngModel)]="live">
11380 * <live-data [live]="live"><live-data>
11381 * `,
11382 * })
11383 * class AppComponent {
11384 * live = true;
11385 * }
11386 * ```
11387 */
11388 reattach(): void;
11389 /**
11390 * Checks the view and its children.
11391 *
11392 * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement
11393 * local change detection checks.
11394 *
11395 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
11396 * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
11397 *
11398 * @usageNotes
11399 * ### Example
11400 *
11401 * The following example defines a component with a large list of readonly data.
11402 * Imagine, the data changes constantly, many times per second. For performance reasons,
11403 * we want to check and update the list every five seconds.
11404 *
11405 * We can do that by detaching the component's change detector and doing a local change detection
11406 * check every five seconds.
11407 *
11408 * See {@link ChangeDetectorRef#detach detach} for more information.
11409 */
11410 detectChanges(): void;
11411 /**
11412 * Checks the change detector and its children, and throws if any changes are detected.
11413 *
11414 * This is used in development mode to verify that running change detection doesn't
11415 * introduce other changes.
11416 */
11417 checkNoChanges(): void;
11418 attachToViewContainerRef(): void;
11419 detachFromAppRef(): void;
11420 attachToAppRef(appRef: ViewRefTracker): void;
11421}
11422
11423/**
11424 * Wait on component until it is rendered.
11425 *
11426 * This function returns a `Promise` which is resolved when the component's
11427 * change detection is executed. This is determined by finding the scheduler
11428 * associated with the `component`'s render tree and waiting until the scheduler
11429 * flushes. If nothing is scheduled, the function returns a resolved promise.
11430 *
11431 * Example:
11432 * ```
11433 * await whenRendered(myComponent);
11434 * ```
11435 *
11436 * @param component Component to wait upon
11437 * @returns Promise which resolves when the component is rendered.
11438 */
11439export declare function ɵwhenRendered(component: any): Promise<null>;
11440
11441/**
11442 * Advances to an element for later binding instructions.
11443 *
11444 * Used in conjunction with instructions like {@link property} to act on elements with specified
11445 * indices, for example those created with {@link element} or {@link elementStart}.
11446 *
11447 * ```ts
11448 * (rf: RenderFlags, ctx: any) => {
11449 * if (rf & 1) {
11450 * text(0, 'Hello');
11451 * text(1, 'Goodbye')
11452 * element(2, 'div');
11453 * }
11454 * if (rf & 2) {
11455 * advance(2); // Advance twice to the <div>.
11456 * property('title', 'test');
11457 * }
11458 * }
11459 * ```
11460 * @param delta Number of elements to advance forwards by.
11461 *
11462 * @codeGenApi
11463 */
11464export declare function ɵɵadvance(delta: number): void;
11465
11466/**
11467 * Updates the value of or removes a bound attribute on an Element.
11468 *
11469 * Used in the case of `[attr.title]="value"`
11470 *
11471 * @param name name The name of the attribute.
11472 * @param value value The attribute is removed when value is `null` or `undefined`.
11473 * Otherwise the attribute value is set to the stringified value.
11474 * @param sanitizer An optional function used to sanitize the value.
11475 * @param namespace Optional namespace to use when setting the attribute.
11476 *
11477 * @codeGenApi
11478 */
11479export declare function ɵɵattribute(name: string, value: any, sanitizer?: SanitizerFn | null, namespace?: string): typeof ɵɵattribute;
11480
11481/**
11482 *
11483 * Update an interpolated attribute on an element with single bound value surrounded by text.
11484 *
11485 * Used when the value passed to a property has 1 interpolated value in it:
11486 *
11487 * ```html
11488 * <div attr.title="prefix{{v0}}suffix"></div>
11489 * ```
11490 *
11491 * Its compiled representation is::
11492 *
11493 * ```ts
11494 * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');
11495 * ```
11496 *
11497 * @param attrName The name of the attribute to update
11498 * @param prefix Static value used for concatenation only.
11499 * @param v0 Value checked for change.
11500 * @param suffix Static value used for concatenation only.
11501 * @param sanitizer An optional sanitizer function
11502 * @returns itself, so that it may be chained.
11503 * @codeGenApi
11504 */
11505export declare function ɵɵattributeInterpolate1(attrName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate1;
11506
11507/**
11508 *
11509 * Update an interpolated attribute on an element with 2 bound values surrounded by text.
11510 *
11511 * Used when the value passed to a property has 2 interpolated values in it:
11512 *
11513 * ```html
11514 * <div attr.title="prefix{{v0}}-{{v1}}suffix"></div>
11515 * ```
11516 *
11517 * Its compiled representation is::
11518 *
11519 * ```ts
11520 * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
11521 * ```
11522 *
11523 * @param attrName The name of the attribute to update
11524 * @param prefix Static value used for concatenation only.
11525 * @param v0 Value checked for change.
11526 * @param i0 Static value used for concatenation only.
11527 * @param v1 Value checked for change.
11528 * @param suffix Static value used for concatenation only.
11529 * @param sanitizer An optional sanitizer function
11530 * @returns itself, so that it may be chained.
11531 * @codeGenApi
11532 */
11533export declare function ɵɵattributeInterpolate2(attrName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate2;
11534
11535/**
11536 *
11537 * Update an interpolated attribute on an element with 3 bound values surrounded by text.
11538 *
11539 * Used when the value passed to a property has 3 interpolated values in it:
11540 *
11541 * ```html
11542 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
11543 * ```
11544 *
11545 * Its compiled representation is::
11546 *
11547 * ```ts
11548 * ɵɵattributeInterpolate3(
11549 * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
11550 * ```
11551 *
11552 * @param attrName The name of the attribute to update
11553 * @param prefix Static value used for concatenation only.
11554 * @param v0 Value checked for change.
11555 * @param i0 Static value used for concatenation only.
11556 * @param v1 Value checked for change.
11557 * @param i1 Static value used for concatenation only.
11558 * @param v2 Value checked for change.
11559 * @param suffix Static value used for concatenation only.
11560 * @param sanitizer An optional sanitizer function
11561 * @returns itself, so that it may be chained.
11562 * @codeGenApi
11563 */
11564export 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;
11565
11566/**
11567 *
11568 * Update an interpolated attribute on an element with 4 bound values surrounded by text.
11569 *
11570 * Used when the value passed to a property has 4 interpolated values in it:
11571 *
11572 * ```html
11573 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
11574 * ```
11575 *
11576 * Its compiled representation is::
11577 *
11578 * ```ts
11579 * ɵɵattributeInterpolate4(
11580 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
11581 * ```
11582 *
11583 * @param attrName The name of the attribute to update
11584 * @param prefix Static value used for concatenation only.
11585 * @param v0 Value checked for change.
11586 * @param i0 Static value used for concatenation only.
11587 * @param v1 Value checked for change.
11588 * @param i1 Static value used for concatenation only.
11589 * @param v2 Value checked for change.
11590 * @param i2 Static value used for concatenation only.
11591 * @param v3 Value checked for change.
11592 * @param suffix Static value used for concatenation only.
11593 * @param sanitizer An optional sanitizer function
11594 * @returns itself, so that it may be chained.
11595 * @codeGenApi
11596 */
11597export 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;
11598
11599/**
11600 *
11601 * Update an interpolated attribute on an element with 5 bound values surrounded by text.
11602 *
11603 * Used when the value passed to a property has 5 interpolated values in it:
11604 *
11605 * ```html
11606 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
11607 * ```
11608 *
11609 * Its compiled representation is::
11610 *
11611 * ```ts
11612 * ɵɵattributeInterpolate5(
11613 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
11614 * ```
11615 *
11616 * @param attrName The name of the attribute to update
11617 * @param prefix Static value used for concatenation only.
11618 * @param v0 Value checked for change.
11619 * @param i0 Static value used for concatenation only.
11620 * @param v1 Value checked for change.
11621 * @param i1 Static value used for concatenation only.
11622 * @param v2 Value checked for change.
11623 * @param i2 Static value used for concatenation only.
11624 * @param v3 Value checked for change.
11625 * @param i3 Static value used for concatenation only.
11626 * @param v4 Value checked for change.
11627 * @param suffix Static value used for concatenation only.
11628 * @param sanitizer An optional sanitizer function
11629 * @returns itself, so that it may be chained.
11630 * @codeGenApi
11631 */
11632export 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;
11633
11634/**
11635 *
11636 * Update an interpolated attribute on an element with 6 bound values surrounded by text.
11637 *
11638 * Used when the value passed to a property has 6 interpolated values in it:
11639 *
11640 * ```html
11641 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
11642 * ```
11643 *
11644 * Its compiled representation is::
11645 *
11646 * ```ts
11647 * ɵɵattributeInterpolate6(
11648 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
11649 * ```
11650 *
11651 * @param attrName The name of the attribute to update
11652 * @param prefix Static value used for concatenation only.
11653 * @param v0 Value checked for change.
11654 * @param i0 Static value used for concatenation only.
11655 * @param v1 Value checked for change.
11656 * @param i1 Static value used for concatenation only.
11657 * @param v2 Value checked for change.
11658 * @param i2 Static value used for concatenation only.
11659 * @param v3 Value checked for change.
11660 * @param i3 Static value used for concatenation only.
11661 * @param v4 Value checked for change.
11662 * @param i4 Static value used for concatenation only.
11663 * @param v5 Value checked for change.
11664 * @param suffix Static value used for concatenation only.
11665 * @param sanitizer An optional sanitizer function
11666 * @returns itself, so that it may be chained.
11667 * @codeGenApi
11668 */
11669export 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;
11670
11671/**
11672 *
11673 * Update an interpolated attribute on an element with 7 bound values surrounded by text.
11674 *
11675 * Used when the value passed to a property has 7 interpolated values in it:
11676 *
11677 * ```html
11678 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
11679 * ```
11680 *
11681 * Its compiled representation is::
11682 *
11683 * ```ts
11684 * ɵɵattributeInterpolate7(
11685 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
11686 * ```
11687 *
11688 * @param attrName The name of the attribute to update
11689 * @param prefix Static value used for concatenation only.
11690 * @param v0 Value checked for change.
11691 * @param i0 Static value used for concatenation only.
11692 * @param v1 Value checked for change.
11693 * @param i1 Static value used for concatenation only.
11694 * @param v2 Value checked for change.
11695 * @param i2 Static value used for concatenation only.
11696 * @param v3 Value checked for change.
11697 * @param i3 Static value used for concatenation only.
11698 * @param v4 Value checked for change.
11699 * @param i4 Static value used for concatenation only.
11700 * @param v5 Value checked for change.
11701 * @param i5 Static value used for concatenation only.
11702 * @param v6 Value checked for change.
11703 * @param suffix Static value used for concatenation only.
11704 * @param sanitizer An optional sanitizer function
11705 * @returns itself, so that it may be chained.
11706 * @codeGenApi
11707 */
11708export 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;
11709
11710/**
11711 *
11712 * Update an interpolated attribute on an element with 8 bound values surrounded by text.
11713 *
11714 * Used when the value passed to a property has 8 interpolated values in it:
11715 *
11716 * ```html
11717 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
11718 * ```
11719 *
11720 * Its compiled representation is::
11721 *
11722 * ```ts
11723 * ɵɵattributeInterpolate8(
11724 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
11725 * ```
11726 *
11727 * @param attrName The name of the attribute to update
11728 * @param prefix Static value used for concatenation only.
11729 * @param v0 Value checked for change.
11730 * @param i0 Static value used for concatenation only.
11731 * @param v1 Value checked for change.
11732 * @param i1 Static value used for concatenation only.
11733 * @param v2 Value checked for change.
11734 * @param i2 Static value used for concatenation only.
11735 * @param v3 Value checked for change.
11736 * @param i3 Static value used for concatenation only.
11737 * @param v4 Value checked for change.
11738 * @param i4 Static value used for concatenation only.
11739 * @param v5 Value checked for change.
11740 * @param i5 Static value used for concatenation only.
11741 * @param v6 Value checked for change.
11742 * @param i6 Static value used for concatenation only.
11743 * @param v7 Value checked for change.
11744 * @param suffix Static value used for concatenation only.
11745 * @param sanitizer An optional sanitizer function
11746 * @returns itself, so that it may be chained.
11747 * @codeGenApi
11748 */
11749export 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;
11750
11751/**
11752 * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.
11753 *
11754 * Used when the number of interpolated values exceeds 8.
11755 *
11756 * ```html
11757 * <div
11758 * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
11759 * ```
11760 *
11761 * Its compiled representation is::
11762 *
11763 * ```ts
11764 * ɵɵattributeInterpolateV(
11765 * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
11766 * 'suffix']);
11767 * ```
11768 *
11769 * @param attrName The name of the attribute to update.
11770 * @param values The collection of values and the strings in-between those values, beginning with
11771 * a string prefix and ending with a string suffix.
11772 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
11773 * @param sanitizer An optional sanitizer function
11774 * @returns itself, so that it may be chained.
11775 * @codeGenApi
11776 */
11777export declare function ɵɵattributeInterpolateV(attrName: string, values: any[], sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolateV;
11778
11779/**
11780 * Update class bindings using an object literal or class-string on an element.
11781 *
11782 * This instruction is meant to apply styling via the `[class]="exp"` template bindings.
11783 * When classes are applied to the element they will then be updated with
11784 * respect to any styles/classes set via `classProp`. If any
11785 * classes are set to falsy then they will be removed from the element.
11786 *
11787 * Note that the styling instruction will not be applied until `stylingApply` is called.
11788 * Note that this will the provided classMap value to the host element if this function is called
11789 * within a host binding.
11790 *
11791 * @param classes A key/value map or string of CSS classes that will be added to the
11792 * given element. Any missing classes (that have already been applied to the element
11793 * beforehand) will be removed (unset) from the element's list of CSS classes.
11794 *
11795 * @codeGenApi
11796 */
11797export declare function ɵɵclassMap(classes: {
11798 [className: string]: boolean | undefined | null;
11799} | string | undefined | null): void;
11800
11801
11802/**
11803 *
11804 * Update an interpolated class on an element with single bound value surrounded by text.
11805 *
11806 * Used when the value passed to a property has 1 interpolated value in it:
11807 *
11808 * ```html
11809 * <div class="prefix{{v0}}suffix"></div>
11810 * ```
11811 *
11812 * Its compiled representation is:
11813 *
11814 * ```ts
11815 * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');
11816 * ```
11817 *
11818 * @param prefix Static value used for concatenation only.
11819 * @param v0 Value checked for change.
11820 * @param suffix Static value used for concatenation only.
11821 * @codeGenApi
11822 */
11823export declare function ɵɵclassMapInterpolate1(prefix: string, v0: any, suffix: string): void;
11824
11825/**
11826 *
11827 * Update an interpolated class on an element with 2 bound values surrounded by text.
11828 *
11829 * Used when the value passed to a property has 2 interpolated values in it:
11830 *
11831 * ```html
11832 * <div class="prefix{{v0}}-{{v1}}suffix"></div>
11833 * ```
11834 *
11835 * Its compiled representation is:
11836 *
11837 * ```ts
11838 * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');
11839 * ```
11840 *
11841 * @param prefix Static value used for concatenation only.
11842 * @param v0 Value checked for change.
11843 * @param i0 Static value used for concatenation only.
11844 * @param v1 Value checked for change.
11845 * @param suffix Static value used for concatenation only.
11846 * @codeGenApi
11847 */
11848export declare function ɵɵclassMapInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): void;
11849
11850/**
11851 *
11852 * Update an interpolated class on an element with 3 bound values surrounded by text.
11853 *
11854 * Used when the value passed to a property has 3 interpolated values in it:
11855 *
11856 * ```html
11857 * <div class="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
11858 * ```
11859 *
11860 * Its compiled representation is:
11861 *
11862 * ```ts
11863 * ɵɵclassMapInterpolate3(
11864 * 'prefix', v0, '-', v1, '-', v2, 'suffix');
11865 * ```
11866 *
11867 * @param prefix Static value used for concatenation only.
11868 * @param v0 Value checked for change.
11869 * @param i0 Static value used for concatenation only.
11870 * @param v1 Value checked for change.
11871 * @param i1 Static value used for concatenation only.
11872 * @param v2 Value checked for change.
11873 * @param suffix Static value used for concatenation only.
11874 * @codeGenApi
11875 */
11876export declare function ɵɵclassMapInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void;
11877
11878/**
11879 *
11880 * Update an interpolated class on an element with 4 bound values surrounded by text.
11881 *
11882 * Used when the value passed to a property has 4 interpolated values in it:
11883 *
11884 * ```html
11885 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
11886 * ```
11887 *
11888 * Its compiled representation is:
11889 *
11890 * ```ts
11891 * ɵɵclassMapInterpolate4(
11892 * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
11893 * ```
11894 *
11895 * @param prefix Static value used for concatenation only.
11896 * @param v0 Value checked for change.
11897 * @param i0 Static value used for concatenation only.
11898 * @param v1 Value checked for change.
11899 * @param i1 Static value used for concatenation only.
11900 * @param v2 Value checked for change.
11901 * @param i2 Static value used for concatenation only.
11902 * @param v3 Value checked for change.
11903 * @param suffix Static value used for concatenation only.
11904 * @codeGenApi
11905 */
11906export declare function ɵɵclassMapInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): void;
11907
11908/**
11909 *
11910 * Update an interpolated class on an element with 5 bound values surrounded by text.
11911 *
11912 * Used when the value passed to a property has 5 interpolated values in it:
11913 *
11914 * ```html
11915 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
11916 * ```
11917 *
11918 * Its compiled representation is:
11919 *
11920 * ```ts
11921 * ɵɵclassMapInterpolate5(
11922 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
11923 * ```
11924 *
11925 * @param prefix Static value used for concatenation only.
11926 * @param v0 Value checked for change.
11927 * @param i0 Static value used for concatenation only.
11928 * @param v1 Value checked for change.
11929 * @param i1 Static value used for concatenation only.
11930 * @param v2 Value checked for change.
11931 * @param i2 Static value used for concatenation only.
11932 * @param v3 Value checked for change.
11933 * @param i3 Static value used for concatenation only.
11934 * @param v4 Value checked for change.
11935 * @param suffix Static value used for concatenation only.
11936 * @codeGenApi
11937 */
11938export 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;
11939
11940/**
11941 *
11942 * Update an interpolated class on an element with 6 bound values surrounded by text.
11943 *
11944 * Used when the value passed to a property has 6 interpolated values in it:
11945 *
11946 * ```html
11947 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
11948 * ```
11949 *
11950 * Its compiled representation is:
11951 *
11952 * ```ts
11953 * ɵɵclassMapInterpolate6(
11954 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
11955 * ```
11956 *
11957 * @param prefix Static value used for concatenation only.
11958 * @param v0 Value checked for change.
11959 * @param i0 Static value used for concatenation only.
11960 * @param v1 Value checked for change.
11961 * @param i1 Static value used for concatenation only.
11962 * @param v2 Value checked for change.
11963 * @param i2 Static value used for concatenation only.
11964 * @param v3 Value checked for change.
11965 * @param i3 Static value used for concatenation only.
11966 * @param v4 Value checked for change.
11967 * @param i4 Static value used for concatenation only.
11968 * @param v5 Value checked for change.
11969 * @param suffix Static value used for concatenation only.
11970 * @codeGenApi
11971 */
11972export 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;
11973
11974/**
11975 *
11976 * Update an interpolated class on an element with 7 bound values surrounded by text.
11977 *
11978 * Used when the value passed to a property has 7 interpolated values in it:
11979 *
11980 * ```html
11981 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
11982 * ```
11983 *
11984 * Its compiled representation is:
11985 *
11986 * ```ts
11987 * ɵɵclassMapInterpolate7(
11988 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
11989 * ```
11990 *
11991 * @param prefix Static value used for concatenation only.
11992 * @param v0 Value checked for change.
11993 * @param i0 Static value used for concatenation only.
11994 * @param v1 Value checked for change.
11995 * @param i1 Static value used for concatenation only.
11996 * @param v2 Value checked for change.
11997 * @param i2 Static value used for concatenation only.
11998 * @param v3 Value checked for change.
11999 * @param i3 Static value used for concatenation only.
12000 * @param v4 Value checked for change.
12001 * @param i4 Static value used for concatenation only.
12002 * @param v5 Value checked for change.
12003 * @param i5 Static value used for concatenation only.
12004 * @param v6 Value checked for change.
12005 * @param suffix Static value used for concatenation only.
12006 * @codeGenApi
12007 */
12008export 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;
12009
12010/**
12011 *
12012 * Update an interpolated class on an element with 8 bound values surrounded by text.
12013 *
12014 * Used when the value passed to a property has 8 interpolated values in it:
12015 *
12016 * ```html
12017 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
12018 * ```
12019 *
12020 * Its compiled representation is:
12021 *
12022 * ```ts
12023 * ɵɵclassMapInterpolate8(
12024 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
12025 * ```
12026 *
12027 * @param prefix Static value used for concatenation only.
12028 * @param v0 Value checked for change.
12029 * @param i0 Static value used for concatenation only.
12030 * @param v1 Value checked for change.
12031 * @param i1 Static value used for concatenation only.
12032 * @param v2 Value checked for change.
12033 * @param i2 Static value used for concatenation only.
12034 * @param v3 Value checked for change.
12035 * @param i3 Static value used for concatenation only.
12036 * @param v4 Value checked for change.
12037 * @param i4 Static value used for concatenation only.
12038 * @param v5 Value checked for change.
12039 * @param i5 Static value used for concatenation only.
12040 * @param v6 Value checked for change.
12041 * @param i6 Static value used for concatenation only.
12042 * @param v7 Value checked for change.
12043 * @param suffix Static value used for concatenation only.
12044 * @codeGenApi
12045 */
12046export 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;
12047
12048/**
12049 * Update an interpolated class on an element with 9 or more bound values surrounded by text.
12050 *
12051 * Used when the number of interpolated values exceeds 8.
12052 *
12053 * ```html
12054 * <div
12055 * class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
12056 * ```
12057 *
12058 * Its compiled representation is:
12059 *
12060 * ```ts
12061 * ɵɵclassMapInterpolateV(
12062 * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
12063 * 'suffix']);
12064 * ```
12065 *.
12066 * @param values The collection of values and the strings in-between those values, beginning with
12067 * a string prefix and ending with a string suffix.
12068 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
12069 * @codeGenApi
12070 */
12071export declare function ɵɵclassMapInterpolateV(values: any[]): void;
12072
12073/**
12074 * Update a class binding on an element with the provided value.
12075 *
12076 * This instruction is meant to handle the `[class.foo]="exp"` case and,
12077 * therefore, the class binding itself must already be allocated using
12078 * `styling` within the creation block.
12079 *
12080 * @param prop A valid CSS class (only one).
12081 * @param value A true/false value which will turn the class on or off.
12082 *
12083 * Note that this will apply the provided class value to the host element if this function
12084 * is called within a host binding function.
12085 *
12086 * @codeGenApi
12087 */
12088export declare function ɵɵclassProp(className: string, value: boolean | undefined | null): typeof ɵɵclassProp;
12089
12090/**
12091 * @publicApi
12092 */
12093export declare type ɵɵComponentDeclaration<T, Selector extends String, ExportAs extends string[], InputMap extends {
12094 [key: string]: string;
12095}, OutputMap extends {
12096 [key: string]: string;
12097}, QueryFields extends string[], NgContentSelectors extends string[]> = unknown;
12098
12099/**
12100 * Registers a QueryList, associated with a content query, for later refresh (part of a view
12101 * refresh).
12102 *
12103 * @param directiveIndex Current directive index
12104 * @param predicate The type for which the query will search
12105 * @param flags Flags associated with the query
12106 * @param read What to save in the query
12107 * @returns QueryList<T>
12108 *
12109 * @codeGenApi
12110 */
12111export declare function ɵɵcontentQuery<T>(directiveIndex: number, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): void;
12112
12113/**
12114 * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a
12115 * definition.
12116 *
12117 * This exists primarily to support ngcc migration of an existing View Engine pattern, where an
12118 * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it
12119 * generates a skeleton definition on the child class, and applies this feature.
12120 *
12121 * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,
12122 * including things like the component template function.
12123 *
12124 * @param definition The definition of a child class which inherits from a parent class with its
12125 * own definition.
12126 *
12127 * @codeGenApi
12128 */
12129export declare function ɵɵCopyDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
12130
12131/**
12132 * Create a component definition object.
12133 *
12134 *
12135 * # Example
12136 * ```
12137 * class MyDirective {
12138 * // Generated by Angular Template Compiler
12139 * // [Symbol] syntax will not be supported by TypeScript until v2.7
12140 * static ɵcmp = defineComponent({
12141 * ...
12142 * });
12143 * }
12144 * ```
12145 * @codeGenApi
12146 */
12147export declare function ɵɵdefineComponent<T>(componentDefinition: {
12148 /**
12149 * Directive type, needed to configure the injector.
12150 */
12151 type: Type<T>;
12152 /** The selectors that will be used to match nodes to this component. */
12153 selectors?: ɵCssSelectorList;
12154 /**
12155 * The number of nodes, local refs, and pipes in this component template.
12156 *
12157 * Used to calculate the length of this component's LView array, so we
12158 * can pre-fill the array and set the binding start index.
12159 */
12160 decls: number;
12161 /**
12162 * The number of bindings in this component template (including pure fn bindings).
12163 *
12164 * Used to calculate the length of this component's LView array, so we
12165 * can pre-fill the array and set the host binding start index.
12166 */
12167 vars: number;
12168 /**
12169 * A map of input names.
12170 *
12171 * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
12172 *
12173 * Given:
12174 * ```
12175 * class MyComponent {
12176 * @Input()
12177 * publicInput1: string;
12178 *
12179 * @Input('publicInput2')
12180 * declaredInput2: string;
12181 * }
12182 * ```
12183 *
12184 * is described as:
12185 * ```
12186 * {
12187 * publicInput1: 'publicInput1',
12188 * declaredInput2: ['publicInput2', 'declaredInput2'],
12189 * }
12190 * ```
12191 *
12192 * Which the minifier may translate to:
12193 * ```
12194 * {
12195 * minifiedPublicInput1: 'publicInput1',
12196 * minifiedDeclaredInput2: ['publicInput2', 'declaredInput2'],
12197 * }
12198 * ```
12199 *
12200 * This allows the render to re-construct the minified, public, and declared names
12201 * of properties.
12202 *
12203 * NOTE:
12204 * - Because declared and public name are usually same we only generate the array
12205 * `['public', 'declared']` format when they differ.
12206 * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
12207 * inconsistent behavior in that it uses declared names rather than minified or public. For
12208 * this reason `NgOnChanges` will be deprecated and removed in future version and this
12209 * API will be simplified to be consistent with `output`.
12210 */
12211 inputs?: {
12212 [P in keyof T]?: string | [string, string];
12213 };
12214 /**
12215 * A map of output names.
12216 *
12217 * The format is in: `{[actualPropertyName: string]:string}`.
12218 *
12219 * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
12220 *
12221 * This allows the render to re-construct the minified and non-minified names
12222 * of properties.
12223 */
12224 outputs?: {
12225 [P in keyof T]?: string;
12226 };
12227 /**
12228 * Function executed by the parent template to allow child directive to apply host bindings.
12229 */
12230 hostBindings?: HostBindingsFunction<T>;
12231 /**
12232 * The number of bindings in this directive `hostBindings` (including pure fn bindings).
12233 *
12234 * Used to calculate the length of the component's LView array, so we
12235 * can pre-fill the array and set the host binding start index.
12236 */
12237 hostVars?: number;
12238 /**
12239 * Assign static attribute values to a host element.
12240 *
12241 * This property will assign static attribute values as well as class and style
12242 * values to a host element. Since attribute values can consist of different types of values, the
12243 * `hostAttrs` array must include the values in the following format:
12244 *
12245 * attrs = [
12246 * // static attributes (like `title`, `name`, `id`...)
12247 * attr1, value1, attr2, value,
12248 *
12249 * // a single namespace value (like `x:id`)
12250 * NAMESPACE_MARKER, namespaceUri1, name1, value1,
12251 *
12252 * // another single namespace value (like `x:name`)
12253 * NAMESPACE_MARKER, namespaceUri2, name2, value2,
12254 *
12255 * // a series of CSS classes that will be applied to the element (no spaces)
12256 * CLASSES_MARKER, class1, class2, class3,
12257 *
12258 * // a series of CSS styles (property + value) that will be applied to the element
12259 * STYLES_MARKER, prop1, value1, prop2, value2
12260 * ]
12261 *
12262 * All non-class and non-style attributes must be defined at the start of the list
12263 * first before all class and style values are set. When there is a change in value
12264 * type (like when classes and styles are introduced) a marker must be used to separate
12265 * the entries. The marker values themselves are set via entries found in the
12266 * [AttributeMarker] enum.
12267 */
12268 hostAttrs?: TAttributes;
12269 /**
12270 * Function to create instances of content queries associated with a given directive.
12271 */
12272 contentQueries?: ContentQueriesFunction<T>;
12273 /**
12274 * Defines the name that can be used in the template to assign this directive to a variable.
12275 *
12276 * See: {@link Directive.exportAs}
12277 */
12278 exportAs?: string[];
12279 /**
12280 * Template function use for rendering DOM.
12281 *
12282 * This function has following structure.
12283 *
12284 * ```
12285 * function Template<T>(ctx:T, creationMode: boolean) {
12286 * if (creationMode) {
12287 * // Contains creation mode instructions.
12288 * }
12289 * // Contains binding update instructions
12290 * }
12291 * ```
12292 *
12293 * Common instructions are:
12294 * Creation mode instructions:
12295 * - `elementStart`, `elementEnd`
12296 * - `text`
12297 * - `container`
12298 * - `listener`
12299 *
12300 * Binding update instructions:
12301 * - `bind`
12302 * - `elementAttribute`
12303 * - `elementProperty`
12304 * - `elementClass`
12305 * - `elementStyle`
12306 *
12307 */
12308 template: ComponentTemplate<T>;
12309 /**
12310 * Constants for the nodes in the component's view.
12311 * Includes attribute arrays, local definition arrays etc.
12312 */
12313 consts?: TConstantsOrFactory;
12314 /**
12315 * An array of `ngContent[selector]` values that were found in the template.
12316 */
12317 ngContentSelectors?: string[];
12318 /**
12319 * Additional set of instructions specific to view query processing. This could be seen as a
12320 * set of instruction to be inserted into the template function.
12321 *
12322 * Query-related instructions need to be pulled out to a specific function as a timing of
12323 * execution is different as compared to all other instructions (after change detection hooks but
12324 * before view hooks).
12325 */
12326 viewQuery?: ViewQueriesFunction<T> | null;
12327 /**
12328 * A list of optional features to apply.
12329 *
12330 * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}
12331 */
12332 features?: ComponentDefFeature[];
12333 /**
12334 * Defines template and style encapsulation options available for Component's {@link Component}.
12335 */
12336 encapsulation?: ViewEncapsulation;
12337 /**
12338 * Defines arbitrary developer-defined data to be stored on a renderer instance.
12339 * This is useful for renderers that delegate to other renderers.
12340 *
12341 * see: animation
12342 */
12343 data?: {
12344 [kind: string]: any;
12345 };
12346 /**
12347 * A set of styles that the component needs to be present for component to render correctly.
12348 */
12349 styles?: string[];
12350 /**
12351 * The strategy that the default change detector uses to detect changes.
12352 * When set, takes effect the next time change detection is triggered.
12353 */
12354 changeDetection?: ChangeDetectionStrategy;
12355 /**
12356 * Registry of directives and components that may be found in this component's view.
12357 *
12358 * The property is either an array of `DirectiveDef`s or a function which returns the array of
12359 * `DirectiveDef`s. The function is necessary to be able to support forward declarations.
12360 */
12361 directives?: DirectiveTypesOrFactory | null;
12362 /**
12363 * Registry of pipes that may be found in this component's view.
12364 *
12365 * The property is either an array of `PipeDefs`s or a function which returns the array of
12366 * `PipeDefs`s. The function is necessary to be able to support forward declarations.
12367 */
12368 pipes?: PipeTypesOrFactory | null;
12369 /**
12370 * The set of schemas that declare elements to be allowed in the component's template.
12371 */
12372 schemas?: SchemaMetadata[] | null;
12373}): unknown;
12374
12375/**
12376 * Create a directive definition object.
12377 *
12378 * # Example
12379 * ```ts
12380 * class MyDirective {
12381 * // Generated by Angular Template Compiler
12382 * // [Symbol] syntax will not be supported by TypeScript until v2.7
12383 * static ɵdir = ɵɵdefineDirective({
12384 * ...
12385 * });
12386 * }
12387 * ```
12388 *
12389 * @codeGenApi
12390 */
12391export declare const ɵɵdefineDirective: <T>(directiveDefinition: {
12392 /**
12393 * Directive type, needed to configure the injector.
12394 */
12395 type: Type<T>;
12396 /** The selectors that will be used to match nodes to this directive. */
12397 selectors?: ɵCssSelectorList | undefined;
12398 /**
12399 * A map of input names.
12400 *
12401 * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
12402 *
12403 * Given:
12404 * ```
12405 * class MyComponent {
12406 * @Input()
12407 * publicInput1: string;
12408 *
12409 * @Input('publicInput2')
12410 * declaredInput2: string;
12411 * }
12412 * ```
12413 *
12414 * is described as:
12415 * ```
12416 * {
12417 * publicInput1: 'publicInput1',
12418 * declaredInput2: ['declaredInput2', 'publicInput2'],
12419 * }
12420 * ```
12421 *
12422 * Which the minifier may translate to:
12423 * ```
12424 * {
12425 * minifiedPublicInput1: 'publicInput1',
12426 * minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],
12427 * }
12428 * ```
12429 *
12430 * This allows the render to re-construct the minified, public, and declared names
12431 * of properties.
12432 *
12433 * NOTE:
12434 * - Because declared and public name are usually same we only generate the array
12435 * `['declared', 'public']` format when they differ.
12436 * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
12437 * inconsistent behavior in that it uses declared names rather than minified or public. For
12438 * this reason `NgOnChanges` will be deprecated and removed in future version and this
12439 * API will be simplified to be consistent with `output`.
12440 */
12441 inputs?: { [P in keyof T]?: string | [string, string] | undefined; } | undefined;
12442 /**
12443 * A map of output names.
12444 *
12445 * The format is in: `{[actualPropertyName: string]:string}`.
12446 *
12447 * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
12448 *
12449 * This allows the render to re-construct the minified and non-minified names
12450 * of properties.
12451 */
12452 outputs?: { [P_1 in keyof T]?: string | undefined; } | undefined;
12453 /**
12454 * A list of optional features to apply.
12455 *
12456 * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}
12457 */
12458 features?: DirectiveDefFeature[] | undefined;
12459 /**
12460 * Function executed by the parent template to allow child directive to apply host bindings.
12461 */
12462 hostBindings?: HostBindingsFunction<T> | undefined;
12463 /**
12464 * The number of bindings in this directive `hostBindings` (including pure fn bindings).
12465 *
12466 * Used to calculate the length of the component's LView array, so we
12467 * can pre-fill the array and set the host binding start index.
12468 */
12469 hostVars?: number | undefined;
12470 /**
12471 * Assign static attribute values to a host element.
12472 *
12473 * This property will assign static attribute values as well as class and style
12474 * values to a host element. Since attribute values can consist of different types of values,
12475 * the `hostAttrs` array must include the values in the following format:
12476 *
12477 * attrs = [
12478 * // static attributes (like `title`, `name`, `id`...)
12479 * attr1, value1, attr2, value,
12480 *
12481 * // a single namespace value (like `x:id`)
12482 * NAMESPACE_MARKER, namespaceUri1, name1, value1,
12483 *
12484 * // another single namespace value (like `x:name`)
12485 * NAMESPACE_MARKER, namespaceUri2, name2, value2,
12486 *
12487 * // a series of CSS classes that will be applied to the element (no spaces)
12488 * CLASSES_MARKER, class1, class2, class3,
12489 *
12490 * // a series of CSS styles (property + value) that will be applied to the element
12491 * STYLES_MARKER, prop1, value1, prop2, value2
12492 * ]
12493 *
12494 * All non-class and non-style attributes must be defined at the start of the list
12495 * first before all class and style values are set. When there is a change in value
12496 * type (like when classes and styles are introduced) a marker must be used to separate
12497 * the entries. The marker values themselves are set via entries found in the
12498 * [AttributeMarker] enum.
12499 */
12500 hostAttrs?: TAttributes | undefined;
12501 /**
12502 * Function to create instances of content queries associated with a given directive.
12503 */
12504 contentQueries?: ContentQueriesFunction<T> | undefined;
12505 /**
12506 * Additional set of instructions specific to view query processing. This could be seen as a
12507 * set of instructions to be inserted into the template function.
12508 */
12509 viewQuery?: ViewQueriesFunction<T> | null | undefined;
12510 /**
12511 * Defines the name that can be used in the template to assign this directive to a variable.
12512 *
12513 * See: {@link Directive.exportAs}
12514 */
12515 exportAs?: string[] | undefined;
12516}) => never;
12517
12518/**
12519 * Construct an injectable definition which defines how a token will be constructed by the DI
12520 * system, and in which injectors (if any) it will be available.
12521 *
12522 * This should be assigned to a static `ɵprov` field on a type, which will then be an
12523 * `InjectableType`.
12524 *
12525 * Options:
12526 * * `providedIn` determines which injectors will include the injectable, by either associating it
12527 * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be
12528 * provided in the `'root'` injector, which will be the application-level injector in most apps.
12529 * * `factory` gives the zero argument function which will create an instance of the injectable.
12530 * The factory can call `inject` to access the `Injector` and request injection of dependencies.
12531 *
12532 * @codeGenApi
12533 * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
12534 */
12535export declare function ɵɵdefineInjectable<T>(opts: {
12536 token: unknown;
12537 providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
12538 factory: () => T;
12539}): unknown;
12540
12541/**
12542 * Construct an `InjectorDef` which configures an injector.
12543 *
12544 * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an
12545 * `InjectorType`.
12546 *
12547 * Options:
12548 *
12549 * * `providers`: an optional array of providers to add to the injector. Each provider must
12550 * either have a factory or point to a type which has a `ɵprov` static property (the
12551 * type must be an `InjectableType`).
12552 * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s
12553 * whose providers will also be added to the injector. Locally provided types will override
12554 * providers from imports.
12555 *
12556 * @codeGenApi
12557 */
12558export declare function ɵɵdefineInjector(options: {
12559 providers?: any[];
12560 imports?: any[];
12561}): unknown;
12562
12563/**
12564 * @codeGenApi
12565 */
12566export declare function ɵɵdefineNgModule<T>(def: {
12567 /** Token representing the module. Used by DI. */
12568 type: T;
12569 /** List of components to bootstrap. */
12570 bootstrap?: Type<any>[] | (() => Type<any>[]);
12571 /** List of components, directives, and pipes declared by this module. */
12572 declarations?: Type<any>[] | (() => Type<any>[]);
12573 /** List of modules or `ModuleWithProviders` imported by this module. */
12574 imports?: Type<any>[] | (() => Type<any>[]);
12575 /**
12576 * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
12577 * module.
12578 */
12579 exports?: Type<any>[] | (() => Type<any>[]);
12580 /** The set of schemas that declare elements to be allowed in the NgModule. */
12581 schemas?: SchemaMetadata[] | null;
12582 /** Unique ID for the module that is used with `getModuleFactory`. */
12583 id?: string | null;
12584}): unknown;
12585
12586/**
12587 * Create a pipe definition object.
12588 *
12589 * # Example
12590 * ```
12591 * class MyPipe implements PipeTransform {
12592 * // Generated by Angular Template Compiler
12593 * static ɵpipe = definePipe({
12594 * ...
12595 * });
12596 * }
12597 * ```
12598 * @param pipeDef Pipe definition generated by the compiler
12599 *
12600 * @codeGenApi
12601 */
12602export declare function ɵɵdefinePipe<T>(pipeDef: {
12603 /** Name of the pipe. Used for matching pipes in template to pipe defs. */
12604 name: string;
12605 /** Pipe class reference. Needed to extract pipe lifecycle hooks. */
12606 type: Type<T>;
12607 /** Whether the pipe is pure. */
12608 pure?: boolean;
12609}): unknown;
12610
12611
12612/**
12613 * @publicApi
12614 */
12615export declare type ɵɵDirectiveDeclaration<T, Selector extends string, ExportAs extends string[], InputMap extends {
12616 [key: string]: string;
12617}, OutputMap extends {
12618 [key: string]: string;
12619}, QueryFields extends string[]> = unknown;
12620
12621/**
12622 * Returns the value associated to the given token from the injectors.
12623 *
12624 * `directiveInject` is intended to be used for directive, component and pipe factories.
12625 * All other injection use `inject` which does not walk the node injector tree.
12626 *
12627 * Usage example (in factory function):
12628 *
12629 * ```ts
12630 * class SomeDirective {
12631 * constructor(directive: DirectiveA) {}
12632 *
12633 * static ɵdir = ɵɵdefineDirective({
12634 * type: SomeDirective,
12635 * factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))
12636 * });
12637 * }
12638 * ```
12639 * @param token the type or token to inject
12640 * @param flags Injection flags
12641 * @returns the value from the injector or `null` when not found
12642 *
12643 * @codeGenApi
12644 */
12645export declare function ɵɵdirectiveInject<T>(token: ProviderToken<T>): T;
12646
12647export declare function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags: InjectFlags): T;
12648
12649/**
12650 * Disables directive matching on element.
12651 *
12652 * * Example:
12653 * ```
12654 * <my-comp my-directive>
12655 * Should match component / directive.
12656 * </my-comp>
12657 * <div ngNonBindable>
12658 * <!-- ɵɵdisableBindings() -->
12659 * <my-comp my-directive>
12660 * Should not match component / directive because we are in ngNonBindable.
12661 * </my-comp>
12662 * <!-- ɵɵenableBindings() -->
12663 * </div>
12664 * ```
12665 *
12666 * @codeGenApi
12667 */
12668export declare function ɵɵdisableBindings(): void;
12669
12670/**
12671 * Creates an empty element using {@link elementStart} and {@link elementEnd}
12672 *
12673 * @param index Index of the element in the data array
12674 * @param name Name of the DOM Node
12675 * @param attrsIndex Index of the element's attributes in the `consts` array.
12676 * @param localRefsIndex Index of the element's local references in the `consts` array.
12677 *
12678 * @codeGenApi
12679 */
12680export declare function ɵɵelement(index: number, name: string, attrsIndex?: number | null, localRefsIndex?: number): void;
12681
12682/**
12683 * Creates an empty logical container using {@link elementContainerStart}
12684 * and {@link elementContainerEnd}
12685 *
12686 * @param index Index of the element in the LView array
12687 * @param attrsIndex Index of the container attributes in the `consts` array.
12688 * @param localRefsIndex Index of the container's local references in the `consts` array.
12689 *
12690 * @codeGenApi
12691 */
12692export declare function ɵɵelementContainer(index: number, attrsIndex?: number | null, localRefsIndex?: number): void;
12693
12694/**
12695 * Mark the end of the <ng-container>.
12696 *
12697 * @codeGenApi
12698 */
12699export declare function ɵɵelementContainerEnd(): void;
12700
12701/**
12702 * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.
12703 * The instruction must later be followed by `elementContainerEnd()` call.
12704 *
12705 * @param index Index of the element in the LView array
12706 * @param attrsIndex Index of the container attributes in the `consts` array.
12707 * @param localRefsIndex Index of the container's local references in the `consts` array.
12708 *
12709 * Even if this instruction accepts a set of attributes no actual attribute values are propagated to
12710 * the DOM (as a comment node can't have attributes). Attributes are here only for directive
12711 * matching purposes and setting initial inputs of directives.
12712 *
12713 * @codeGenApi
12714 */
12715export declare function ɵɵelementContainerStart(index: number, attrsIndex?: number | null, localRefsIndex?: number): void;
12716
12717/**
12718 * Mark the end of the element.
12719 *
12720 * @codeGenApi
12721 */
12722export declare function ɵɵelementEnd(): void;
12723
12724
12725/**
12726 * Create DOM element. The instruction must later be followed by `elementEnd()` call.
12727 *
12728 * @param index Index of the element in the LView array
12729 * @param name Name of the DOM Node
12730 * @param attrsIndex Index of the element's attributes in the `consts` array.
12731 * @param localRefsIndex Index of the element's local references in the `consts` array.
12732 *
12733 * Attributes and localRefs are passed as an array of strings where elements with an even index
12734 * hold an attribute name and elements with an odd index hold an attribute value, ex.:
12735 * ['id', 'warning5', 'class', 'alert']
12736 *
12737 * @codeGenApi
12738 */
12739export declare function ɵɵelementStart(index: number, name: string, attrsIndex?: number | null, localRefsIndex?: number): void;
12740
12741/**
12742 * Enables directive matching on elements.
12743 *
12744 * * Example:
12745 * ```
12746 * <my-comp my-directive>
12747 * Should match component / directive.
12748 * </my-comp>
12749 * <div ngNonBindable>
12750 * <!-- ɵɵdisableBindings() -->
12751 * <my-comp my-directive>
12752 * Should not match component / directive because we are in ngNonBindable.
12753 * </my-comp>
12754 * <!-- ɵɵenableBindings() -->
12755 * </div>
12756 * ```
12757 *
12758 * @codeGenApi
12759 */
12760export declare function ɵɵenableBindings(): void;
12761
12762/**
12763 * @publicApi
12764 */
12765export declare type ɵɵFactoryDeclaration<T, CtorDependencies extends CtorDependency[]> = unknown;
12766
12767export declare enum ɵɵFactoryTarget {
12768 Directive = 0,
12769 Component = 1,
12770 Injectable = 2,
12771 Pipe = 3,
12772 NgModule = 4
12773}
12774
12775/**
12776 * Returns the current OpaqueViewState instance.
12777 *
12778 * Used in conjunction with the restoreView() instruction to save a snapshot
12779 * of the current view and restore it when listeners are invoked. This allows
12780 * walking the declaration view tree in listeners to get vars from parent views.
12781 *
12782 * @codeGenApi
12783 */
12784export declare function ɵɵgetCurrentView(): OpaqueViewState;
12785
12786/**
12787 * @codeGenApi
12788 */
12789export declare function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T;
12790
12791/**
12792 * Update a property on a host element. Only applies to native node properties, not inputs.
12793 *
12794 * Operates on the element selected by index via the {@link select} instruction.
12795 *
12796 * @param propName Name of property. Because it is going to DOM, this is not subject to
12797 * renaming as part of minification.
12798 * @param value New value to write.
12799 * @param sanitizer An optional function used to sanitize the value.
12800 * @returns This function returns itself so that it may be chained
12801 * (e.g. `property('name', ctx.name)('title', ctx.title)`)
12802 *
12803 * @codeGenApi
12804 */
12805export declare function ɵɵhostProperty<T>(propName: string, value: T, sanitizer?: SanitizerFn | null): typeof ɵɵhostProperty;
12806
12807/**
12808 *
12809 * Use this instruction to create a translation block that doesn't contain any placeholder.
12810 * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.
12811 *
12812 * The translation `message` is the value which is locale specific. The translation string may
12813 * contain placeholders which associate inner elements and sub-templates within the translation.
12814 *
12815 * The translation `message` placeholders are:
12816 * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
12817 * interpolated into. The placeholder `index` points to the expression binding index. An optional
12818 * `block` that matches the sub-template in which it was declared.
12819 * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning
12820 * and end of DOM element that were embedded in the original translation block. The placeholder
12821 * `index` points to the element index in the template instructions set. An optional `block` that
12822 * matches the sub-template in which it was declared.
12823 * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
12824 * split up and translated separately in each angular template function. The `index` points to the
12825 * `template` instruction index. A `block` that matches the sub-template in which it was declared.
12826 *
12827 * @param index A unique index of the translation in the static block.
12828 * @param messageIndex An index of the translation message from the `def.consts` array.
12829 * @param subTemplateIndex Optional sub-template index in the `message`.
12830 *
12831 * @codeGenApi
12832 */
12833export declare function ɵɵi18n(index: number, messageIndex: number, subTemplateIndex?: number): void;
12834
12835/**
12836 * Updates a translation block or an i18n attribute when the bindings have changed.
12837 *
12838 * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}
12839 * (i18n attribute) on which it should update the content.
12840 *
12841 * @codeGenApi
12842 */
12843export declare function ɵɵi18nApply(index: number): void;
12844
12845/**
12846 * Marks a list of attributes as translatable.
12847 *
12848 * @param index A unique index in the static block
12849 * @param values
12850 *
12851 * @codeGenApi
12852 */
12853export declare function ɵɵi18nAttributes(index: number, attrsIndex: number): void;
12854
12855/**
12856 * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes
12857 * into the render tree, moves the placeholder nodes and removes the deleted nodes.
12858 *
12859 * @codeGenApi
12860 */
12861export declare function ɵɵi18nEnd(): void;
12862
12863/**
12864 * Stores the values of the bindings during each update cycle in order to determine if we need to
12865 * update the translated nodes.
12866 *
12867 * @param value The binding's value
12868 * @returns This function returns itself so that it may be chained
12869 * (e.g. `i18nExp(ctx.name)(ctx.title)`)
12870 *
12871 * @codeGenApi
12872 */
12873export declare function ɵɵi18nExp<T>(value: T): typeof ɵɵi18nExp;
12874
12875/**
12876 * Handles message string post-processing for internationalization.
12877 *
12878 * Handles message string post-processing by transforming it from intermediate
12879 * format (that might contain some markers that we need to replace) to the final
12880 * form, consumable by i18nStart instruction. Post processing steps include:
12881 *
12882 * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])
12883 * 2. Replace all ICU vars (like "VAR_PLURAL")
12884 * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}
12885 * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)
12886 * in case multiple ICUs have the same placeholder name
12887 *
12888 * @param message Raw translation string for post processing
12889 * @param replacements Set of replacements that should be applied
12890 *
12891 * @returns Transformed string that can be consumed by i18nStart instruction
12892 *
12893 * @codeGenApi
12894 */
12895export declare function ɵɵi18nPostprocess(message: string, replacements?: {
12896 [key: string]: (string | string[]);
12897}): string;
12898
12899/**
12900 * Marks a block of text as translatable.
12901 *
12902 * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.
12903 * The translation `message` is the value which is locale specific. The translation string may
12904 * contain placeholders which associate inner elements and sub-templates within the translation.
12905 *
12906 * The translation `message` placeholders are:
12907 * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
12908 * interpolated into. The placeholder `index` points to the expression binding index. An optional
12909 * `block` that matches the sub-template in which it was declared.
12910 * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning
12911 * and end of DOM element that were embedded in the original translation block. The placeholder
12912 * `index` points to the element index in the template instructions set. An optional `block` that
12913 * matches the sub-template in which it was declared.
12914 * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
12915 * split up and translated separately in each angular template function. The `index` points to the
12916 * `template` instruction index. A `block` that matches the sub-template in which it was declared.
12917 *
12918 * @param index A unique index of the translation in the static block.
12919 * @param messageIndex An index of the translation message from the `def.consts` array.
12920 * @param subTemplateIndex Optional sub-template index in the `message`.
12921 *
12922 * @codeGenApi
12923 */
12924export declare function ɵɵi18nStart(index: number, messageIndex: number, subTemplateIndex?: number): void;
12925
12926/**
12927 * Merges the definition from a super class to a sub class.
12928 * @param definition The definition that is a SubClass of another directive of component
12929 *
12930 * @codeGenApi
12931 */
12932export declare function ɵɵInheritDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
12933
12934/**
12935 * Generated instruction: Injects a token from the currently active injector.
12936 *
12937 * Must be used in the context of a factory function such as one defined for an
12938 * `InjectionToken`. Throws an error if not called from such a context.
12939 *
12940 * (Additional documentation moved to `inject`, as it is the public API, and an alias for this
12941 * instruction)
12942 *
12943 * @see inject
12944 * @codeGenApi
12945 * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
12946 */
12947export declare function ɵɵinject<T>(token: ProviderToken<T>): T;
12948
12949export declare function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
12950
12951/**
12952 * Information about how a type or `InjectionToken` interfaces with the DI system.
12953 *
12954 * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly
12955 * requesting injection of other types if necessary.
12956 *
12957 * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular
12958 * `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates
12959 * that the injectable does not belong to any scope.
12960 *
12961 * @codeGenApi
12962 * @publicApi The ViewEngine compiler emits code with this type for injectables. This code is
12963 * deployed to npm, and should be treated as public api.
12964
12965 */
12966export declare interface ɵɵInjectableDeclaration<T> {
12967 /**
12968 * Specifies that the given type belongs to a particular injector:
12969 * - `InjectorType` such as `NgModule`,
12970 * - `'root'` the root injector
12971 * - `'any'` all injectors.
12972 * - `null`, does not belong to any injector. Must be explicitly listed in the injector
12973 * `providers`.
12974 */
12975 providedIn: InjectorType<any> | 'root' | 'platform' | 'any' | null;
12976 /**
12977 * The token to which this definition belongs.
12978 *
12979 * Note that this may not be the same as the type that the `factory` will create.
12980 */
12981 token: unknown;
12982 /**
12983 * Factory method to execute to create an instance of the injectable.
12984 */
12985 factory: (t?: Type<any>) => T;
12986 /**
12987 * In a case of no explicit injector, a location where the instance of the injectable is stored.
12988 */
12989 value: T | undefined;
12990}
12991
12992/**
12993 * Facade for the attribute injection from DI.
12994 *
12995 * @codeGenApi
12996 */
12997export declare function ɵɵinjectAttribute(attrNameToInject: string): string | null;
12998
12999/**
13000 * @publicApi
13001 */
13002export declare type ɵɵInjectorDeclaration<T> = unknown;
13003
13004/**
13005 * Information about the providers to be included in an `Injector` as well as how the given type
13006 * which carries the information should be created by the DI system.
13007 *
13008 * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested
13009 * structure of providers with a defined priority (identically to how `NgModule`s also have
13010 * an import/dependency structure).
13011 *
13012 * NOTE: This is a private type and should not be exported
13013 *
13014 * @codeGenApi
13015 */
13016export declare interface ɵɵInjectorDef<T> {
13017 providers: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[];
13018 imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];
13019}
13020
13021/**
13022 * Throws an error indicating that a factory function could not be generated by the compiler for a
13023 * particular class.
13024 *
13025 * This instruction allows the actual error message to be optimized away when ngDevMode is turned
13026 * off, saving bytes of generated code while still providing a good experience in dev mode.
13027 *
13028 * The name of the class is not mentioned here, but will be in the generated factory function name
13029 * and thus in the stack trace.
13030 *
13031 * @codeGenApi
13032 */
13033export declare function ɵɵinvalidFactory(): never;
13034
13035/**
13036 * Throws an error indicating that a factory function could not be generated by the compiler for a
13037 * particular class.
13038 *
13039 * This instruction allows the actual error message to be optimized away when ngDevMode is turned
13040 * off, saving bytes of generated code while still providing a good experience in dev mode.
13041 *
13042 * The name of the class is not mentioned here, but will be in the generated factory function name
13043 * and thus in the stack trace.
13044 *
13045 * @codeGenApi
13046 */
13047export declare function ɵɵinvalidFactoryDep(index: number): never;
13048
13049/**
13050 * Adds an event listener to the current node.
13051 *
13052 * If an output exists on one of the node's directives, it also subscribes to the output
13053 * and saves the subscription for later cleanup.
13054 *
13055 * @param eventName Name of the event
13056 * @param listenerFn The function to be called when event emits
13057 * @param useCapture Whether or not to use capture in event listener
13058 * @param eventTargetResolver Function that returns global target information in case this listener
13059 * should be attached to a global object like window, document or body
13060 *
13061 * @codeGenApi
13062 */
13063export declare function ɵɵlistener(eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean, eventTargetResolver?: GlobalTargetResolver): typeof ɵɵlistener;
13064
13065/**
13066 * Loads a QueryList corresponding to the current view or content query.
13067 *
13068 * @codeGenApi
13069 */
13070export declare function ɵɵloadQuery<T>(): QueryList<T>;
13071
13072/**
13073 * Sets the namespace used to create elements to `null`, which forces element creation to use
13074 * `createElement` rather than `createElementNS`.
13075 *
13076 * @codeGenApi
13077 */
13078export declare function ɵɵnamespaceHTML(): void;
13079
13080/**
13081 * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.
13082 *
13083 * @codeGenApi
13084 */
13085export declare function ɵɵnamespaceMathML(): void;
13086
13087/**
13088 * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.
13089 *
13090 * @codeGenApi
13091 */
13092export declare function ɵɵnamespaceSVG(): void;
13093
13094/**
13095 * Retrieves a context at the level specified and saves it as the global, contextViewData.
13096 * Will get the next level up if level is not specified.
13097 *
13098 * This is used to save contexts of parent views so they can be bound in embedded views, or
13099 * in conjunction with reference() to bind a ref from a parent view.
13100 *
13101 * @param level The relative level of the view from which to grab context compared to contextVewData
13102 * @returns context
13103 *
13104 * @codeGenApi
13105 */
13106export declare function ɵɵnextContext<T = any>(level?: number): T;
13107
13108/**
13109 * Evaluates the class metadata declaration.
13110 *
13111 * @codeGenApi
13112 */
13113export declare function ɵɵngDeclareClassMetadata(decl: {
13114 type: Type<any>;
13115 decorators: any[];
13116 ctorParameters?: () => any[];
13117 propDecorators?: {
13118 [field: string]: any;
13119 };
13120}): void;
13121
13122/**
13123 * Compiles a partial component declaration object into a full component definition object.
13124 *
13125 * @codeGenApi
13126 */
13127export declare function ɵɵngDeclareComponent(decl: R3DeclareComponentFacade): unknown;
13128
13129/**
13130 * Compiles a partial directive declaration object into a full directive definition object.
13131 *
13132 * @codeGenApi
13133 */
13134export declare function ɵɵngDeclareDirective(decl: R3DeclareDirectiveFacade): unknown;
13135
13136/**
13137 * Compiles a partial pipe declaration object into a full pipe definition object.
13138 *
13139 * @codeGenApi
13140 */
13141export declare function ɵɵngDeclareFactory(decl: R3DeclareFactoryFacade): unknown;
13142
13143/**
13144 * Compiles a partial injectable declaration object into a full injectable definition object.
13145 *
13146 * @codeGenApi
13147 */
13148export declare function ɵɵngDeclareInjectable(decl: R3DeclareInjectableFacade): unknown;
13149
13150/**
13151 * Compiles a partial injector declaration object into a full injector definition object.
13152 *
13153 * @codeGenApi
13154 */
13155export declare function ɵɵngDeclareInjector(decl: R3DeclareInjectorFacade): unknown;
13156
13157/**
13158 * Compiles a partial NgModule declaration object into a full NgModule definition object.
13159 *
13160 * @codeGenApi
13161 */
13162export declare function ɵɵngDeclareNgModule(decl: R3DeclareNgModuleFacade): unknown;
13163
13164/**
13165 * Compiles a partial pipe declaration object into a full pipe definition object.
13166 *
13167 * @codeGenApi
13168 */
13169export declare function ɵɵngDeclarePipe(decl: R3DeclarePipeFacade): unknown;
13170
13171/**
13172 * @publicApi
13173 */
13174export declare type ɵɵNgModuleDeclaration<T, Declarations, Imports, Exports> = unknown;
13175
13176/**
13177 * The NgOnChangesFeature decorates a component with support for the ngOnChanges
13178 * lifecycle hook, so it should be included in any component that implements
13179 * that hook.
13180 *
13181 * If the component or directive uses inheritance, the NgOnChangesFeature MUST
13182 * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise
13183 * inherited properties will not be propagated to the ngOnChanges lifecycle
13184 * hook.
13185 *
13186 * Example usage:
13187 *
13188 * ```
13189 * static ɵcmp = defineComponent({
13190 * ...
13191 * inputs: {name: 'publicName'},
13192 * features: [NgOnChangesFeature]
13193 * });
13194 * ```
13195 *
13196 * @codeGenApi
13197 */
13198export declare function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature;
13199
13200
13201/**
13202 * Create a pipe.
13203 *
13204 * @param index Pipe index where the pipe will be stored.
13205 * @param pipeName The name of the pipe
13206 * @returns T the instance of the pipe.
13207 *
13208 * @codeGenApi
13209 */
13210export declare function ɵɵpipe(index: number, pipeName: string): any;
13211
13212/**
13213 * Invokes a pipe with 1 arguments.
13214 *
13215 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
13216 * the pipe only when an input to the pipe changes.
13217 *
13218 * @param index Pipe index where the pipe was stored on creation.
13219 * @param slotOffset the offset in the reserved slot space
13220 * @param v1 1st argument to {@link PipeTransform#transform}.
13221 *
13222 * @codeGenApi
13223 */
13224export declare function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any;
13225
13226/**
13227 * Invokes a pipe with 2 arguments.
13228 *
13229 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
13230 * the pipe only when an input to the pipe changes.
13231 *
13232 * @param index Pipe index where the pipe was stored on creation.
13233 * @param slotOffset the offset in the reserved slot space
13234 * @param v1 1st argument to {@link PipeTransform#transform}.
13235 * @param v2 2nd argument to {@link PipeTransform#transform}.
13236 *
13237 * @codeGenApi
13238 */
13239export declare function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any;
13240
13241/**
13242 * Invokes a pipe with 3 arguments.
13243 *
13244 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
13245 * the pipe only when an input to the pipe changes.
13246 *
13247 * @param index Pipe index where the pipe was stored on creation.
13248 * @param slotOffset the offset in the reserved slot space
13249 * @param v1 1st argument to {@link PipeTransform#transform}.
13250 * @param v2 2nd argument to {@link PipeTransform#transform}.
13251 * @param v3 4rd argument to {@link PipeTransform#transform}.
13252 *
13253 * @codeGenApi
13254 */
13255export declare function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any;
13256
13257/**
13258 * Invokes a pipe with 4 arguments.
13259 *
13260 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
13261 * the pipe only when an input to the pipe changes.
13262 *
13263 * @param index Pipe index where the pipe was stored on creation.
13264 * @param slotOffset the offset in the reserved slot space
13265 * @param v1 1st argument to {@link PipeTransform#transform}.
13266 * @param v2 2nd argument to {@link PipeTransform#transform}.
13267 * @param v3 3rd argument to {@link PipeTransform#transform}.
13268 * @param v4 4th argument to {@link PipeTransform#transform}.
13269 *
13270 * @codeGenApi
13271 */
13272export declare function ɵɵpipeBind4(index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any;
13273
13274/**
13275 * Invokes a pipe with variable number of arguments.
13276 *
13277 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
13278 * the pipe only when an input to the pipe changes.
13279 *
13280 * @param index Pipe index where the pipe was stored on creation.
13281 * @param slotOffset the offset in the reserved slot space
13282 * @param values Array of arguments to pass to {@link PipeTransform#transform} method.
13283 *
13284 * @codeGenApi
13285 */
13286export declare function ɵɵpipeBindV(index: number, slotOffset: number, values: [any, ...any[]]): any;
13287
13288/**
13289 * @publicApi
13290 */
13291export declare type ɵɵPipeDeclaration<T, Name extends string> = unknown;
13292
13293/**
13294 * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call
13295 * to the projectionDef instruction.
13296 *
13297 * @param nodeIndex
13298 * @param selectorIndex:
13299 * - 0 when the selector is `*` (or unspecified as this is the default value),
13300 * - 1 based index of the selector from the {@link projectionDef}
13301 *
13302 * @codeGenApi
13303 */
13304export declare function ɵɵprojection(nodeIndex: number, selectorIndex?: number, attrs?: TAttributes): void;
13305
13306/**
13307 * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
13308 * It takes all the selectors from the entire component's template and decides where
13309 * each projected node belongs (it re-distributes nodes among "buckets" where each "bucket" is
13310 * backed by a selector).
13311 *
13312 * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,
13313 * un-parsed form.
13314 *
13315 * The parsed form is needed for efficient matching of a node against a given CSS selector.
13316 * The un-parsed, textual form is needed for support of the ngProjectAs attribute.
13317 *
13318 * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more
13319 * drawbacks:
13320 * - having only a textual form would require runtime parsing of CSS selectors;
13321 * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a
13322 * template author).
13323 *
13324 * @param projectionSlots? A collection of projection slots. A projection slot can be based
13325 * on a parsed CSS selectors or set to the wildcard selector ("*") in order to match
13326 * all nodes which do not match any selector. If not specified, a single wildcard
13327 * selector projection slot will be defined.
13328 *
13329 * @codeGenApi
13330 */
13331export declare function ɵɵprojectionDef(projectionSlots?: ProjectionSlots): void;
13332
13333/**
13334 * Update a property on a selected element.
13335 *
13336 * Operates on the element selected by index via the {@link select} instruction.
13337 *
13338 * If the property name also exists as an input property on one of the element's directives,
13339 * the component property will be set instead of the element property. This check must
13340 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled
13341 *
13342 * @param propName Name of property. Because it is going to DOM, this is not subject to
13343 * renaming as part of minification.
13344 * @param value New value to write.
13345 * @param sanitizer An optional function used to sanitize the value.
13346 * @returns This function returns itself so that it may be chained
13347 * (e.g. `property('name', ctx.name)('title', ctx.title)`)
13348 *
13349 * @codeGenApi
13350 */
13351export declare function ɵɵproperty<T>(propName: string, value: T, sanitizer?: SanitizerFn | null): typeof ɵɵproperty;
13352
13353/**
13354 *
13355 * Update an interpolated property on an element with a lone bound value
13356 *
13357 * Used when the value passed to a property has 1 interpolated value in it, an no additional text
13358 * surrounds that interpolated value:
13359 *
13360 * ```html
13361 * <div title="{{v0}}"></div>
13362 * ```
13363 *
13364 * Its compiled representation is::
13365 *
13366 * ```ts
13367 * ɵɵpropertyInterpolate('title', v0);
13368 * ```
13369 *
13370 * If the property name also exists as an input property on one of the element's directives,
13371 * the component property will be set instead of the element property. This check must
13372 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13373 *
13374 * @param propName The name of the property to update
13375 * @param prefix Static value used for concatenation only.
13376 * @param v0 Value checked for change.
13377 * @param suffix Static value used for concatenation only.
13378 * @param sanitizer An optional sanitizer function
13379 * @returns itself, so that it may be chained.
13380 * @codeGenApi
13381 */
13382export declare function ɵɵpropertyInterpolate(propName: string, v0: any, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate;
13383
13384/**
13385 *
13386 * Update an interpolated property on an element with single bound value surrounded by text.
13387 *
13388 * Used when the value passed to a property has 1 interpolated value in it:
13389 *
13390 * ```html
13391 * <div title="prefix{{v0}}suffix"></div>
13392 * ```
13393 *
13394 * Its compiled representation is::
13395 *
13396 * ```ts
13397 * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');
13398 * ```
13399 *
13400 * If the property name also exists as an input property on one of the element's directives,
13401 * the component property will be set instead of the element property. This check must
13402 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13403 *
13404 * @param propName The name of the property to update
13405 * @param prefix Static value used for concatenation only.
13406 * @param v0 Value checked for change.
13407 * @param suffix Static value used for concatenation only.
13408 * @param sanitizer An optional sanitizer function
13409 * @returns itself, so that it may be chained.
13410 * @codeGenApi
13411 */
13412export declare function ɵɵpropertyInterpolate1(propName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate1;
13413
13414/**
13415 *
13416 * Update an interpolated property on an element with 2 bound values surrounded by text.
13417 *
13418 * Used when the value passed to a property has 2 interpolated values in it:
13419 *
13420 * ```html
13421 * <div title="prefix{{v0}}-{{v1}}suffix"></div>
13422 * ```
13423 *
13424 * Its compiled representation is::
13425 *
13426 * ```ts
13427 * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
13428 * ```
13429 *
13430 * If the property name also exists as an input property on one of the element's directives,
13431 * the component property will be set instead of the element property. This check must
13432 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13433 *
13434 * @param propName The name of the property to update
13435 * @param prefix Static value used for concatenation only.
13436 * @param v0 Value checked for change.
13437 * @param i0 Static value used for concatenation only.
13438 * @param v1 Value checked for change.
13439 * @param suffix Static value used for concatenation only.
13440 * @param sanitizer An optional sanitizer function
13441 * @returns itself, so that it may be chained.
13442 * @codeGenApi
13443 */
13444export declare function ɵɵpropertyInterpolate2(propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate2;
13445
13446/**
13447 *
13448 * Update an interpolated property on an element with 3 bound values surrounded by text.
13449 *
13450 * Used when the value passed to a property has 3 interpolated values in it:
13451 *
13452 * ```html
13453 * <div title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
13454 * ```
13455 *
13456 * Its compiled representation is::
13457 *
13458 * ```ts
13459 * ɵɵpropertyInterpolate3(
13460 * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
13461 * ```
13462 *
13463 * If the property name also exists as an input property on one of the element's directives,
13464 * the component property will be set instead of the element property. This check must
13465 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13466 *
13467 * @param propName The name of the property to update
13468 * @param prefix Static value used for concatenation only.
13469 * @param v0 Value checked for change.
13470 * @param i0 Static value used for concatenation only.
13471 * @param v1 Value checked for change.
13472 * @param i1 Static value used for concatenation only.
13473 * @param v2 Value checked for change.
13474 * @param suffix Static value used for concatenation only.
13475 * @param sanitizer An optional sanitizer function
13476 * @returns itself, so that it may be chained.
13477 * @codeGenApi
13478 */
13479export declare function ɵɵpropertyInterpolate3(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate3;
13480
13481/**
13482 *
13483 * Update an interpolated property on an element with 4 bound values surrounded by text.
13484 *
13485 * Used when the value passed to a property has 4 interpolated values in it:
13486 *
13487 * ```html
13488 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
13489 * ```
13490 *
13491 * Its compiled representation is::
13492 *
13493 * ```ts
13494 * ɵɵpropertyInterpolate4(
13495 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
13496 * ```
13497 *
13498 * If the property name also exists as an input property on one of the element's directives,
13499 * the component property will be set instead of the element property. This check must
13500 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13501 *
13502 * @param propName The name of the property to update
13503 * @param prefix Static value used for concatenation only.
13504 * @param v0 Value checked for change.
13505 * @param i0 Static value used for concatenation only.
13506 * @param v1 Value checked for change.
13507 * @param i1 Static value used for concatenation only.
13508 * @param v2 Value checked for change.
13509 * @param i2 Static value used for concatenation only.
13510 * @param v3 Value checked for change.
13511 * @param suffix Static value used for concatenation only.
13512 * @param sanitizer An optional sanitizer function
13513 * @returns itself, so that it may be chained.
13514 * @codeGenApi
13515 */
13516export 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;
13517
13518/**
13519 *
13520 * Update an interpolated property on an element with 5 bound values surrounded by text.
13521 *
13522 * Used when the value passed to a property has 5 interpolated values in it:
13523 *
13524 * ```html
13525 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
13526 * ```
13527 *
13528 * Its compiled representation is::
13529 *
13530 * ```ts
13531 * ɵɵpropertyInterpolate5(
13532 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
13533 * ```
13534 *
13535 * If the property name also exists as an input property on one of the element's directives,
13536 * the component property will be set instead of the element property. This check must
13537 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13538 *
13539 * @param propName The name of the property to update
13540 * @param prefix Static value used for concatenation only.
13541 * @param v0 Value checked for change.
13542 * @param i0 Static value used for concatenation only.
13543 * @param v1 Value checked for change.
13544 * @param i1 Static value used for concatenation only.
13545 * @param v2 Value checked for change.
13546 * @param i2 Static value used for concatenation only.
13547 * @param v3 Value checked for change.
13548 * @param i3 Static value used for concatenation only.
13549 * @param v4 Value checked for change.
13550 * @param suffix Static value used for concatenation only.
13551 * @param sanitizer An optional sanitizer function
13552 * @returns itself, so that it may be chained.
13553 * @codeGenApi
13554 */
13555export 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;
13556
13557/**
13558 *
13559 * Update an interpolated property on an element with 6 bound values surrounded by text.
13560 *
13561 * Used when the value passed to a property has 6 interpolated values in it:
13562 *
13563 * ```html
13564 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
13565 * ```
13566 *
13567 * Its compiled representation is::
13568 *
13569 * ```ts
13570 * ɵɵpropertyInterpolate6(
13571 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
13572 * ```
13573 *
13574 * If the property name also exists as an input property on one of the element's directives,
13575 * the component property will be set instead of the element property. This check must
13576 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13577 *
13578 * @param propName The name of the property to update
13579 * @param prefix Static value used for concatenation only.
13580 * @param v0 Value checked for change.
13581 * @param i0 Static value used for concatenation only.
13582 * @param v1 Value checked for change.
13583 * @param i1 Static value used for concatenation only.
13584 * @param v2 Value checked for change.
13585 * @param i2 Static value used for concatenation only.
13586 * @param v3 Value checked for change.
13587 * @param i3 Static value used for concatenation only.
13588 * @param v4 Value checked for change.
13589 * @param i4 Static value used for concatenation only.
13590 * @param v5 Value checked for change.
13591 * @param suffix Static value used for concatenation only.
13592 * @param sanitizer An optional sanitizer function
13593 * @returns itself, so that it may be chained.
13594 * @codeGenApi
13595 */
13596export 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;
13597
13598/**
13599 *
13600 * Update an interpolated property on an element with 7 bound values surrounded by text.
13601 *
13602 * Used when the value passed to a property has 7 interpolated values in it:
13603 *
13604 * ```html
13605 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
13606 * ```
13607 *
13608 * Its compiled representation is::
13609 *
13610 * ```ts
13611 * ɵɵpropertyInterpolate7(
13612 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
13613 * ```
13614 *
13615 * If the property name also exists as an input property on one of the element's directives,
13616 * the component property will be set instead of the element property. This check must
13617 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13618 *
13619 * @param propName The name of the property to update
13620 * @param prefix Static value used for concatenation only.
13621 * @param v0 Value checked for change.
13622 * @param i0 Static value used for concatenation only.
13623 * @param v1 Value checked for change.
13624 * @param i1 Static value used for concatenation only.
13625 * @param v2 Value checked for change.
13626 * @param i2 Static value used for concatenation only.
13627 * @param v3 Value checked for change.
13628 * @param i3 Static value used for concatenation only.
13629 * @param v4 Value checked for change.
13630 * @param i4 Static value used for concatenation only.
13631 * @param v5 Value checked for change.
13632 * @param i5 Static value used for concatenation only.
13633 * @param v6 Value checked for change.
13634 * @param suffix Static value used for concatenation only.
13635 * @param sanitizer An optional sanitizer function
13636 * @returns itself, so that it may be chained.
13637 * @codeGenApi
13638 */
13639export 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;
13640
13641/**
13642 *
13643 * Update an interpolated property on an element with 8 bound values surrounded by text.
13644 *
13645 * Used when the value passed to a property has 8 interpolated values in it:
13646 *
13647 * ```html
13648 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
13649 * ```
13650 *
13651 * Its compiled representation is::
13652 *
13653 * ```ts
13654 * ɵɵpropertyInterpolate8(
13655 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
13656 * ```
13657 *
13658 * If the property name also exists as an input property on one of the element's directives,
13659 * the component property will be set instead of the element property. This check must
13660 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13661 *
13662 * @param propName The name of the property to update
13663 * @param prefix Static value used for concatenation only.
13664 * @param v0 Value checked for change.
13665 * @param i0 Static value used for concatenation only.
13666 * @param v1 Value checked for change.
13667 * @param i1 Static value used for concatenation only.
13668 * @param v2 Value checked for change.
13669 * @param i2 Static value used for concatenation only.
13670 * @param v3 Value checked for change.
13671 * @param i3 Static value used for concatenation only.
13672 * @param v4 Value checked for change.
13673 * @param i4 Static value used for concatenation only.
13674 * @param v5 Value checked for change.
13675 * @param i5 Static value used for concatenation only.
13676 * @param v6 Value checked for change.
13677 * @param i6 Static value used for concatenation only.
13678 * @param v7 Value checked for change.
13679 * @param suffix Static value used for concatenation only.
13680 * @param sanitizer An optional sanitizer function
13681 * @returns itself, so that it may be chained.
13682 * @codeGenApi
13683 */
13684export 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;
13685
13686/**
13687 * Update an interpolated property on an element with 9 or more bound values surrounded by text.
13688 *
13689 * Used when the number of interpolated values exceeds 8.
13690 *
13691 * ```html
13692 * <div
13693 * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
13694 * ```
13695 *
13696 * Its compiled representation is::
13697 *
13698 * ```ts
13699 * ɵɵpropertyInterpolateV(
13700 * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
13701 * 'suffix']);
13702 * ```
13703 *
13704 * If the property name also exists as an input property on one of the element's directives,
13705 * the component property will be set instead of the element property. This check must
13706 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13707 *
13708 * @param propName The name of the property to update.
13709 * @param values The collection of values and the strings inbetween those values, beginning with a
13710 * string prefix and ending with a string suffix.
13711 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
13712 * @param sanitizer An optional sanitizer function
13713 * @returns itself, so that it may be chained.
13714 * @codeGenApi
13715 */
13716export declare function ɵɵpropertyInterpolateV(propName: string, values: any[], sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolateV;
13717
13718/**
13719 * This feature resolves the providers of a directive (or component),
13720 * and publish them into the DI system, making it visible to others for injection.
13721 *
13722 * For example:
13723 * ```ts
13724 * class ComponentWithProviders {
13725 * constructor(private greeter: GreeterDE) {}
13726 *
13727 * static ɵcmp = defineComponent({
13728 * type: ComponentWithProviders,
13729 * selectors: [['component-with-providers']],
13730 * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),
13731 * decls: 1,
13732 * vars: 1,
13733 * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {
13734 * if (fs & RenderFlags.Create) {
13735 * ɵɵtext(0);
13736 * }
13737 * if (fs & RenderFlags.Update) {
13738 * ɵɵtextInterpolate(ctx.greeter.greet());
13739 * }
13740 * },
13741 * features: [ɵɵProvidersFeature([GreeterDE])]
13742 * });
13743 * }
13744 * ```
13745 *
13746 * @param definition
13747 *
13748 * @codeGenApi
13749 */
13750export declare function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders?: Provider[]): (definition: ɵDirectiveDef<T>) => void;
13751
13752/**
13753 * Bindings for pure functions are stored after regular bindings.
13754 *
13755 * |-------decls------|---------vars---------| |----- hostVars (dir1) ------|
13756 * ------------------------------------------------------------------------------------------
13757 * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |
13758 * ------------------------------------------------------------------------------------------
13759 * ^ ^
13760 * TView.bindingStartIndex TView.expandoStartIndex
13761 *
13762 * Pure function instructions are given an offset from the binding root. Adding the offset to the
13763 * binding root gives the first index where the bindings are stored. In component views, the binding
13764 * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +
13765 * any directive instances + any hostVars in directives evaluated before it.
13766 *
13767 * See VIEW_DATA.md for more information about host binding resolution.
13768 */
13769/**
13770 * If the value hasn't been saved, calls the pure function to store and return the
13771 * value. If it has been saved, returns the saved value.
13772 *
13773 * @param slotOffset the offset from binding root to the reserved slot
13774 * @param pureFn Function that returns a value
13775 * @param thisArg Optional calling context of pureFn
13776 * @returns value
13777 *
13778 * @codeGenApi
13779 */
13780export declare function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T;
13781
13782/**
13783 * If the value of the provided exp has changed, calls the pure function to return
13784 * an updated value. Or if the value has not changed, returns cached value.
13785 *
13786 * @param slotOffset the offset from binding root to the reserved slot
13787 * @param pureFn Function that returns an updated value
13788 * @param exp Updated expression value
13789 * @param thisArg Optional calling context of pureFn
13790 * @returns Updated or cached value
13791 *
13792 * @codeGenApi
13793 */
13794export declare function ɵɵpureFunction1(slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any;
13795
13796/**
13797 * If the value of any provided exp has changed, calls the pure function to return
13798 * an updated value. Or if no values have changed, returns cached value.
13799 *
13800 * @param slotOffset the offset from binding root to the reserved slot
13801 * @param pureFn
13802 * @param exp1
13803 * @param exp2
13804 * @param thisArg Optional calling context of pureFn
13805 * @returns Updated or cached value
13806 *
13807 * @codeGenApi
13808 */
13809export declare function ɵɵpureFunction2(slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any, thisArg?: any): any;
13810
13811/**
13812 * If the value of any provided exp has changed, calls the pure function to return
13813 * an updated value. Or if no values have changed, returns cached value.
13814 *
13815 * @param slotOffset the offset from binding root to the reserved slot
13816 * @param pureFn
13817 * @param exp1
13818 * @param exp2
13819 * @param exp3
13820 * @param thisArg Optional calling context of pureFn
13821 * @returns Updated or cached value
13822 *
13823 * @codeGenApi
13824 */
13825export declare function ɵɵpureFunction3(slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any, thisArg?: any): any;
13826
13827/**
13828 * If the value of any provided exp has changed, calls the pure function to return
13829 * an updated value. Or if no values have changed, returns cached value.
13830 *
13831 * @param slotOffset the offset from binding root to the reserved slot
13832 * @param pureFn
13833 * @param exp1
13834 * @param exp2
13835 * @param exp3
13836 * @param exp4
13837 * @param thisArg Optional calling context of pureFn
13838 * @returns Updated or cached value
13839 *
13840 * @codeGenApi
13841 */
13842export 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;
13843
13844/**
13845 * If the value of any provided exp has changed, calls the pure function to return
13846 * an updated value. Or if no values have changed, returns cached value.
13847 *
13848 * @param slotOffset the offset from binding root to the reserved slot
13849 * @param pureFn
13850 * @param exp1
13851 * @param exp2
13852 * @param exp3
13853 * @param exp4
13854 * @param exp5
13855 * @param thisArg Optional calling context of pureFn
13856 * @returns Updated or cached value
13857 *
13858 * @codeGenApi
13859 */
13860export 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;
13861
13862/**
13863 * If the value of any provided exp has changed, calls the pure function to return
13864 * an updated value. Or if no values have changed, returns cached value.
13865 *
13866 * @param slotOffset the offset from binding root to the reserved slot
13867 * @param pureFn
13868 * @param exp1
13869 * @param exp2
13870 * @param exp3
13871 * @param exp4
13872 * @param exp5
13873 * @param exp6
13874 * @param thisArg Optional calling context of pureFn
13875 * @returns Updated or cached value
13876 *
13877 * @codeGenApi
13878 */
13879export 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;
13880
13881/**
13882 * If the value of any provided exp has changed, calls the pure function to return
13883 * an updated value. Or if no values have changed, returns cached value.
13884 *
13885 * @param slotOffset the offset from binding root to the reserved slot
13886 * @param pureFn
13887 * @param exp1
13888 * @param exp2
13889 * @param exp3
13890 * @param exp4
13891 * @param exp5
13892 * @param exp6
13893 * @param exp7
13894 * @param thisArg Optional calling context of pureFn
13895 * @returns Updated or cached value
13896 *
13897 * @codeGenApi
13898 */
13899export 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;
13900
13901/**
13902 * If the value of any provided exp has changed, calls the pure function to return
13903 * an updated value. Or if no values have changed, returns cached value.
13904 *
13905 * @param slotOffset the offset from binding root to the reserved slot
13906 * @param pureFn
13907 * @param exp1
13908 * @param exp2
13909 * @param exp3
13910 * @param exp4
13911 * @param exp5
13912 * @param exp6
13913 * @param exp7
13914 * @param exp8
13915 * @param thisArg Optional calling context of pureFn
13916 * @returns Updated or cached value
13917 *
13918 * @codeGenApi
13919 */
13920export 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;
13921
13922/**
13923 * pureFunction instruction that can support any number of bindings.
13924 *
13925 * If the value of any provided exp has changed, calls the pure function to return
13926 * an updated value. Or if no values have changed, returns cached value.
13927 *
13928 * @param slotOffset the offset from binding root to the reserved slot
13929 * @param pureFn A pure function that takes binding values and builds an object or array
13930 * containing those values.
13931 * @param exps An array of binding values
13932 * @param thisArg Optional calling context of pureFn
13933 * @returns Updated or cached value
13934 *
13935 * @codeGenApi
13936 */
13937export declare function ɵɵpureFunctionV(slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any;
13938
13939/**
13940 * Refreshes a query by combining matches from all active views and removing matches from deleted
13941 * views.
13942 *
13943 * @returns `true` if a query got dirty during change detection or if this is a static query
13944 * resolving in creation mode, `false` otherwise.
13945 *
13946 * @codeGenApi
13947 */
13948export declare function ɵɵqueryRefresh(queryList: QueryList<any>): boolean;
13949
13950/**
13951 * Retrieves a local reference from the current contextViewData.
13952 *
13953 * If the reference to retrieve is in a parent view, this instruction is used in conjunction
13954 * with a nextContext() call, which walks up the tree and updates the contextViewData instance.
13955 *
13956 * @param index The index of the local ref in contextViewData.
13957 *
13958 * @codeGenApi
13959 */
13960export declare function ɵɵreference<T>(index: number): T;
13961
13962/**
13963 *
13964 * @codeGenApi
13965 */
13966export declare function ɵɵresolveBody(element: RElement & {
13967 ownerDocument: Document;
13968}): HTMLElement;
13969
13970/**
13971 *
13972 * @codeGenApi
13973 */
13974export declare function ɵɵresolveDocument(element: RElement & {
13975 ownerDocument: Document;
13976}): Document;
13977
13978/**
13979 *
13980 * @codeGenApi
13981 */
13982export declare function ɵɵresolveWindow(element: RElement & {
13983 ownerDocument: Document;
13984}): (Window & typeof globalThis) | null;
13985
13986/**
13987 * Restores `contextViewData` to the given OpaqueViewState instance.
13988 *
13989 * Used in conjunction with the getCurrentView() instruction to save a snapshot
13990 * of the current view and restore it when listeners are invoked. This allows
13991 * walking the declaration view tree in listeners to get vars from parent views.
13992 *
13993 * @param viewToRestore The OpaqueViewState instance to restore.
13994 * @returns Context of the restored OpaqueViewState instance.
13995 *
13996 * @codeGenApi
13997 */
13998export declare function ɵɵrestoreView<T = any>(viewToRestore: OpaqueViewState): T;
13999
14000/**
14001 * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing
14002 * dangerous content.
14003 *
14004 * This method parses the `html` and locates potentially dangerous content (such as urls and
14005 * javascript) and removes it.
14006 *
14007 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.
14008 *
14009 * @param unsafeHtml untrusted `html`, typically from the user.
14010 * @returns `html` string which is safe to display to user, because all of the dangerous javascript
14011 * and urls have been removed.
14012 *
14013 * @codeGenApi
14014 */
14015export declare function ɵɵsanitizeHtml(unsafeHtml: any): TrustedHTML | string;
14016
14017/**
14018 * A `url` sanitizer which only lets trusted `url`s through.
14019 *
14020 * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.
14021 *
14022 * @param unsafeResourceUrl untrusted `url`, typically from the user.
14023 * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
14024 * only trusted `url`s have been allowed to pass.
14025 *
14026 * @codeGenApi
14027 */
14028export declare function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): TrustedScriptURL | string;
14029
14030/**
14031 * A `script` sanitizer which only lets trusted javascript through.
14032 *
14033 * This passes only `script`s marked trusted by calling {@link
14034 * bypassSanitizationTrustScript}.
14035 *
14036 * @param unsafeScript untrusted `script`, typically from the user.
14037 * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,
14038 * because only trusted `scripts` have been allowed to pass.
14039 *
14040 * @codeGenApi
14041 */
14042export declare function ɵɵsanitizeScript(unsafeScript: any): TrustedScript | string;
14043
14044/**
14045 * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing
14046 * dangerous content.
14047 *
14048 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.
14049 *
14050 * @param unsafeStyle untrusted `style`, typically from the user.
14051 * @returns `style` string which is safe to bind to the `style` properties.
14052 *
14053 * @codeGenApi
14054 */
14055export declare function ɵɵsanitizeStyle(unsafeStyle: any): string;
14056
14057/**
14058 * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing
14059 * dangerous
14060 * content.
14061 *
14062 * This method parses the `url` and locates potentially dangerous content (such as javascript) and
14063 * removes it.
14064 *
14065 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.
14066 *
14067 * @param unsafeUrl untrusted `url`, typically from the user.
14068 * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
14069 * all of the dangerous javascript has been removed.
14070 *
14071 * @codeGenApi
14072 */
14073export declare function ɵɵsanitizeUrl(unsafeUrl: any): string;
14074
14075/**
14076 * Sanitizes URL, selecting sanitizer function based on tag and property names.
14077 *
14078 * This function is used in case we can't define security context at compile time, when only prop
14079 * name is available. This happens when we generate host bindings for Directives/Components. The
14080 * host element is unknown at compile time, so we defer calculation of specific sanitizer to
14081 * runtime.
14082 *
14083 * @param unsafeUrl untrusted `url`, typically from the user.
14084 * @param tag target element tag name.
14085 * @param prop name of the property that contains the value.
14086 * @returns `url` string which is safe to bind.
14087 *
14088 * @codeGenApi
14089 */
14090export declare function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any;
14091
14092/**
14093 * Generated next to NgModules to monkey-patch directive and pipe references onto a component's
14094 * definition, when generating a direct reference in the component file would otherwise create an
14095 * import cycle.
14096 *
14097 * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.
14098 *
14099 * @codeGenApi
14100 */
14101export declare function ɵɵsetComponentScope(type: ɵComponentType<any>, directives: Type<any>[], pipes: Type<any>[]): void;
14102
14103/**
14104 * Adds the module metadata that is necessary to compute the module's transitive scope to an
14105 * existing module definition.
14106 *
14107 * Scope metadata of modules is not used in production builds, so calls to this function can be
14108 * marked pure to tree-shake it from the bundle, allowing for all referenced declarations
14109 * to become eligible for tree-shaking as well.
14110 *
14111 * @codeGenApi
14112 */
14113export declare function ɵɵsetNgModuleScope(type: any, scope: {
14114 /** List of components, directives, and pipes declared by this module. */
14115 declarations?: Type<any>[] | (() => Type<any>[]);
14116 /** List of modules or `ModuleWithProviders` imported by this module. */
14117 imports?: Type<any>[] | (() => Type<any>[]);
14118 /**
14119 * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
14120 * module.
14121 */
14122 exports?: Type<any>[] | (() => Type<any>[]);
14123}): unknown;
14124
14125/**
14126 * Update style bindings using an object literal on an element.
14127 *
14128 * This instruction is meant to apply styling via the `[style]="exp"` template bindings.
14129 * When styles are applied to the element they will then be updated with respect to
14130 * any styles/classes set via `styleProp`. If any styles are set to falsy
14131 * then they will be removed from the element.
14132 *
14133 * Note that the styling instruction will not be applied until `stylingApply` is called.
14134 *
14135 * @param styles A key/value style map of the styles that will be applied to the given element.
14136 * Any missing styles (that have already been applied to the element beforehand) will be
14137 * removed (unset) from the element's styling.
14138 *
14139 * Note that this will apply the provided styleMap value to the host element if this function
14140 * is called within a host binding.
14141 *
14142 * @codeGenApi
14143 */
14144export declare function ɵɵstyleMap(styles: {
14145 [styleName: string]: any;
14146} | string | undefined | null): void;
14147
14148
14149/**
14150 *
14151 * Update an interpolated style on an element with single bound value surrounded by text.
14152 *
14153 * Used when the value passed to a property has 1 interpolated value in it:
14154 *
14155 * ```html
14156 * <div style="key: {{v0}}suffix"></div>
14157 * ```
14158 *
14159 * Its compiled representation is:
14160 *
14161 * ```ts
14162 * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');
14163 * ```
14164 *
14165 * @param prefix Static value used for concatenation only.
14166 * @param v0 Value checked for change.
14167 * @param suffix Static value used for concatenation only.
14168 * @codeGenApi
14169 */
14170export declare function ɵɵstyleMapInterpolate1(prefix: string, v0: any, suffix: string): void;
14171
14172/**
14173 *
14174 * Update an interpolated style on an element with 2 bound values surrounded by text.
14175 *
14176 * Used when the value passed to a property has 2 interpolated values in it:
14177 *
14178 * ```html
14179 * <div style="key: {{v0}}; key1: {{v1}}suffix"></div>
14180 * ```
14181 *
14182 * Its compiled representation is:
14183 *
14184 * ```ts
14185 * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');
14186 * ```
14187 *
14188 * @param prefix Static value used for concatenation only.
14189 * @param v0 Value checked for change.
14190 * @param i0 Static value used for concatenation only.
14191 * @param v1 Value checked for change.
14192 * @param suffix Static value used for concatenation only.
14193 * @codeGenApi
14194 */
14195export declare function ɵɵstyleMapInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): void;
14196
14197/**
14198 *
14199 * Update an interpolated style on an element with 3 bound values surrounded by text.
14200 *
14201 * Used when the value passed to a property has 3 interpolated values in it:
14202 *
14203 * ```html
14204 * <div style="key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix"></div>
14205 * ```
14206 *
14207 * Its compiled representation is:
14208 *
14209 * ```ts
14210 * ɵɵstyleMapInterpolate3(
14211 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');
14212 * ```
14213 *
14214 * @param prefix Static value used for concatenation only.
14215 * @param v0 Value checked for change.
14216 * @param i0 Static value used for concatenation only.
14217 * @param v1 Value checked for change.
14218 * @param i1 Static value used for concatenation only.
14219 * @param v2 Value checked for change.
14220 * @param suffix Static value used for concatenation only.
14221 * @codeGenApi
14222 */
14223export declare function ɵɵstyleMapInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void;
14224
14225/**
14226 *
14227 * Update an interpolated style on an element with 4 bound values surrounded by text.
14228 *
14229 * Used when the value passed to a property has 4 interpolated values in it:
14230 *
14231 * ```html
14232 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix"></div>
14233 * ```
14234 *
14235 * Its compiled representation is:
14236 *
14237 * ```ts
14238 * ɵɵstyleMapInterpolate4(
14239 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');
14240 * ```
14241 *
14242 * @param prefix Static value used for concatenation only.
14243 * @param v0 Value checked for change.
14244 * @param i0 Static value used for concatenation only.
14245 * @param v1 Value checked for change.
14246 * @param i1 Static value used for concatenation only.
14247 * @param v2 Value checked for change.
14248 * @param i2 Static value used for concatenation only.
14249 * @param v3 Value checked for change.
14250 * @param suffix Static value used for concatenation only.
14251 * @codeGenApi
14252 */
14253export declare function ɵɵstyleMapInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): void;
14254
14255/**
14256 *
14257 * Update an interpolated style on an element with 5 bound values surrounded by text.
14258 *
14259 * Used when the value passed to a property has 5 interpolated values in it:
14260 *
14261 * ```html
14262 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix"></div>
14263 * ```
14264 *
14265 * Its compiled representation is:
14266 *
14267 * ```ts
14268 * ɵɵstyleMapInterpolate5(
14269 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');
14270 * ```
14271 *
14272 * @param prefix Static value used for concatenation only.
14273 * @param v0 Value checked for change.
14274 * @param i0 Static value used for concatenation only.
14275 * @param v1 Value checked for change.
14276 * @param i1 Static value used for concatenation only.
14277 * @param v2 Value checked for change.
14278 * @param i2 Static value used for concatenation only.
14279 * @param v3 Value checked for change.
14280 * @param i3 Static value used for concatenation only.
14281 * @param v4 Value checked for change.
14282 * @param suffix Static value used for concatenation only.
14283 * @codeGenApi
14284 */
14285export 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;
14286
14287/**
14288 *
14289 * Update an interpolated style on an element with 6 bound values surrounded by text.
14290 *
14291 * Used when the value passed to a property has 6 interpolated values in it:
14292 *
14293 * ```html
14294 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};
14295 * key5: {{v5}}suffix"></div>
14296 * ```
14297 *
14298 * Its compiled representation is:
14299 *
14300 * ```ts
14301 * ɵɵstyleMapInterpolate6(
14302 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
14303 * 'suffix');
14304 * ```
14305 *
14306 * @param prefix Static value used for concatenation only.
14307 * @param v0 Value checked for change.
14308 * @param i0 Static value used for concatenation only.
14309 * @param v1 Value checked for change.
14310 * @param i1 Static value used for concatenation only.
14311 * @param v2 Value checked for change.
14312 * @param i2 Static value used for concatenation only.
14313 * @param v3 Value checked for change.
14314 * @param i3 Static value used for concatenation only.
14315 * @param v4 Value checked for change.
14316 * @param i4 Static value used for concatenation only.
14317 * @param v5 Value checked for change.
14318 * @param suffix Static value used for concatenation only.
14319 * @codeGenApi
14320 */
14321export 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;
14322
14323/**
14324 *
14325 * Update an interpolated style on an element with 7 bound values surrounded by text.
14326 *
14327 * Used when the value passed to a property has 7 interpolated values in it:
14328 *
14329 * ```html
14330 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
14331 * key6: {{v6}}suffix"></div>
14332 * ```
14333 *
14334 * Its compiled representation is:
14335 *
14336 * ```ts
14337 * ɵɵstyleMapInterpolate7(
14338 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
14339 * '; key6: ', v6, 'suffix');
14340 * ```
14341 *
14342 * @param prefix Static value used for concatenation only.
14343 * @param v0 Value checked for change.
14344 * @param i0 Static value used for concatenation only.
14345 * @param v1 Value checked for change.
14346 * @param i1 Static value used for concatenation only.
14347 * @param v2 Value checked for change.
14348 * @param i2 Static value used for concatenation only.
14349 * @param v3 Value checked for change.
14350 * @param i3 Static value used for concatenation only.
14351 * @param v4 Value checked for change.
14352 * @param i4 Static value used for concatenation only.
14353 * @param v5 Value checked for change.
14354 * @param i5 Static value used for concatenation only.
14355 * @param v6 Value checked for change.
14356 * @param suffix Static value used for concatenation only.
14357 * @codeGenApi
14358 */
14359export 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;
14360
14361/**
14362 *
14363 * Update an interpolated style on an element with 8 bound values surrounded by text.
14364 *
14365 * Used when the value passed to a property has 8 interpolated values in it:
14366 *
14367 * ```html
14368 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
14369 * key6: {{v6}}; key7: {{v7}}suffix"></div>
14370 * ```
14371 *
14372 * Its compiled representation is:
14373 *
14374 * ```ts
14375 * ɵɵstyleMapInterpolate8(
14376 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
14377 * '; key6: ', v6, '; key7: ', v7, 'suffix');
14378 * ```
14379 *
14380 * @param prefix Static value used for concatenation only.
14381 * @param v0 Value checked for change.
14382 * @param i0 Static value used for concatenation only.
14383 * @param v1 Value checked for change.
14384 * @param i1 Static value used for concatenation only.
14385 * @param v2 Value checked for change.
14386 * @param i2 Static value used for concatenation only.
14387 * @param v3 Value checked for change.
14388 * @param i3 Static value used for concatenation only.
14389 * @param v4 Value checked for change.
14390 * @param i4 Static value used for concatenation only.
14391 * @param v5 Value checked for change.
14392 * @param i5 Static value used for concatenation only.
14393 * @param v6 Value checked for change.
14394 * @param i6 Static value used for concatenation only.
14395 * @param v7 Value checked for change.
14396 * @param suffix Static value used for concatenation only.
14397 * @codeGenApi
14398 */
14399export 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;
14400
14401/**
14402 * Update an interpolated style on an element with 9 or more bound values surrounded by text.
14403 *
14404 * Used when the number of interpolated values exceeds 8.
14405 *
14406 * ```html
14407 * <div
14408 * class="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
14409 * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix"></div>
14410 * ```
14411 *
14412 * Its compiled representation is:
14413 *
14414 * ```ts
14415 * ɵɵstyleMapInterpolateV(
14416 * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
14417 * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);
14418 * ```
14419 *.
14420 * @param values The collection of values and the strings in-between those values, beginning with
14421 * a string prefix and ending with a string suffix.
14422 * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)
14423 * @codeGenApi
14424 */
14425export declare function ɵɵstyleMapInterpolateV(values: any[]): void;
14426
14427/**
14428 * Update a style binding on an element with the provided value.
14429 *
14430 * If the style value is falsy then it will be removed from the element
14431 * (or assigned a different value depending if there are any styles placed
14432 * on the element with `styleMap` or any static styles that are
14433 * present from when the element was created with `styling`).
14434 *
14435 * Note that the styling element is updated as part of `stylingApply`.
14436 *
14437 * @param prop A valid CSS property.
14438 * @param value New value to write (`null` or an empty string to remove).
14439 * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.
14440 *
14441 * Note that this will apply the provided style value to the host element if this function is called
14442 * within a host binding function.
14443 *
14444 * @codeGenApi
14445 */
14446export declare function ɵɵstyleProp(prop: string, value: string | number | ɵSafeValue | undefined | null, suffix?: string | null): typeof ɵɵstyleProp;
14447
14448
14449/**
14450 *
14451 * Update an interpolated style property on an element with single bound value surrounded by text.
14452 *
14453 * Used when the value passed to a property has 1 interpolated value in it:
14454 *
14455 * ```html
14456 * <div style.color="prefix{{v0}}suffix"></div>
14457 * ```
14458 *
14459 * Its compiled representation is:
14460 *
14461 * ```ts
14462 * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');
14463 * ```
14464 *
14465 * @param styleIndex Index of style to update. This index value refers to the
14466 * index of the style in the style bindings array that was passed into
14467 * `styling`.
14468 * @param prefix Static value used for concatenation only.
14469 * @param v0 Value checked for change.
14470 * @param suffix Static value used for concatenation only.
14471 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14472 * @returns itself, so that it may be chained.
14473 * @codeGenApi
14474 */
14475export declare function ɵɵstylePropInterpolate1(prop: string, prefix: string, v0: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate1;
14476
14477/**
14478 *
14479 * Update an interpolated style property on an element with 2 bound values surrounded by text.
14480 *
14481 * Used when the value passed to a property has 2 interpolated values in it:
14482 *
14483 * ```html
14484 * <div style.color="prefix{{v0}}-{{v1}}suffix"></div>
14485 * ```
14486 *
14487 * Its compiled representation is:
14488 *
14489 * ```ts
14490 * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');
14491 * ```
14492 *
14493 * @param styleIndex Index of style to update. This index value refers to the
14494 * index of the style in the style bindings array that was passed into
14495 * `styling`.
14496 * @param prefix Static value used for concatenation only.
14497 * @param v0 Value checked for change.
14498 * @param i0 Static value used for concatenation only.
14499 * @param v1 Value checked for change.
14500 * @param suffix Static value used for concatenation only.
14501 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14502 * @returns itself, so that it may be chained.
14503 * @codeGenApi
14504 */
14505export declare function ɵɵstylePropInterpolate2(prop: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate2;
14506
14507/**
14508 *
14509 * Update an interpolated style property on an element with 3 bound values surrounded by text.
14510 *
14511 * Used when the value passed to a property has 3 interpolated values in it:
14512 *
14513 * ```html
14514 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
14515 * ```
14516 *
14517 * Its compiled representation is:
14518 *
14519 * ```ts
14520 * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');
14521 * ```
14522 *
14523 * @param styleIndex Index of style to update. This index value refers to the
14524 * index of the style in the style bindings array that was passed into
14525 * `styling`.
14526 * @param prefix Static value used for concatenation only.
14527 * @param v0 Value checked for change.
14528 * @param i0 Static value used for concatenation only.
14529 * @param v1 Value checked for change.
14530 * @param i1 Static value used for concatenation only.
14531 * @param v2 Value checked for change.
14532 * @param suffix Static value used for concatenation only.
14533 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14534 * @returns itself, so that it may be chained.
14535 * @codeGenApi
14536 */
14537export declare function ɵɵstylePropInterpolate3(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate3;
14538
14539/**
14540 *
14541 * Update an interpolated style property on an element with 4 bound values surrounded by text.
14542 *
14543 * Used when the value passed to a property has 4 interpolated values in it:
14544 *
14545 * ```html
14546 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
14547 * ```
14548 *
14549 * Its compiled representation is:
14550 *
14551 * ```ts
14552 * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
14553 * ```
14554 *
14555 * @param styleIndex Index of style to update. This index value refers to the
14556 * index of the style in the style bindings array that was passed into
14557 * `styling`.
14558 * @param prefix Static value used for concatenation only.
14559 * @param v0 Value checked for change.
14560 * @param i0 Static value used for concatenation only.
14561 * @param v1 Value checked for change.
14562 * @param i1 Static value used for concatenation only.
14563 * @param v2 Value checked for change.
14564 * @param i2 Static value used for concatenation only.
14565 * @param v3 Value checked for change.
14566 * @param suffix Static value used for concatenation only.
14567 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14568 * @returns itself, so that it may be chained.
14569 * @codeGenApi
14570 */
14571export 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;
14572
14573/**
14574 *
14575 * Update an interpolated style property on an element with 5 bound values surrounded by text.
14576 *
14577 * Used when the value passed to a property has 5 interpolated values in it:
14578 *
14579 * ```html
14580 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
14581 * ```
14582 *
14583 * Its compiled representation is:
14584 *
14585 * ```ts
14586 * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
14587 * ```
14588 *
14589 * @param styleIndex Index of style to update. This index value refers to the
14590 * index of the style in the style bindings array that was passed into
14591 * `styling`.
14592 * @param prefix Static value used for concatenation only.
14593 * @param v0 Value checked for change.
14594 * @param i0 Static value used for concatenation only.
14595 * @param v1 Value checked for change.
14596 * @param i1 Static value used for concatenation only.
14597 * @param v2 Value checked for change.
14598 * @param i2 Static value used for concatenation only.
14599 * @param v3 Value checked for change.
14600 * @param i3 Static value used for concatenation only.
14601 * @param v4 Value checked for change.
14602 * @param suffix Static value used for concatenation only.
14603 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14604 * @returns itself, so that it may be chained.
14605 * @codeGenApi
14606 */
14607export 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;
14608
14609/**
14610 *
14611 * Update an interpolated style property on an element with 6 bound values surrounded by text.
14612 *
14613 * Used when the value passed to a property has 6 interpolated values in it:
14614 *
14615 * ```html
14616 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
14617 * ```
14618 *
14619 * Its compiled representation is:
14620 *
14621 * ```ts
14622 * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
14623 * ```
14624 *
14625 * @param styleIndex Index of style to update. This index value refers to the
14626 * index of the style in the style bindings array that was passed into
14627 * `styling`.
14628 * @param prefix Static value used for concatenation only.
14629 * @param v0 Value checked for change.
14630 * @param i0 Static value used for concatenation only.
14631 * @param v1 Value checked for change.
14632 * @param i1 Static value used for concatenation only.
14633 * @param v2 Value checked for change.
14634 * @param i2 Static value used for concatenation only.
14635 * @param v3 Value checked for change.
14636 * @param i3 Static value used for concatenation only.
14637 * @param v4 Value checked for change.
14638 * @param i4 Static value used for concatenation only.
14639 * @param v5 Value checked for change.
14640 * @param suffix Static value used for concatenation only.
14641 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14642 * @returns itself, so that it may be chained.
14643 * @codeGenApi
14644 */
14645export 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;
14646
14647/**
14648 *
14649 * Update an interpolated style property on an element with 7 bound values surrounded by text.
14650 *
14651 * Used when the value passed to a property has 7 interpolated values in it:
14652 *
14653 * ```html
14654 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
14655 * ```
14656 *
14657 * Its compiled representation is:
14658 *
14659 * ```ts
14660 * ɵɵstylePropInterpolate7(
14661 * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
14662 * ```
14663 *
14664 * @param styleIndex Index of style to update. This index value refers to the
14665 * index of the style in the style bindings array that was passed into
14666 * `styling`.
14667 * @param prefix Static value used for concatenation only.
14668 * @param v0 Value checked for change.
14669 * @param i0 Static value used for concatenation only.
14670 * @param v1 Value checked for change.
14671 * @param i1 Static value used for concatenation only.
14672 * @param v2 Value checked for change.
14673 * @param i2 Static value used for concatenation only.
14674 * @param v3 Value checked for change.
14675 * @param i3 Static value used for concatenation only.
14676 * @param v4 Value checked for change.
14677 * @param i4 Static value used for concatenation only.
14678 * @param v5 Value checked for change.
14679 * @param i5 Static value used for concatenation only.
14680 * @param v6 Value checked for change.
14681 * @param suffix Static value used for concatenation only.
14682 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14683 * @returns itself, so that it may be chained.
14684 * @codeGenApi
14685 */
14686export 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;
14687
14688/**
14689 *
14690 * Update an interpolated style property on an element with 8 bound values surrounded by text.
14691 *
14692 * Used when the value passed to a property has 8 interpolated values in it:
14693 *
14694 * ```html
14695 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
14696 * ```
14697 *
14698 * Its compiled representation is:
14699 *
14700 * ```ts
14701 * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,
14702 * '-', v7, 'suffix');
14703 * ```
14704 *
14705 * @param styleIndex Index of style to update. This index value refers to the
14706 * index of the style in the style bindings array that was passed into
14707 * `styling`.
14708 * @param prefix Static value used for concatenation only.
14709 * @param v0 Value checked for change.
14710 * @param i0 Static value used for concatenation only.
14711 * @param v1 Value checked for change.
14712 * @param i1 Static value used for concatenation only.
14713 * @param v2 Value checked for change.
14714 * @param i2 Static value used for concatenation only.
14715 * @param v3 Value checked for change.
14716 * @param i3 Static value used for concatenation only.
14717 * @param v4 Value checked for change.
14718 * @param i4 Static value used for concatenation only.
14719 * @param v5 Value checked for change.
14720 * @param i5 Static value used for concatenation only.
14721 * @param v6 Value checked for change.
14722 * @param i6 Static value used for concatenation only.
14723 * @param v7 Value checked for change.
14724 * @param suffix Static value used for concatenation only.
14725 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14726 * @returns itself, so that it may be chained.
14727 * @codeGenApi
14728 */
14729export 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;
14730
14731/**
14732 * Update an interpolated style property on an element with 9 or more bound values surrounded by
14733 * text.
14734 *
14735 * Used when the number of interpolated values exceeds 8.
14736 *
14737 * ```html
14738 * <div
14739 * style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix">
14740 * </div>
14741 * ```
14742 *
14743 * Its compiled representation is:
14744 *
14745 * ```ts
14746 * ɵɵstylePropInterpolateV(
14747 * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
14748 * 'suffix']);
14749 * ```
14750 *
14751 * @param styleIndex Index of style to update. This index value refers to the
14752 * index of the style in the style bindings array that was passed into
14753 * `styling`..
14754 * @param values The collection of values and the strings in-between those values, beginning with
14755 * a string prefix and ending with a string suffix.
14756 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
14757 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14758 * @returns itself, so that it may be chained.
14759 * @codeGenApi
14760 */
14761export declare function ɵɵstylePropInterpolateV(prop: string, values: any[], valueSuffix?: string | null): typeof ɵɵstylePropInterpolateV;
14762
14763/**
14764 * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.
14765 *
14766 * This instruction is for compatibility purposes and is designed to ensure that a
14767 * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered
14768 * in the component's renderer. Normally all host listeners are evaluated with the
14769 * parent component's renderer, but, in the case of animation @triggers, they need
14770 * to be evaluated with the sub component's renderer (because that's where the
14771 * animation triggers are defined).
14772 *
14773 * Do not use this instruction as a replacement for `listener`. This instruction
14774 * only exists to ensure compatibility with the ViewEngine's host binding behavior.
14775 *
14776 * @param eventName Name of the event
14777 * @param listenerFn The function to be called when event emits
14778 * @param useCapture Whether or not to use capture in event listener
14779 * @param eventTargetResolver Function that returns global target information in case this listener
14780 * should be attached to a global object like window, document or body
14781 *
14782 * @codeGenApi
14783 */
14784export declare function ɵɵsyntheticHostListener(eventName: string, listenerFn: (e?: any) => any): typeof ɵɵsyntheticHostListener;
14785
14786/**
14787 * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.
14788 *
14789 * This instruction is for compatibility purposes and is designed to ensure that a
14790 * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in
14791 * the component's renderer. Normally all host bindings are evaluated with the parent
14792 * component's renderer, but, in the case of animation @triggers, they need to be
14793 * evaluated with the sub component's renderer (because that's where the animation
14794 * triggers are defined).
14795 *
14796 * Do not use this instruction as a replacement for `elementProperty`. This instruction
14797 * only exists to ensure compatibility with the ViewEngine's host binding behavior.
14798 *
14799 * @param index The index of the element to update in the data array
14800 * @param propName Name of property. Because it is going to DOM, this is not subject to
14801 * renaming as part of minification.
14802 * @param value New value to write.
14803 * @param sanitizer An optional function used to sanitize the value.
14804 *
14805 * @codeGenApi
14806 */
14807export declare function ɵɵsyntheticHostProperty<T>(propName: string, value: T | ɵNO_CHANGE, sanitizer?: SanitizerFn | null): typeof ɵɵsyntheticHostProperty;
14808
14809/**
14810 * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
14811 *
14812 * <ng-template #foo>
14813 * <div></div>
14814 * </ng-template>
14815 *
14816 * @param index The index of the container in the data array
14817 * @param templateFn Inline template
14818 * @param decls The number of nodes, local refs, and pipes for this template
14819 * @param vars The number of bindings for this template
14820 * @param tagName The name of the container element, if applicable
14821 * @param attrsIndex Index of template attributes in the `consts` array.
14822 * @param localRefs Index of the local references in the `consts` array.
14823 * @param localRefExtractor A function which extracts local-refs values from the template.
14824 * Defaults to the current element associated with the local-ref.
14825 *
14826 * @codeGenApi
14827 */
14828export 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;
14829
14830/**
14831 * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the
14832 * `<ng-template>` element.
14833 *
14834 * @codeGenApi
14835 */
14836export declare function ɵɵtemplateRefExtractor(tNode: TNode, lView: LView): TemplateRef<any> | null;
14837
14838/**
14839 * Create static text node
14840 *
14841 * @param index Index of the node in the data array
14842 * @param value Static string value to write.
14843 *
14844 * @codeGenApi
14845 */
14846export declare function ɵɵtext(index: number, value?: string): void;
14847
14848/**
14849 *
14850 * Update text content with a lone bound value
14851 *
14852 * Used when a text node has 1 interpolated value in it, an no additional text
14853 * surrounds that interpolated value:
14854 *
14855 * ```html
14856 * <div>{{v0}}</div>
14857 * ```
14858 *
14859 * Its compiled representation is:
14860 *
14861 * ```ts
14862 * ɵɵtextInterpolate(v0);
14863 * ```
14864 * @returns itself, so that it may be chained.
14865 * @see textInterpolateV
14866 * @codeGenApi
14867 */
14868export declare function ɵɵtextInterpolate(v0: any): typeof ɵɵtextInterpolate;
14869
14870/**
14871 *
14872 * Update text content with single bound value surrounded by other text.
14873 *
14874 * Used when a text node has 1 interpolated value in it:
14875 *
14876 * ```html
14877 * <div>prefix{{v0}}suffix</div>
14878 * ```
14879 *
14880 * Its compiled representation is:
14881 *
14882 * ```ts
14883 * ɵɵtextInterpolate1('prefix', v0, 'suffix');
14884 * ```
14885 * @returns itself, so that it may be chained.
14886 * @see textInterpolateV
14887 * @codeGenApi
14888 */
14889export declare function ɵɵtextInterpolate1(prefix: string, v0: any, suffix: string): typeof ɵɵtextInterpolate1;
14890
14891/**
14892 *
14893 * Update text content with 2 bound values surrounded by other text.
14894 *
14895 * Used when a text node has 2 interpolated values in it:
14896 *
14897 * ```html
14898 * <div>prefix{{v0}}-{{v1}}suffix</div>
14899 * ```
14900 *
14901 * Its compiled representation is:
14902 *
14903 * ```ts
14904 * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');
14905 * ```
14906 * @returns itself, so that it may be chained.
14907 * @see textInterpolateV
14908 * @codeGenApi
14909 */
14910export declare function ɵɵtextInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): typeof ɵɵtextInterpolate2;
14911
14912/**
14913 *
14914 * Update text content with 3 bound values surrounded by other text.
14915 *
14916 * Used when a text node has 3 interpolated values in it:
14917 *
14918 * ```html
14919 * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>
14920 * ```
14921 *
14922 * Its compiled representation is:
14923 *
14924 * ```ts
14925 * ɵɵtextInterpolate3(
14926 * 'prefix', v0, '-', v1, '-', v2, 'suffix');
14927 * ```
14928 * @returns itself, so that it may be chained.
14929 * @see textInterpolateV
14930 * @codeGenApi
14931 */
14932export declare function ɵɵtextInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): typeof ɵɵtextInterpolate3;
14933
14934/**
14935 *
14936 * Update text content with 4 bound values surrounded by other text.
14937 *
14938 * Used when a text node has 4 interpolated values in it:
14939 *
14940 * ```html
14941 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>
14942 * ```
14943 *
14944 * Its compiled representation is:
14945 *
14946 * ```ts
14947 * ɵɵtextInterpolate4(
14948 * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
14949 * ```
14950 * @returns itself, so that it may be chained.
14951 * @see ɵɵtextInterpolateV
14952 * @codeGenApi
14953 */
14954export declare function ɵɵtextInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): typeof ɵɵtextInterpolate4;
14955
14956/**
14957 *
14958 * Update text content with 5 bound values surrounded by other text.
14959 *
14960 * Used when a text node has 5 interpolated values in it:
14961 *
14962 * ```html
14963 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>
14964 * ```
14965 *
14966 * Its compiled representation is:
14967 *
14968 * ```ts
14969 * ɵɵtextInterpolate5(
14970 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
14971 * ```
14972 * @returns itself, so that it may be chained.
14973 * @see textInterpolateV
14974 * @codeGenApi
14975 */
14976export 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;
14977
14978/**
14979 *
14980 * Update text content with 6 bound values surrounded by other text.
14981 *
14982 * Used when a text node has 6 interpolated values in it:
14983 *
14984 * ```html
14985 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>
14986 * ```
14987 *
14988 * Its compiled representation is:
14989 *
14990 * ```ts
14991 * ɵɵtextInterpolate6(
14992 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
14993 * ```
14994 *
14995 * @param i4 Static value used for concatenation only.
14996 * @param v5 Value checked for change. @returns itself, so that it may be chained.
14997 * @see textInterpolateV
14998 * @codeGenApi
14999 */
15000export 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;
15001
15002/**
15003 *
15004 * Update text content with 7 bound values surrounded by other text.
15005 *
15006 * Used when a text node has 7 interpolated values in it:
15007 *
15008 * ```html
15009 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>
15010 * ```
15011 *
15012 * Its compiled representation is:
15013 *
15014 * ```ts
15015 * ɵɵtextInterpolate7(
15016 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
15017 * ```
15018 * @returns itself, so that it may be chained.
15019 * @see textInterpolateV
15020 * @codeGenApi
15021 */
15022export 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;
15023
15024/**
15025 *
15026 * Update text content with 8 bound values surrounded by other text.
15027 *
15028 * Used when a text node has 8 interpolated values in it:
15029 *
15030 * ```html
15031 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>
15032 * ```
15033 *
15034 * Its compiled representation is:
15035 *
15036 * ```ts
15037 * ɵɵtextInterpolate8(
15038 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
15039 * ```
15040 * @returns itself, so that it may be chained.
15041 * @see textInterpolateV
15042 * @codeGenApi
15043 */
15044export 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;
15045
15046/**
15047 * Update text content with 9 or more bound values other surrounded by text.
15048 *
15049 * Used when the number of interpolated values exceeds 8.
15050 *
15051 * ```html
15052 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>
15053 * ```
15054 *
15055 * Its compiled representation is:
15056 *
15057 * ```ts
15058 * ɵɵtextInterpolateV(
15059 * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
15060 * 'suffix']);
15061 * ```
15062 *.
15063 * @param values The collection of values and the strings in between those values, beginning with
15064 * a string prefix and ending with a string suffix.
15065 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
15066 *
15067 * @returns itself, so that it may be chained.
15068 * @codeGenApi
15069 */
15070export declare function ɵɵtextInterpolateV(values: any[]): typeof ɵɵtextInterpolateV;
15071
15072/**
15073 * A template tag function for promoting the associated constant literal to a
15074 * TrustedHTML. Interpolation is explicitly not allowed.
15075 *
15076 * @param html constant template literal containing trusted HTML.
15077 * @returns TrustedHTML wrapping `html`.
15078 *
15079 * @security This is a security-sensitive function and should only be used to
15080 * convert constant values of attributes and properties found in
15081 * application-provided Angular templates to TrustedHTML.
15082 *
15083 * @codeGenApi
15084 */
15085export declare function ɵɵtrustConstantHtml(html: TemplateStringsArray): TrustedHTML | string;
15086
15087/**
15088 * A template tag function for promoting the associated constant literal to a
15089 * TrustedScriptURL. Interpolation is explicitly not allowed.
15090 *
15091 * @param url constant template literal containing a trusted script URL.
15092 * @returns TrustedScriptURL wrapping `url`.
15093 *
15094 * @security This is a security-sensitive function and should only be used to
15095 * convert constant values of attributes and properties found in
15096 * application-provided Angular templates to TrustedScriptURL.
15097 *
15098 * @codeGenApi
15099 */
15100export declare function ɵɵtrustConstantResourceUrl(url: TemplateStringsArray): TrustedScriptURL | string;
15101
15102/**
15103 * Creates new QueryList, stores the reference in LView and returns QueryList.
15104 *
15105 * @param predicate The type for which the query will search
15106 * @param flags Flags associated with the query
15107 * @param read What to save in the query
15108 *
15109 * @codeGenApi
15110 */
15111export declare function ɵɵviewQuery<T>(predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): void;
15112
15113export { }
15114
\No newline at end of file