UNPKG

534 kBTypeScriptView Raw
1/**
2 * @license Angular v15.1.3
3 * (c) 2010-2022 Google LLC. https://angular.io/
4 * License: MIT
5 */
6
7
8import { Observable } from 'rxjs';
9import { Subject } from 'rxjs';
10import { Subscribable } from 'rxjs';
11import { Subscription } from 'rxjs';
12
13/**
14 * @description
15 *
16 * Represents an abstract class `T`, if applied to a concrete class it would stop being
17 * instantiable.
18 *
19 * @publicApi
20 */
21export declare interface AbstractType<T> extends Function {
22 prototype: T;
23}
24
25/**
26 * @description
27 * A lifecycle hook that is called after the default change detector has
28 * completed checking all content of a directive.
29 *
30 * @see `AfterViewChecked`
31 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
32 *
33 * @usageNotes
34 * The following snippet shows how a component can implement this interface to
35 * define its own after-check functionality.
36 *
37 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentChecked'}
38 *
39 * @publicApi
40 */
41export declare interface AfterContentChecked {
42 /**
43 * A callback method that is invoked immediately after the
44 * default change detector has completed checking all of the directive's
45 * content.
46 */
47 ngAfterContentChecked(): void;
48}
49
50/**
51 * @description
52 * A lifecycle hook that is called after Angular has fully initialized
53 * all content of a directive.
54 * Define an `ngAfterContentInit()` method to handle any additional initialization tasks.
55 *
56 * @see `OnInit`
57 * @see `AfterViewInit`
58 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
59 *
60 * @usageNotes
61 * The following snippet shows how a component can implement this interface to
62 * define its own content initialization method.
63 *
64 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentInit'}
65 *
66 * @publicApi
67 */
68export declare interface AfterContentInit {
69 /**
70 * A callback method that is invoked immediately after
71 * Angular has completed initialization of all of the directive's
72 * content.
73 * It is invoked only once when the directive is instantiated.
74 */
75 ngAfterContentInit(): void;
76}
77
78/**
79 * @description
80 * A lifecycle hook that is called after the default change detector has
81 * completed checking a component's view for changes.
82 *
83 * @see `AfterContentChecked`
84 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
85 *
86 * @usageNotes
87 * The following snippet shows how a component can implement this interface to
88 * define its own after-check functionality.
89 *
90 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewChecked'}
91 *
92 * @publicApi
93 */
94export declare interface AfterViewChecked {
95 /**
96 * A callback method that is invoked immediately after the
97 * default change detector has completed one change-check cycle
98 * for a component's view.
99 */
100 ngAfterViewChecked(): void;
101}
102
103/**
104 * @description
105 * A lifecycle hook that is called after Angular has fully initialized
106 * a component's view.
107 * Define an `ngAfterViewInit()` method to handle any additional initialization tasks.
108 *
109 * @see `OnInit`
110 * @see `AfterContentInit`
111 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
112 *
113 * @usageNotes
114 * The following snippet shows how a component can implement this interface to
115 * define its own view initialization method.
116 *
117 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewInit'}
118 *
119 * @publicApi
120 */
121export declare interface AfterViewInit {
122 /**
123 * A callback method that is invoked immediately after
124 * Angular has completed initialization of a component's view.
125 * It is invoked only once when the view is instantiated.
126 *
127 */
128 ngAfterViewInit(): void;
129}
130
131/**
132 * A DI token that you can use to create a virtual [provider](guide/glossary#provider)
133 * that will populate the `entryComponents` field of components and NgModules
134 * based on its `useValue` property value.
135 * All components that are referenced in the `useValue` value (either directly
136 * or in a nested array or map) are added to the `entryComponents` property.
137 *
138 * @usageNotes
139 *
140 * The following example shows how the router can populate the `entryComponents`
141 * field of an NgModule based on a router configuration that refers
142 * to components.
143 *
144 * ```typescript
145 * // helper function inside the router
146 * function provideRoutes(routes) {
147 * return [
148 * {provide: ROUTES, useValue: routes},
149 * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}
150 * ];
151 * }
152 *
153 * // user code
154 * let routes = [
155 * {path: '/root', component: RootComp},
156 * {path: '/teams', component: TeamsComp}
157 * ];
158 *
159 * @NgModule({
160 * providers: [provideRoutes(routes)]
161 * })
162 * class ModuleWithRoutes {}
163 * ```
164 *
165 * @publicApi
166 * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.
167 */
168export declare const ANALYZE_FOR_ENTRY_COMPONENTS: InjectionToken<any>;
169
170/**
171 * A [DI token](guide/glossary#di-token "DI token definition") that indicates which animations
172 * module has been loaded.
173 * @publicApi
174 */
175export declare const ANIMATION_MODULE_TYPE: InjectionToken<"NoopAnimations" | "BrowserAnimations">;
176
177/**
178 * A [DI token](guide/glossary#di-token "DI token definition") that provides a set of callbacks to
179 * be called for every component that is bootstrapped.
180 *
181 * Each callback must take a `ComponentRef` instance and return nothing.
182 *
183 * `(componentRef: ComponentRef) => void`
184 *
185 * @publicApi
186 */
187export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<((compRef: ComponentRef<any>) => void)[]>;
188
189/**
190 * A [DI token](guide/glossary#di-token "DI token definition") representing a unique string ID, used
191 * primarily for prefixing application attributes and CSS styles when
192 * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.
193 *
194 * BY default, the value is randomly generated and assigned to the application by Angular.
195 * To provide a custom ID value, use a DI provider <!-- TODO: provider --> to configure
196 * the root {@link Injector} that uses this token.
197 *
198 * @publicApi
199 */
200export declare const APP_ID: InjectionToken<string>;
201
202/**
203 * A [DI token](guide/glossary#di-token "DI token definition") that you can use to provide
204 * one or more initialization functions.
205 *
206 * The provided functions are injected at application startup and executed during
207 * app initialization. If any of these functions returns a Promise or an Observable, initialization
208 * does not complete until the Promise is resolved or the Observable is completed.
209 *
210 * You can, for example, create a factory function that loads language data
211 * or an external configuration, and provide that function to the `APP_INITIALIZER` token.
212 * The function is executed during the application bootstrap process,
213 * and the needed data is available on startup.
214 *
215 * @see `ApplicationInitStatus`
216 *
217 * @usageNotes
218 *
219 * The following example illustrates how to configure a multi-provider using `APP_INITIALIZER` token
220 * and a function returning a promise.
221 *
222 * ```
223 * function initializeApp(): Promise<any> {
224 * return new Promise((resolve, reject) => {
225 * // Do some asynchronous stuff
226 * resolve();
227 * });
228 * }
229 *
230 * @NgModule({
231 * imports: [BrowserModule],
232 * declarations: [AppComponent],
233 * bootstrap: [AppComponent],
234 * providers: [{
235 * provide: APP_INITIALIZER,
236 * useFactory: () => initializeApp,
237 * multi: true
238 * }]
239 * })
240 * export class AppModule {}
241 * ```
242 *
243 * It's also possible to configure a multi-provider using `APP_INITIALIZER` token and a function
244 * returning an observable, see an example below. Note: the `HttpClient` in this example is used for
245 * demo purposes to illustrate how the factory function can work with other providers available
246 * through DI.
247 *
248 * ```
249 * function initializeAppFactory(httpClient: HttpClient): () => Observable<any> {
250 * return () => httpClient.get("https://someUrl.com/api/user")
251 * .pipe(
252 * tap(user => { ... })
253 * );
254 * }
255 *
256 * @NgModule({
257 * imports: [BrowserModule, HttpClientModule],
258 * declarations: [AppComponent],
259 * bootstrap: [AppComponent],
260 * providers: [{
261 * provide: APP_INITIALIZER,
262 * useFactory: initializeAppFactory,
263 * deps: [HttpClient],
264 * multi: true
265 * }]
266 * })
267 * export class AppModule {}
268 * ```
269 *
270 * @publicApi
271 */
272export declare const APP_INITIALIZER: InjectionToken<readonly (() => Observable<unknown> | Promise<unknown> | void)[]>;
273
274declare function _appIdRandomProviderFactory(): string;
275
276/**
277 * A class that reflects the state of running {@link APP_INITIALIZER} functions.
278 *
279 * @publicApi
280 */
281export declare class ApplicationInitStatus {
282 private readonly appInits;
283 private resolve;
284 private reject;
285 private initialized;
286 readonly donePromise: Promise<any>;
287 readonly done = false;
288 constructor(appInits: ReadonlyArray<() => Observable<unknown> | Promise<unknown> | void>);
289 static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationInitStatus, [{ optional: true; }]>;
290 static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationInitStatus>;
291}
292
293/**
294 * Re-exported by `BrowserModule`, which is included automatically in the root
295 * `AppModule` when you create a new app with the CLI `new` command. Eagerly injects
296 * `ApplicationRef` to instantiate it.
297 *
298 * @publicApi
299 */
300export declare class ApplicationModule {
301 constructor(appRef: ApplicationRef);
302 static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationModule, never>;
303 static ɵmod: i0.ɵɵNgModuleDeclaration<ApplicationModule, never, never, never>;
304 static ɵinj: i0.ɵɵInjectorDeclaration<ApplicationModule>;
305}
306
307/**
308 * A reference to an Angular application running on a page.
309 *
310 * @usageNotes
311 *
312 * {@a is-stable-examples}
313 * ### isStable examples and caveats
314 *
315 * Note two important points about `isStable`, demonstrated in the examples below:
316 * - the application will never be stable if you start any kind
317 * of recurrent asynchronous task when the application starts
318 * (for example for a polling process, started with a `setInterval`, a `setTimeout`
319 * or using RxJS operators like `interval`);
320 * - the `isStable` Observable runs outside of the Angular zone.
321 *
322 * Let's imagine that you start a recurrent task
323 * (here incrementing a counter, using RxJS `interval`),
324 * and at the same time subscribe to `isStable`.
325 *
326 * ```
327 * constructor(appRef: ApplicationRef) {
328 * appRef.isStable.pipe(
329 * filter(stable => stable)
330 * ).subscribe(() => console.log('App is stable now');
331 * interval(1000).subscribe(counter => console.log(counter));
332 * }
333 * ```
334 * In this example, `isStable` will never emit `true`,
335 * and the trace "App is stable now" will never get logged.
336 *
337 * If you want to execute something when the app is stable,
338 * you have to wait for the application to be stable
339 * before starting your polling process.
340 *
341 * ```
342 * constructor(appRef: ApplicationRef) {
343 * appRef.isStable.pipe(
344 * first(stable => stable),
345 * tap(stable => console.log('App is stable now')),
346 * switchMap(() => interval(1000))
347 * ).subscribe(counter => console.log(counter));
348 * }
349 * ```
350 * In this example, the trace "App is stable now" will be logged
351 * and then the counter starts incrementing every second.
352 *
353 * Note also that this Observable runs outside of the Angular zone,
354 * which means that the code in the subscription
355 * to this Observable will not trigger the change detection.
356 *
357 * Let's imagine that instead of logging the counter value,
358 * you update a field of your component
359 * and display it in its template.
360 *
361 * ```
362 * constructor(appRef: ApplicationRef) {
363 * appRef.isStable.pipe(
364 * first(stable => stable),
365 * switchMap(() => interval(1000))
366 * ).subscribe(counter => this.value = counter);
367 * }
368 * ```
369 * As the `isStable` Observable runs outside the zone,
370 * the `value` field will be updated properly,
371 * but the template will not be refreshed!
372 *
373 * You'll have to manually trigger the change detection to update the template.
374 *
375 * ```
376 * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {
377 * appRef.isStable.pipe(
378 * first(stable => stable),
379 * switchMap(() => interval(1000))
380 * ).subscribe(counter => {
381 * this.value = counter;
382 * cd.detectChanges();
383 * });
384 * }
385 * ```
386 *
387 * Or make the subscription callback run inside the zone.
388 *
389 * ```
390 * constructor(appRef: ApplicationRef, zone: NgZone) {
391 * appRef.isStable.pipe(
392 * first(stable => stable),
393 * switchMap(() => interval(1000))
394 * ).subscribe(counter => zone.run(() => this.value = counter));
395 * }
396 * ```
397 *
398 * @publicApi
399 */
400export declare class ApplicationRef {
401 private _zone;
402 private _injector;
403 private _exceptionHandler;
404 private _views;
405 private _runningTick;
406 private _stable;
407 private _onMicrotaskEmptySubscription;
408 private _destroyed;
409 private _destroyListeners;
410 /**
411 * Indicates whether this instance was destroyed.
412 */
413 get destroyed(): boolean;
414 /**
415 * Get a list of component types registered to this application.
416 * This list is populated even before the component is created.
417 */
418 readonly componentTypes: Type<any>[];
419 /**
420 * Get a list of components registered to this application.
421 */
422 readonly components: ComponentRef<any>[];
423 /**
424 * Returns an Observable that indicates when the application is stable or unstable.
425 *
426 * @see [Usage notes](#is-stable-examples) for examples and caveats when using this API.
427 */
428 readonly isStable: Observable<boolean>;
429 /**
430 * The `EnvironmentInjector` used to create this application.
431 */
432 get injector(): EnvironmentInjector;
433 /**
434 * Bootstrap a component onto the element identified by its selector or, optionally, to a
435 * specified element.
436 *
437 * @usageNotes
438 * ### Bootstrap process
439 *
440 * When bootstrapping a component, Angular mounts it onto a target DOM element
441 * and kicks off automatic change detection. The target DOM element can be
442 * provided using the `rootSelectorOrNode` argument.
443 *
444 * If the target DOM element is not provided, Angular tries to find one on a page
445 * using the `selector` of the component that is being bootstrapped
446 * (first matched element is used).
447 *
448 * ### Example
449 *
450 * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
451 * but it requires us to know the component while writing the application code.
452 *
453 * Imagine a situation where we have to wait for an API call to decide about the component to
454 * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
455 * dynamically bootstrap a component.
456 *
457 * {@example core/ts/platform/platform.ts region='componentSelector'}
458 *
459 * Optionally, a component can be mounted onto a DOM element that does not match the
460 * selector of the bootstrapped component.
461 *
462 * In the following example, we are providing a CSS selector to match the target element.
463 *
464 * {@example core/ts/platform/platform.ts region='cssSelector'}
465 *
466 * While in this example, we are providing reference to a DOM node.
467 *
468 * {@example core/ts/platform/platform.ts region='domNode'}
469 */
470 bootstrap<C>(component: Type<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
471 /**
472 * Bootstrap a component onto the element identified by its selector or, optionally, to a
473 * specified element.
474 *
475 * @usageNotes
476 * ### Bootstrap process
477 *
478 * When bootstrapping a component, Angular mounts it onto a target DOM element
479 * and kicks off automatic change detection. The target DOM element can be
480 * provided using the `rootSelectorOrNode` argument.
481 *
482 * If the target DOM element is not provided, Angular tries to find one on a page
483 * using the `selector` of the component that is being bootstrapped
484 * (first matched element is used).
485 *
486 * ### Example
487 *
488 * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,
489 * but it requires us to know the component while writing the application code.
490 *
491 * Imagine a situation where we have to wait for an API call to decide about the component to
492 * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to
493 * dynamically bootstrap a component.
494 *
495 * {@example core/ts/platform/platform.ts region='componentSelector'}
496 *
497 * Optionally, a component can be mounted onto a DOM element that does not match the
498 * selector of the bootstrapped component.
499 *
500 * In the following example, we are providing a CSS selector to match the target element.
501 *
502 * {@example core/ts/platform/platform.ts region='cssSelector'}
503 *
504 * While in this example, we are providing reference to a DOM node.
505 *
506 * {@example core/ts/platform/platform.ts region='domNode'}
507 *
508 * @deprecated Passing Component factories as the `Application.bootstrap` function argument is
509 * deprecated. Pass Component Types instead.
510 */
511 bootstrap<C>(componentFactory: ComponentFactory<C>, rootSelectorOrNode?: string | any): ComponentRef<C>;
512 /**
513 * Invoke this method to explicitly process change detection and its side-effects.
514 *
515 * In development mode, `tick()` also performs a second change detection cycle to ensure that no
516 * further changes are detected. If additional changes are picked up during this second cycle,
517 * bindings in the app have side-effects that cannot be resolved in a single change detection
518 * pass.
519 * In this case, Angular throws an error, since an Angular application can only have one change
520 * detection pass during which all change detection must complete.
521 */
522 tick(): void;
523 /**
524 * Attaches a view so that it will be dirty checked.
525 * The view will be automatically detached when it is destroyed.
526 * This will throw if the view is already attached to a ViewContainer.
527 */
528 attachView(viewRef: ViewRef): void;
529 /**
530 * Detaches a view from dirty checking again.
531 */
532 detachView(viewRef: ViewRef): void;
533 private _loadComponent;
534 /**
535 * Destroys an Angular application represented by this `ApplicationRef`. Calling this function
536 * will destroy the associated environment injectors as well as all the bootstrapped components
537 * with their views.
538 */
539 destroy(): void;
540 /**
541 * Returns the number of attached views.
542 */
543 get viewCount(): number;
544 private warnIfDestroyed;
545 static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationRef, never>;
546 static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationRef>;
547}
548
549/**
550 * @publicApi
551 */
552export declare function asNativeElements(debugEls: DebugElement[]): any;
553
554/**
555 * Checks that there is currently a platform that contains the given token as a provider.
556 *
557 * @publicApi
558 */
559export declare function assertPlatform(requiredToken: any): PlatformRef;
560
561/**
562 * Type of the Attribute metadata.
563 *
564 * @publicApi
565 */
566export declare interface Attribute {
567 /**
568 * The name of the attribute whose value can be injected.
569 */
570 attributeName: string;
571}
572
573/**
574 * Attribute decorator and metadata.
575 *
576 * @Annotation
577 * @publicApi
578 */
579export declare const Attribute: AttributeDecorator;
580
581
582/**
583 * Type of the Attribute decorator / constructor function.
584 *
585 * @publicApi
586 */
587export declare interface AttributeDecorator {
588 /**
589 * Parameter decorator for a directive constructor that designates
590 * a host-element attribute whose value is injected as a constant string literal.
591 *
592 * @usageNotes
593 *
594 * Suppose we have an `<input>` element and want to know its `type`.
595 *
596 * ```html
597 * <input type="text">
598 * ```
599 *
600 * The following example uses the decorator to inject the string literal `text` in a directive.
601 *
602 * {@example core/ts/metadata/metadata.ts region='attributeMetadata'}
603 *
604 * The following example uses the decorator in a component constructor.
605 *
606 * {@example core/ts/metadata/metadata.ts region='attributeFactory'}
607 *
608 */
609 (name: string): any;
610 new (name: string): Attribute;
611}
612
613/**
614 * Provides additional options to the bootstrapping process.
615 *
616 * @publicApi
617 */
618export declare interface BootstrapOptions {
619 /**
620 * Optionally specify which `NgZone` should be used.
621 *
622 * - Provide your own `NgZone` instance.
623 * - `zone.js` - Use default `NgZone` which requires `Zone.js`.
624 * - `noop` - Use `NoopNgZone` which does nothing.
625 */
626 ngZone?: NgZone | 'zone.js' | 'noop';
627 /**
628 * Optionally specify coalescing event change detections or not.
629 * Consider the following case.
630 *
631 * ```
632 * <div (click)="doSomething()">
633 * <button (click)="doSomethingElse()"></button>
634 * </div>
635 * ```
636 *
637 * When button is clicked, because of the event bubbling, both
638 * event handlers will be called and 2 change detections will be
639 * triggered. We can coalesce such kind of events to only trigger
640 * change detection only once.
641 *
642 * By default, this option will be false. So the events will not be
643 * coalesced and the change detection will be triggered multiple times.
644 * And if this option be set to true, the change detection will be
645 * triggered async by scheduling a animation frame. So in the case above,
646 * the change detection will only be triggered once.
647 */
648 ngZoneEventCoalescing?: boolean;
649 /**
650 * Optionally specify if `NgZone#run()` method invocations should be coalesced
651 * into a single change detection.
652 *
653 * Consider the following case.
654 * ```
655 * for (let i = 0; i < 10; i ++) {
656 * ngZone.run(() => {
657 * // do something
658 * });
659 * }
660 * ```
661 *
662 * This case triggers the change detection multiple times.
663 * With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.
664 * In addition, the change detection executes in requestAnimation.
665 *
666 */
667 ngZoneRunCoalescing?: boolean;
668}
669
670
671/**
672 * The strategy that the default change detector uses to detect changes.
673 * When set, takes effect the next time change detection is triggered.
674 *
675 * @see {@link ChangeDetectorRef#usage-notes Change detection usage}
676 *
677 * @publicApi
678 */
679export declare enum ChangeDetectionStrategy {
680 /**
681 * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated
682 * until reactivated by setting the strategy to `Default` (`CheckAlways`).
683 * Change detection can still be explicitly invoked.
684 * This strategy applies to all child directives and cannot be overridden.
685 */
686 OnPush = 0,
687 /**
688 * Use the default `CheckAlways` strategy, in which change detection is automatic until
689 * explicitly deactivated.
690 */
691 Default = 1
692}
693
694declare type ChangeDetectionStrategy_2 = number;
695
696/**
697 * Base class that provides change detection functionality.
698 * A change-detection tree collects all views that are to be checked for changes.
699 * Use the methods to add and remove views from the tree, initiate change-detection,
700 * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.
701 *
702 * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks)
703 * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection)
704 *
705 * @usageNotes
706 *
707 * The following examples demonstrate how to modify default change-detection behavior
708 * to perform explicit detection when needed.
709 *
710 * ### Use `markForCheck()` with `CheckOnce` strategy
711 *
712 * The following example sets the `OnPush` change-detection strategy for a component
713 * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check
714 * after an interval. See [live demo](https://plnkr.co/edit/GC512b?p=preview).
715 *
716 * <code-example path="core/ts/change_detect/change-detection.ts"
717 * region="mark-for-check"></code-example>
718 *
719 * ### Detach change detector to limit how often check occurs
720 *
721 * The following example defines a component with a large list of read-only data
722 * that is expected to change constantly, many times per second.
723 * To improve performance, we want to check and update the list
724 * less often than the changes actually occur. To do that, we detach
725 * the component's change detector and perform an explicit local check every five seconds.
726 *
727 * <code-example path="core/ts/change_detect/change-detection.ts" region="detach"></code-example>
728 *
729 *
730 * ### Reattaching a detached component
731 *
732 * The following example creates a component displaying live data.
733 * The component detaches its change detector from the main change detector tree
734 * when the `live` property is set to false, and reattaches it when the property
735 * becomes true.
736 *
737 * <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example>
738 *
739 * @publicApi
740 */
741export declare abstract class ChangeDetectorRef {
742 /**
743 * When a view uses the {@link ChangeDetectionStrategy#OnPush OnPush} (checkOnce)
744 * change detection strategy, explicitly marks the view as changed so that
745 * it can be checked again.
746 *
747 * Components are normally marked as dirty (in need of rerendering) when inputs
748 * have changed or events have fired in the view. Call this method to ensure that
749 * a component is checked even if these triggers have not occurred.
750 *
751 * <!-- TODO: Add a link to a chapter on OnPush components -->
752 *
753 */
754 abstract markForCheck(): void;
755 /**
756 * Detaches this view from the change-detection tree.
757 * A detached view is not checked until it is reattached.
758 * Use in combination with `detectChanges()` to implement local change detection checks.
759 *
760 * Detached views are not checked during change detection runs until they are
761 * re-attached, even if they are marked as dirty.
762 *
763 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
764 * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
765 *
766 */
767 abstract detach(): void;
768 /**
769 * Checks this view and its children. Use in combination with {@link ChangeDetectorRef#detach
770 * detach}
771 * to implement local change detection checks.
772 *
773 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
774 * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
775 *
776 */
777 abstract detectChanges(): void;
778 /**
779 * Checks the change detector and its children, and throws if any changes are detected.
780 *
781 * Use in development mode to verify that running change detection doesn't introduce
782 * other changes. Calling it in production mode is a noop.
783 */
784 abstract checkNoChanges(): void;
785 /**
786 * Re-attaches the previously detached view to the change detection tree.
787 * Views are attached to the tree by default.
788 *
789 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
790 *
791 */
792 abstract reattach(): void;
793}
794
795declare const CHILD_HEAD = 13;
796
797declare const CHILD_TAIL = 14;
798
799/**
800 * Configures the `Injector` to return an instance of `useClass` for a token.
801 * @see ["Dependency Injection Guide"](guide/dependency-injection).
802 *
803 * @usageNotes
804 *
805 * {@example core/di/ts/provider_spec.ts region='ClassProvider'}
806 *
807 * Note that following two providers are not equal:
808 *
809 * {@example core/di/ts/provider_spec.ts region='ClassProviderDifference'}
810 *
811 * ### Multi-value example
812 *
813 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
814 *
815 * @publicApi
816 */
817export declare interface ClassProvider extends ClassSansProvider {
818 /**
819 * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
820 */
821 provide: any;
822 /**
823 * When true, injector returns an array of instances. This is useful to allow multiple
824 * providers spread across many files to provide configuration information to a common token.
825 */
826 multi?: boolean;
827}
828
829/**
830 * Configures the `Injector` to return a value by invoking a `useClass` function.
831 * Base for `ClassProvider` decorator.
832 *
833 * @see ["Dependency Injection Guide"](guide/dependency-injection).
834 *
835 * @publicApi
836 */
837export declare interface ClassSansProvider {
838 /**
839 * Class to instantiate for the `token`.
840 */
841 useClass: Type<any>;
842}
843
844declare const CLEANUP = 7;
845
846/**
847 * Low-level service for running the angular compiler during runtime
848 * to create {@link ComponentFactory}s, which
849 * can later be used to create and render a Component instance.
850 *
851 * Each `@NgModule` provides an own `Compiler` to its injector,
852 * that will use the directives/pipes of the ng module for compilation
853 * of components.
854 *
855 * @publicApi
856 *
857 * @deprecated
858 * Ivy JIT mode doesn't require accessing this symbol.
859 * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for
860 * additional context.
861 */
862export declare class Compiler {
863 /**
864 * Compiles the given NgModule and all of its components. All templates of the components listed
865 * in `entryComponents` have to be inlined.
866 */
867 compileModuleSync<T>(moduleType: Type<T>): NgModuleFactory<T>;
868 /**
869 * Compiles the given NgModule and all of its components
870 */
871 compileModuleAsync<T>(moduleType: Type<T>): Promise<NgModuleFactory<T>>;
872 /**
873 * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.
874 */
875 compileModuleAndAllComponentsSync<T>(moduleType: Type<T>): ModuleWithComponentFactories<T>;
876 /**
877 * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.
878 */
879 compileModuleAndAllComponentsAsync<T>(moduleType: Type<T>): Promise<ModuleWithComponentFactories<T>>;
880 /**
881 * Clears all caches.
882 */
883 clearCache(): void;
884 /**
885 * Clears the cache for the given component/ngModule.
886 */
887 clearCacheFor(type: Type<any>): void;
888 /**
889 * Returns the id for a given NgModule, if one is defined and known to the compiler.
890 */
891 getModuleId(moduleType: Type<any>): string | undefined;
892 static ɵfac: i0.ɵɵFactoryDeclaration<Compiler, never>;
893 static ɵprov: i0.ɵɵInjectableDeclaration<Compiler>;
894}
895
896/**
897 * Token to provide CompilerOptions in the platform injector.
898 *
899 * @publicApi
900 */
901export declare const COMPILER_OPTIONS: InjectionToken<CompilerOptions[]>;
902
903/**
904 * A factory for creating a Compiler
905 *
906 * @publicApi
907 *
908 * @deprecated
909 * Ivy JIT mode doesn't require accessing this symbol.
910 * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for
911 * additional context.
912 */
913export declare abstract class CompilerFactory {
914 abstract createCompiler(options?: CompilerOptions[]): Compiler;
915}
916
917/**
918 * Options for creating a compiler.
919 *
920 * Note: the `useJit` and `missingTranslation` config options are not used in Ivy, passing them has
921 * no effect. Those config options are deprecated since v13.
922 *
923 * @publicApi
924 */
925export declare type CompilerOptions = {
926 /**
927 * @deprecated not used at all in Ivy, providing this config option has no effect.
928 */
929 useJit?: boolean;
930 defaultEncapsulation?: ViewEncapsulation;
931 providers?: StaticProvider[];
932 /**
933 * @deprecated not used at all in Ivy, providing this config option has no effect.
934 */
935 missingTranslation?: MissingTranslationStrategy;
936 preserveWhitespaces?: boolean;
937};
938
939/**
940 * Supplies configuration metadata for an Angular component.
941 *
942 * @publicApi
943 */
944export declare interface Component extends Directive {
945 /**
946 * The change-detection strategy to use for this component.
947 *
948 * When a component is instantiated, Angular creates a change detector,
949 * which is responsible for propagating the component's bindings.
950 * The strategy is one of:
951 * - `ChangeDetectionStrategy#OnPush` sets the strategy to `CheckOnce` (on demand).
952 * - `ChangeDetectionStrategy#Default` sets the strategy to `CheckAlways`.
953 */
954 changeDetection?: ChangeDetectionStrategy;
955 /**
956 * Defines the set of injectable objects that are visible to its view DOM children.
957 * See [example](#injecting-a-class-with-a-view-provider).
958 *
959 */
960 viewProviders?: Provider[];
961 /**
962 * The module ID of the module that contains the component.
963 * The component must be able to resolve relative URLs for templates and styles.
964 * SystemJS exposes the `__moduleName` variable within each module.
965 * In CommonJS, this can be set to `module.id`.
966 *
967 */
968 moduleId?: string;
969 /**
970 * The relative path or absolute URL of a template file for an Angular component.
971 * If provided, do not supply an inline template using `template`.
972 *
973 */
974 templateUrl?: string;
975 /**
976 * An inline template for an Angular component. If provided,
977 * do not supply a template file using `templateUrl`.
978 *
979 */
980 template?: string;
981 /**
982 * One or more relative paths or absolute URLs for files containing CSS stylesheets to use
983 * in this component.
984 */
985 styleUrls?: string[];
986 /**
987 * One or more inline CSS stylesheets to use
988 * in this component.
989 */
990 styles?: string[];
991 /**
992 * One or more animation `trigger()` calls, containing
993 * [`state()`](api/animations/state) and `transition()` definitions.
994 * See the [Animations guide](/guide/animations) and animations API documentation.
995 *
996 */
997 animations?: any[];
998 /**
999 * An encapsulation policy for the component's styling.
1000 * Possible values:
1001 * - `ViewEncapsulation.Emulated`: Apply modified component styles in order to emulate
1002 * a native Shadow DOM CSS encapsulation behavior.
1003 * - `ViewEncapsulation.None`: Apply component styles globally without any sort of encapsulation.
1004 * - `ViewEncapsulation.ShadowDom`: Use the browser's native Shadow DOM API to encapsulate styles.
1005 *
1006 * If not supplied, the value is taken from the `CompilerOptions`
1007 * which defaults to `ViewEncapsulation.Emulated`.
1008 *
1009 * If the policy is `ViewEncapsulation.Emulated` and the component has no
1010 * {@link Component#styles styles} nor {@link Component#styleUrls styleUrls},
1011 * the policy is automatically switched to `ViewEncapsulation.None`.
1012 */
1013 encapsulation?: ViewEncapsulation;
1014 /**
1015 * Overrides the default interpolation start and end delimiters (`{{` and `}}`).
1016 */
1017 interpolation?: [string, string];
1018 /**
1019 * A set of components that should be compiled along with
1020 * this component. For each component listed here,
1021 * Angular creates a {@link ComponentFactory} and stores it in the
1022 * {@link ComponentFactoryResolver}.
1023 * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.
1024 */
1025 entryComponents?: Array<Type<any> | any[]>;
1026 /**
1027 * True to preserve or false to remove potentially superfluous whitespace characters
1028 * from the compiled template. Whitespace characters are those matching the `\s`
1029 * character class in JavaScript regular expressions. Default is false, unless
1030 * overridden in compiler options.
1031 */
1032 preserveWhitespaces?: boolean;
1033 /**
1034 * Angular components marked as `standalone` do not need to be declared in an NgModule. Such
1035 * components directly manage their own template dependencies (components, directives, and pipes
1036 * used in a template) via the imports property.
1037 *
1038 * More information about standalone components, directives, and pipes can be found in [this
1039 * guide](guide/standalone-components).
1040 */
1041 standalone?: boolean;
1042 /**
1043 * The imports property specifies the standalone component's template dependencies — those
1044 * directives, components, and pipes that can be used within its template. Standalone components
1045 * can import other standalone components, directives, and pipes as well as existing NgModules.
1046 *
1047 * This property is only available for standalone components - specifying it for components
1048 * declared in an NgModule generates a compilation error.
1049 *
1050 * More information about standalone components, directives, and pipes can be found in [this
1051 * guide](guide/standalone-components).
1052 */
1053 imports?: (Type<any> | ReadonlyArray<any>)[];
1054 /**
1055 * The set of schemas that declare elements to be allowed in a standalone component. Elements and
1056 * properties that are neither Angular components nor directives must be declared in a schema.
1057 *
1058 * This property is only available for standalone components - specifying it for components
1059 * declared in an NgModule generates a compilation error.
1060 *
1061 * More information about standalone components, directives, and pipes can be found in [this
1062 * guide](guide/standalone-components).
1063 */
1064 schemas?: SchemaMetadata[];
1065}
1066
1067/**
1068 * Component decorator and metadata.
1069 *
1070 * @Annotation
1071 * @publicApi
1072 */
1073export declare const Component: ComponentDecorator;
1074
1075/**
1076 * Component decorator interface
1077 *
1078 * @publicApi
1079 */
1080export declare interface ComponentDecorator {
1081 /**
1082 * Decorator that marks a class as an Angular component and provides configuration
1083 * metadata that determines how the component should be processed,
1084 * instantiated, and used at runtime.
1085 *
1086 * Components are the most basic UI building block of an Angular app.
1087 * An Angular app contains a tree of Angular components.
1088 *
1089 * Angular components are a subset of directives, always associated with a template.
1090 * Unlike other directives, only one component can be instantiated for a given element in a
1091 * template.
1092 *
1093 * A component must belong to an NgModule in order for it to be available
1094 * to another component or application. To make it a member of an NgModule,
1095 * list it in the `declarations` field of the `NgModule` metadata.
1096 *
1097 * Note that, in addition to these options for configuring a directive,
1098 * you can control a component's runtime behavior by implementing
1099 * life-cycle hooks. For more information, see the
1100 * [Lifecycle Hooks](guide/lifecycle-hooks) guide.
1101 *
1102 * @usageNotes
1103 *
1104 * ### Setting component inputs
1105 *
1106 * The following example creates a component with two data-bound properties,
1107 * specified by the `inputs` value.
1108 *
1109 * <code-example path="core/ts/metadata/directives.ts" region="component-input"></code-example>
1110 *
1111 *
1112 * ### Setting component outputs
1113 *
1114 * The following example shows two event emitters that emit on an interval. One
1115 * emits an output every second, while the other emits every five seconds.
1116 *
1117 * {@example core/ts/metadata/directives.ts region='component-output-interval'}
1118 *
1119 * ### Injecting a class with a view provider
1120 *
1121 * The following simple example injects a class into a component
1122 * using the view provider specified in component metadata:
1123 *
1124 * ```ts
1125 * class Greeter {
1126 * greet(name:string) {
1127 * return 'Hello ' + name + '!';
1128 * }
1129 * }
1130 *
1131 * @Directive({
1132 * selector: 'needs-greeter'
1133 * })
1134 * class NeedsGreeter {
1135 * greeter:Greeter;
1136 *
1137 * constructor(greeter:Greeter) {
1138 * this.greeter = greeter;
1139 * }
1140 * }
1141 *
1142 * @Component({
1143 * selector: 'greet',
1144 * viewProviders: [
1145 * Greeter
1146 * ],
1147 * template: `<needs-greeter></needs-greeter>`
1148 * })
1149 * class HelloWorld {
1150 * }
1151 *
1152 * ```
1153 *
1154 * ### Preserving whitespace
1155 *
1156 * Removing whitespace can greatly reduce AOT-generated code size and speed up view creation.
1157 * As of Angular 6, the default for `preserveWhitespaces` is false (whitespace is removed).
1158 * To change the default setting for all components in your application, set
1159 * the `preserveWhitespaces` option of the AOT compiler.
1160 *
1161 * By default, the AOT compiler removes whitespace characters as follows:
1162 * * Trims all whitespaces at the beginning and the end of a template.
1163 * * Removes whitespace-only text nodes. For example,
1164 *
1165 * ```html
1166 * <button>Action 1</button> <button>Action 2</button>
1167 * ```
1168 *
1169 * becomes:
1170 *
1171 * ```html
1172 * <button>Action 1</button><button>Action 2</button>
1173 * ```
1174 *
1175 * * Replaces a series of whitespace characters in text nodes with a single space.
1176 * For example, `<span>\n some text\n</span>` becomes `<span> some text </span>`.
1177 * * Does NOT alter text nodes inside HTML tags such as `<pre>` or `<textarea>`,
1178 * where whitespace characters are significant.
1179 *
1180 * Note that these transformations can influence DOM nodes layout, although impact
1181 * should be minimal.
1182 *
1183 * You can override the default behavior to preserve whitespace characters
1184 * in certain fragments of a template. For example, you can exclude an entire
1185 * DOM sub-tree by using the `ngPreserveWhitespaces` attribute:
1186 *
1187 * ```html
1188 * <div ngPreserveWhitespaces>
1189 * whitespaces are preserved here
1190 * <span> and here </span>
1191 * </div>
1192 * ```
1193 *
1194 * You can force a single space to be preserved in a text node by using `&ngsp;`,
1195 * which is replaced with a space character by Angular's template
1196 * compiler:
1197 *
1198 * ```html
1199 * <a>Spaces</a>&ngsp;<a>between</a>&ngsp;<a>links.</a>
1200 * <!-- compiled to be equivalent to:
1201 * <a>Spaces</a> <a>between</a> <a>links.</a> -->
1202 * ```
1203 *
1204 * Note that sequences of `&ngsp;` are still collapsed to just one space character when
1205 * the `preserveWhitespaces` option is set to `false`.
1206 *
1207 * ```html
1208 * <a>before</a>&ngsp;&ngsp;&ngsp;<a>after</a>
1209 * <!-- compiled to be equivalent to:
1210 * <a>before</a> <a>after</a> -->
1211 * ```
1212 *
1213 * To preserve sequences of whitespace characters, use the
1214 * `ngPreserveWhitespaces` attribute.
1215 *
1216 * @Annotation
1217 */
1218 (obj: Component): TypeDecorator;
1219 /**
1220 * See the `Component` decorator.
1221 */
1222 new (obj: Component): Component;
1223}
1224
1225declare interface ComponentDefFeature {
1226 <T>(componentDef: ɵComponentDef<T>): void;
1227 /**
1228 * Marks a feature as something that {@link InheritDefinitionFeature} will execute
1229 * during inheritance.
1230 *
1231 * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers
1232 * identifying the change as a side effect, and the feature will be included in
1233 * every bundle.
1234 */
1235 ngInherit?: true;
1236}
1237
1238/**
1239 * Base class for a factory that can create a component dynamically.
1240 * Instantiate a factory for a given type of component with `resolveComponentFactory()`.
1241 * Use the resulting `ComponentFactory.create()` method to create a component of that type.
1242 *
1243 * @see [Dynamic Components](guide/dynamic-component-loader)
1244 *
1245 * @publicApi
1246 *
1247 * @deprecated Angular no longer requires Component factories. Please use other APIs where
1248 * Component class can be used directly.
1249 */
1250declare abstract class ComponentFactory<C> {
1251 /**
1252 * The component's HTML selector.
1253 */
1254 abstract get selector(): string;
1255 /**
1256 * The type of component the factory will create.
1257 */
1258 abstract get componentType(): Type<any>;
1259 /**
1260 * Selector for all <ng-content> elements in the component.
1261 */
1262 abstract get ngContentSelectors(): string[];
1263 /**
1264 * The inputs of the component.
1265 */
1266 abstract get inputs(): {
1267 propName: string;
1268 templateName: string;
1269 }[];
1270 /**
1271 * The outputs of the component.
1272 */
1273 abstract get outputs(): {
1274 propName: string;
1275 templateName: string;
1276 }[];
1277 /**
1278 * Creates a new component.
1279 */
1280 abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, environmentInjector?: EnvironmentInjector | NgModuleRef<any>): ComponentRef<C>;
1281}
1282export { ComponentFactory }
1283export { ComponentFactory as ɵComponentFactory }
1284
1285/**
1286 * A simple registry that maps `Components` to generated `ComponentFactory` classes
1287 * that can be used to create instances of components.
1288 * Use to obtain the factory for a given component type,
1289 * then use the factory's `create()` method to create a component of that type.
1290 *
1291 * Note: since v13, dynamic component creation via
1292 * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)
1293 * does **not** require resolving component factory: component class can be used directly.
1294 *
1295 * @publicApi
1296 *
1297 * @deprecated Angular no longer requires Component factories. Please use other APIs where
1298 * Component class can be used directly.
1299 */
1300export declare abstract class ComponentFactoryResolver {
1301 static NULL: ComponentFactoryResolver;
1302 /**
1303 * Retrieves the factory object that creates a component of the given type.
1304 * @param component The component type.
1305 */
1306 abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
1307}
1308
1309declare class ComponentFactoryResolver_2 extends ComponentFactoryResolver {
1310 private ngModule?;
1311 /**
1312 * @param ngModule The NgModuleRef to which all resolved factories are bound.
1313 */
1314 constructor(ngModule?: NgModuleRef<any> | undefined);
1315 resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
1316}
1317
1318/**
1319 * An interface that describes the subset of component metadata
1320 * that can be retrieved using the `reflectComponentType` function.
1321 *
1322 * @publicApi
1323 */
1324export declare interface ComponentMirror<C> {
1325 /**
1326 * The component's HTML selector.
1327 */
1328 get selector(): string;
1329 /**
1330 * The type of component the factory will create.
1331 */
1332 get type(): Type<C>;
1333 /**
1334 * The inputs of the component.
1335 */
1336 get inputs(): ReadonlyArray<{
1337 readonly propName: string;
1338 readonly templateName: string;
1339 }>;
1340 /**
1341 * The outputs of the component.
1342 */
1343 get outputs(): ReadonlyArray<{
1344 readonly propName: string;
1345 readonly templateName: string;
1346 }>;
1347 /**
1348 * Selector for all <ng-content> elements in the component.
1349 */
1350 get ngContentSelectors(): ReadonlyArray<string>;
1351 /**
1352 * Whether this component is marked as standalone.
1353 * Note: an extra flag, not present in `ComponentFactory`.
1354 */
1355 get isStandalone(): boolean;
1356}
1357
1358/**
1359 * Represents a component created by a `ComponentFactory`.
1360 * Provides access to the component instance and related objects,
1361 * and provides the means of destroying the instance.
1362 *
1363 * @publicApi
1364 */
1365export declare abstract class ComponentRef<C> {
1366 /**
1367 * Updates a specified input name to a new value. Using this method will properly mark for check
1368 * component using the `OnPush` change detection strategy. It will also assure that the
1369 * `OnChanges` lifecycle hook runs when a dynamically created component is change-detected.
1370 *
1371 * @param name The name of an input.
1372 * @param value The new value of an input.
1373 */
1374 abstract setInput(name: string, value: unknown): void;
1375 /**
1376 * The host or anchor [element](guide/glossary#element) for this component instance.
1377 */
1378 abstract get location(): ElementRef;
1379 /**
1380 * The [dependency injector](guide/glossary#injector) for this component instance.
1381 */
1382 abstract get injector(): Injector;
1383 /**
1384 * This component instance.
1385 */
1386 abstract get instance(): C;
1387 /**
1388 * The [host view](guide/glossary#view-tree) defined by the template
1389 * for this component instance.
1390 */
1391 abstract get hostView(): ViewRef;
1392 /**
1393 * The change detector for this component instance.
1394 */
1395 abstract get changeDetectorRef(): ChangeDetectorRef;
1396 /**
1397 * The type of this component (as created by a `ComponentFactory` class).
1398 */
1399 abstract get componentType(): Type<any>;
1400 /**
1401 * Destroys the component instance and all of the data structures associated with it.
1402 */
1403 abstract destroy(): void;
1404 /**
1405 * A lifecycle hook that provides additional developer-defined cleanup
1406 * functionality for the component.
1407 * @param callback A handler function that cleans up developer-defined data
1408 * associated with this component. Called when the `destroy()` method is invoked.
1409 */
1410 abstract onDestroy(callback: Function): void;
1411}
1412
1413/**
1414 * Definition of what a template rendering function should look like for a component.
1415 */
1416declare type ComponentTemplate<T> = {
1417 <U extends T>(rf: ɵRenderFlags, ctx: T | U): void;
1418};
1419
1420/**
1421 * Configures the `Injector` to return an instance of a token.
1422 *
1423 * @see ["Dependency Injection Guide"](guide/dependency-injection).
1424 *
1425 * @usageNotes
1426 *
1427 * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
1428 *
1429 * ### Multi-value example
1430 *
1431 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
1432 *
1433 * @publicApi
1434 */
1435export declare interface ConstructorProvider extends ConstructorSansProvider {
1436 /**
1437 * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
1438 */
1439 provide: Type<any>;
1440 /**
1441 * When true, injector returns an array of instances. This is useful to allow multiple
1442 * providers spread across many files to provide configuration information to a common token.
1443 */
1444 multi?: boolean;
1445}
1446
1447/**
1448 * Configures the `Injector` to return an instance of a token.
1449 *
1450 * @see ["Dependency Injection Guide"](guide/dependency-injection).
1451 *
1452 * @usageNotes
1453 *
1454 * ```ts
1455 * @Injectable(SomeModule, {deps: []})
1456 * class MyService {}
1457 * ```
1458 *
1459 * @publicApi
1460 */
1461export declare interface ConstructorSansProvider {
1462 /**
1463 * A list of `token`s to be resolved by the injector.
1464 */
1465 deps?: any[];
1466}
1467
1468/**
1469 * Type of the ContentChild metadata.
1470 *
1471 * @publicApi
1472 */
1473export declare type ContentChild = Query;
1474
1475/**
1476 * ContentChild decorator and metadata.
1477 *
1478 *
1479 * @Annotation
1480 *
1481 * @publicApi
1482 */
1483export declare const ContentChild: ContentChildDecorator;
1484
1485/**
1486 * Type of the ContentChild decorator / constructor function.
1487 *
1488 * @publicApi
1489 */
1490export declare interface ContentChildDecorator {
1491 /**
1492 * @description
1493 * Property decorator that configures a content query.
1494 *
1495 * Use to get the first element or the directive matching the selector from the content DOM.
1496 * If the content DOM changes, and a new child matches the selector,
1497 * the property will be updated.
1498 *
1499 * Content queries are set before the `ngAfterContentInit` callback is called.
1500 *
1501 * Does not retrieve elements or directives that are in other components' templates,
1502 * since a component's template is always a black box to its ancestors.
1503 *
1504 * **Metadata Properties**:
1505 *
1506 * * **selector** - The directive type or the name used for querying.
1507 * * **descendants** - If `true` (default) include all descendants of the element. If `false` then
1508 * only query direct children of the element.
1509 * * **read** - Used to read a different token from the queried element.
1510 * * **static** - True to resolve query results before change detection runs,
1511 * false to resolve after change detection. Defaults to false.
1512 *
1513 * The following selectors are supported.
1514 * * Any class with the `@Component` or `@Directive` decorator
1515 * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
1516 * with `@ContentChild('cmp')`)
1517 * * Any provider defined in the child component tree of the current component (e.g.
1518 * `@ContentChild(SomeService) someService: SomeService`)
1519 * * Any provider defined through a string token (e.g. `@ContentChild('someToken') someTokenVal:
1520 * any`)
1521 * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ContentChild(TemplateRef)
1522 * template;`)
1523 *
1524 * The following values are supported by `read`:
1525 * * Any class with the `@Component` or `@Directive` decorator
1526 * * Any provider defined on the injector of the component that is matched by the `selector` of
1527 * this query
1528 * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
1529 * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
1530 *
1531 * @usageNotes
1532 *
1533 * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'}
1534 *
1535 * ### Example
1536 *
1537 * {@example core/di/ts/contentChild/content_child_example.ts region='Component'}
1538 *
1539 * @Annotation
1540 */
1541 (selector: ProviderToken<unknown> | Function | string, opts?: {
1542 descendants?: boolean;
1543 read?: any;
1544 static?: boolean;
1545 }): any;
1546 new (selector: ProviderToken<unknown> | Function | string, opts?: {
1547 descendants?: boolean;
1548 read?: any;
1549 static?: boolean;
1550 }): ContentChild;
1551}
1552
1553/**
1554 * Type of the ContentChildren metadata.
1555 *
1556 *
1557 * @Annotation
1558 * @publicApi
1559 */
1560export declare type ContentChildren = Query;
1561
1562/**
1563 * ContentChildren decorator and metadata.
1564 *
1565 *
1566 * @Annotation
1567 * @publicApi
1568 */
1569export declare const ContentChildren: ContentChildrenDecorator;
1570
1571/**
1572 * Type of the ContentChildren decorator / constructor function.
1573 *
1574 * @see `ContentChildren`.
1575 * @publicApi
1576 */
1577export declare interface ContentChildrenDecorator {
1578 /**
1579 * @description
1580 * Property decorator that configures a content query.
1581 *
1582 * Use to get the `QueryList` of elements or directives from the content DOM.
1583 * Any time a child element is added, removed, or moved, the query list will be
1584 * updated, and the changes observable of the query list will emit a new value.
1585 *
1586 * Content queries are set before the `ngAfterContentInit` callback is called.
1587 *
1588 * Does not retrieve elements or directives that are in other components' templates,
1589 * since a component's template is always a black box to its ancestors.
1590 *
1591 * **Metadata Properties**:
1592 *
1593 * * **selector** - The directive type or the name used for querying.
1594 * * **descendants** - If `true` include all descendants of the element. If `false` then only
1595 * query direct children of the element.
1596 * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only
1597 * if the QueryList result has changed. When `false` the `changes` observable might emit even
1598 * if the QueryList has not changed.
1599 * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and
1600 * removed in future versions of Angular.
1601 * * **read** - Used to read a different token from the queried elements.
1602 *
1603 * The following selectors are supported.
1604 * * Any class with the `@Component` or `@Directive` decorator
1605 * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
1606 * with `@ContentChildren('cmp')`)
1607 * * Any provider defined in the child component tree of the current component (e.g.
1608 * `@ContentChildren(SomeService) someService: SomeService`)
1609 * * Any provider defined through a string token (e.g. `@ContentChildren('someToken')
1610 * someTokenVal: any`)
1611 * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with
1612 * `@ContentChildren(TemplateRef) template;`)
1613 *
1614 * In addition, multiple string selectors can be separated with a comma (e.g.
1615 * `@ContentChildren('cmp1,cmp2')`)
1616 *
1617 * The following values are supported by `read`:
1618 * * Any class with the `@Component` or `@Directive` decorator
1619 * * Any provider defined on the injector of the component that is matched by the `selector` of
1620 * this query
1621 * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
1622 * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
1623 *
1624 * @usageNotes
1625 *
1626 * Here is a simple demonstration of how the `ContentChildren` decorator can be used.
1627 *
1628 * {@example core/di/ts/contentChildren/content_children_howto.ts region='HowTo'}
1629 *
1630 * ### Tab-pane example
1631 *
1632 * Here is a slightly more realistic example that shows how `ContentChildren` decorators
1633 * can be used to implement a tab pane component.
1634 *
1635 * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'}
1636 *
1637 * @Annotation
1638 */
1639 (selector: ProviderToken<unknown> | Function | string, opts?: {
1640 descendants?: boolean;
1641 emitDistinctChangesOnly?: boolean;
1642 read?: any;
1643 }): any;
1644 new (selector: ProviderToken<unknown> | Function | string, opts?: {
1645 descendants?: boolean;
1646 emitDistinctChangesOnly?: boolean;
1647 read?: any;
1648 }): Query;
1649}
1650
1651/**
1652 * Definition of what a content queries function should look like.
1653 */
1654declare type ContentQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U, directiveIndex: number) => void;
1655
1656declare const CONTEXT = 8;
1657
1658/**
1659 * Creates a `ComponentRef` instance based on provided component type and a set of options.
1660 *
1661 * @usageNotes
1662 *
1663 * The example below demonstrates how the `createComponent` function can be used
1664 * to create an instance of a ComponentRef dynamically and attach it to an ApplicationRef,
1665 * so that it gets included into change detection cycles.
1666 *
1667 * Note: the example uses standalone components, but the function can also be used for
1668 * non-standalone components (declared in an NgModule) as well.
1669 *
1670 * ```typescript
1671 * @Component({
1672 * standalone: true,
1673 * template: `Hello {{ name }}!`
1674 * })
1675 * class HelloComponent {
1676 * name = 'Angular';
1677 * }
1678 *
1679 * @Component({
1680 * standalone: true,
1681 * template: `<div id="hello-component-host"></div>`
1682 * })
1683 * class RootComponent {}
1684 *
1685 * // Bootstrap an application.
1686 * const applicationRef = await bootstrapApplication(RootComponent);
1687 *
1688 * // Locate a DOM node that would be used as a host.
1689 * const host = document.getElementById('hello-component-host');
1690 *
1691 * // Get an `EnvironmentInjector` instance from the `ApplicationRef`.
1692 * const environmentInjector = applicationRef.injector;
1693 *
1694 * // We can now create a `ComponentRef` instance.
1695 * const componentRef = createComponent(HelloComponent, {host, environmentInjector});
1696 *
1697 * // Last step is to register the newly created ref using the `ApplicationRef` instance
1698 * // to include the component view into change detection cycles.
1699 * applicationRef.attachView(componentRef.hostView);
1700 * ```
1701 *
1702 * @param component Component class reference.
1703 * @param options Set of options to use:
1704 * * `environmentInjector`: An `EnvironmentInjector` instance to be used for the component, see
1705 * additional info about it at https://angular.io/guide/standalone-components#environment-injectors.
1706 * * `hostElement` (optional): A DOM node that should act as a host node for the component. If not
1707 * provided, Angular creates one based on the tag name used in the component selector (and falls
1708 * back to using `div` if selector doesn't have tag name info).
1709 * * `elementInjector` (optional): An `ElementInjector` instance, see additional info about it at
1710 * https://angular.io/guide/hierarchical-dependency-injection#elementinjector.
1711 * * `projectableNodes` (optional): A list of DOM nodes that should be projected through
1712 * [`<ng-content>`](api/core/ng-content) of the new component instance.
1713 * @returns ComponentRef instance that represents a given Component.
1714 *
1715 * @publicApi
1716 */
1717export declare function createComponent<C>(component: Type<C>, options: {
1718 environmentInjector: EnvironmentInjector;
1719 hostElement?: Element;
1720 elementInjector?: Injector;
1721 projectableNodes?: Node[][];
1722}): ComponentRef<C>;
1723
1724/**
1725 * Create a new environment injector.
1726 *
1727 * Learn more about environment injectors in
1728 * [this guide](guide/standalone-components#environment-injectors).
1729 *
1730 * @param providers An array of providers.
1731 * @param parent A parent environment injector.
1732 * @param debugName An optional name for this injector instance, which will be used in error
1733 * messages.
1734 *
1735 * @publicApi
1736 */
1737export declare function createEnvironmentInjector(providers: Array<Provider | EnvironmentProviders>, parent: EnvironmentInjector, debugName?: string | null): EnvironmentInjector;
1738
1739/**
1740 * Returns a new NgModuleRef instance based on the NgModule class and parent injector provided.
1741 *
1742 * @param ngModule NgModule class.
1743 * @param parentInjector Optional injector instance to use as a parent for the module injector. If
1744 * not provided, `NullInjector` will be used instead.
1745 * @returns NgModuleRef that represents an NgModule instance.
1746 *
1747 * @publicApi
1748 */
1749export declare function createNgModule<T>(ngModule: Type<T>, parentInjector?: Injector): NgModuleRef<T>;
1750
1751/**
1752 * The `createNgModule` function alias for backwards-compatibility.
1753 * Please avoid using it directly and use `createNgModule` instead.
1754 *
1755 * @deprecated Use `createNgModule` instead.
1756 */
1757export declare const createNgModuleRef: typeof createNgModule;
1758
1759/**
1760 * Creates a platform.
1761 * Platforms must be created on launch using this function.
1762 *
1763 * @publicApi
1764 */
1765export declare function createPlatform(injector: Injector): PlatformRef;
1766
1767/**
1768 * Creates a factory for a platform. Can be used to provide or override `Providers` specific to
1769 * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.
1770 * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories
1771 * to build up configurations that might be required by different libraries or parts of the
1772 * application.
1773 * @param name Identifies the new platform factory.
1774 * @param providers A set of dependency providers for platforms created with the new factory.
1775 *
1776 * @publicApi
1777 */
1778export declare function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef;
1779
1780
1781/**
1782 * Expresses a single CSS Selector.
1783 *
1784 * Beginning of array
1785 * - First index: element name
1786 * - Subsequent odd indices: attr keys
1787 * - Subsequent even indices: attr values
1788 *
1789 * After SelectorFlags.CLASS flag
1790 * - Class name values
1791 *
1792 * SelectorFlags.NOT flag
1793 * - Changes the mode to NOT
1794 * - Can be combined with other flags to set the element / attr / class mode
1795 *
1796 * e.g. SelectorFlags.NOT | SelectorFlags.ELEMENT
1797 *
1798 * Example:
1799 * Original: `div.foo.bar[attr1=val1][attr2]`
1800 * Parsed: ['div', 'attr1', 'val1', 'attr2', '', SelectorFlags.CLASS, 'foo', 'bar']
1801 *
1802 * Original: 'div[attr1]:not(.foo[attr2])
1803 * Parsed: [
1804 * 'div', 'attr1', '',
1805 * SelectorFlags.NOT | SelectorFlags.ATTRIBUTE 'attr2', '', SelectorFlags.CLASS, 'foo'
1806 * ]
1807 *
1808 * See more examples in node_selector_matcher_spec.ts
1809 */
1810declare type CssSelector = (string | SelectorFlags)[];
1811
1812/**
1813 * An object literal of this type is used to represent the metadata of a constructor dependency.
1814 * The type itself is never referred to from generated code.
1815 *
1816 * @publicApi
1817 */
1818declare type CtorDependency = {
1819 /**
1820 * If an `@Attribute` decorator is used, this represents the injected attribute's name. If the
1821 * attribute name is a dynamic expression instead of a string literal, this will be the unknown
1822 * type.
1823 */
1824 attribute?: string | unknown;
1825 /**
1826 * If `@Optional()` is used, this key is set to true.
1827 */
1828 optional?: true;
1829 /**
1830 * If `@Host` is used, this key is set to true.
1831 */
1832 host?: true;
1833 /**
1834 * If `@Self` is used, this key is set to true.
1835 */
1836 self?: true;
1837 /**
1838 * If `@SkipSelf` is used, this key is set to true.
1839 */
1840 skipSelf?: true;
1841} | null;
1842
1843/**
1844 * Defines a schema that allows an NgModule to contain the following:
1845 * - Non-Angular elements named with dash case (`-`).
1846 * - Element properties named with dash case (`-`).
1847 * Dash case is the naming convention for custom elements.
1848 *
1849 * @publicApi
1850 */
1851export declare const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata;
1852
1853/**
1854 * @publicApi
1855 *
1856 * @see [Component testing scenarios](guide/testing-components-scenarios)
1857 * @see [Basics of testing components](guide/testing-components-basics)
1858 * @see [Testing utility APIs](guide/testing-utility-apis)
1859 */
1860export declare class DebugElement extends DebugNode {
1861 constructor(nativeNode: Element);
1862 /**
1863 * The underlying DOM element at the root of the component.
1864 */
1865 get nativeElement(): any;
1866 /**
1867 * The element tag name, if it is an element.
1868 */
1869 get name(): string;
1870 /**
1871 * Gets a map of property names to property values for an element.
1872 *
1873 * This map includes:
1874 * - Regular property bindings (e.g. `[id]="id"`)
1875 * - Host property bindings (e.g. `host: { '[id]': "id" }`)
1876 * - Interpolated property bindings (e.g. `id="{{ value }}")
1877 *
1878 * It does not include:
1879 * - input property bindings (e.g. `[myCustomInput]="value"`)
1880 * - attribute bindings (e.g. `[attr.role]="menu"`)
1881 */
1882 get properties(): {
1883 [key: string]: any;
1884 };
1885 /**
1886 * A map of attribute names to attribute values for an element.
1887 */
1888 get attributes(): {
1889 [key: string]: string | null;
1890 };
1891 /**
1892 * The inline styles of the DOM element.
1893 *
1894 * Will be `null` if there is no `style` property on the underlying DOM element.
1895 *
1896 * @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)
1897 */
1898 get styles(): {
1899 [key: string]: string | null;
1900 };
1901 /**
1902 * A map containing the class names on the element as keys.
1903 *
1904 * This map is derived from the `className` property of the DOM element.
1905 *
1906 * Note: The values of this object will always be `true`. The class key will not appear in the KV
1907 * object if it does not exist on the element.
1908 *
1909 * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)
1910 */
1911 get classes(): {
1912 [key: string]: boolean;
1913 };
1914 /**
1915 * The `childNodes` of the DOM element as a `DebugNode` array.
1916 *
1917 * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
1918 */
1919 get childNodes(): DebugNode[];
1920 /**
1921 * The immediate `DebugElement` children. Walk the tree by descending through `children`.
1922 */
1923 get children(): DebugElement[];
1924 /**
1925 * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.
1926 */
1927 query(predicate: Predicate<DebugElement>): DebugElement;
1928 /**
1929 * @returns All `DebugElement` matches for the predicate at any depth in the subtree.
1930 */
1931 queryAll(predicate: Predicate<DebugElement>): DebugElement[];
1932 /**
1933 * @returns All `DebugNode` matches for the predicate at any depth in the subtree.
1934 */
1935 queryAllNodes(predicate: Predicate<DebugNode>): DebugNode[];
1936 /**
1937 * Triggers the event by its name if there is a corresponding listener in the element's
1938 * `listeners` collection.
1939 *
1940 * If the event lacks a listener or there's some other problem, consider
1941 * calling `nativeElement.dispatchEvent(eventObject)`.
1942 *
1943 * @param eventName The name of the event to trigger
1944 * @param eventObj The _event object_ expected by the handler
1945 *
1946 * @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)
1947 */
1948 triggerEventHandler(eventName: string, eventObj?: any): void;
1949}
1950
1951/**
1952 * @publicApi
1953 */
1954export declare class DebugEventListener {
1955 name: string;
1956 callback: Function;
1957 constructor(name: string, callback: Function);
1958}
1959
1960/**
1961 * @publicApi
1962 */
1963export declare class DebugNode {
1964 /**
1965 * The underlying DOM node.
1966 */
1967 readonly nativeNode: any;
1968 constructor(nativeNode: Node);
1969 /**
1970 * The `DebugElement` parent. Will be `null` if this is the root element.
1971 */
1972 get parent(): DebugElement | null;
1973 /**
1974 * The host dependency injector. For example, the root element's component instance injector.
1975 */
1976 get injector(): Injector;
1977 /**
1978 * The element's own component instance, if it has one.
1979 */
1980 get componentInstance(): any;
1981 /**
1982 * An object that provides parent context for this element. Often an ancestor component instance
1983 * that governs this element.
1984 *
1985 * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`
1986 * property is the value of the row instance value. For example, the `hero` in `*ngFor="let hero
1987 * of heroes"`.
1988 */
1989 get context(): any;
1990 /**
1991 * The callbacks attached to the component's @Output properties and/or the element's event
1992 * properties.
1993 */
1994 get listeners(): DebugEventListener[];
1995 /**
1996 * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local
1997 * variable name.
1998 */
1999 get references(): {
2000 [key: string]: any;
2001 };
2002 /**
2003 * This component's injector lookup tokens. Includes the component itself plus the tokens that the
2004 * component lists in its providers metadata.
2005 */
2006 get providerTokens(): any[];
2007}
2008
2009declare const DECLARATION_COMPONENT_VIEW = 16;
2010
2011declare const DECLARATION_LCONTAINER = 17;
2012
2013declare const DECLARATION_VIEW = 15;
2014
2015/**
2016 * Provide this token to set the default currency code your application uses for
2017 * CurrencyPipe when there is no currency code passed into it. This is only used by
2018 * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.
2019 *
2020 * See the [i18n guide](guide/i18n-common-locale-id) for more information.
2021 *
2022 * <div class="alert is-helpful">
2023 *
2024 * **Deprecation notice:**
2025 *
2026 * The default currency code is currently always `USD` but this is deprecated from v9.
2027 *
2028 * **In v10 the default currency code will be taken from the current locale.**
2029 *
2030 * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in
2031 * your application `NgModule`:
2032 *
2033 * ```ts
2034 * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}
2035 * ```
2036 *
2037 * </div>
2038 *
2039 * @usageNotes
2040 * ### Example
2041 *
2042 * ```typescript
2043 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2044 * import { AppModule } from './app/app.module';
2045 *
2046 * platformBrowserDynamic().bootstrapModule(AppModule, {
2047 * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]
2048 * });
2049 * ```
2050 *
2051 * @publicApi
2052 */
2053export declare const DEFAULT_CURRENCY_CODE: InjectionToken<string>;
2054
2055/**
2056 * @deprecated v4.0.0 - Should not be part of public API.
2057 * @publicApi
2058 */
2059export declare class DefaultIterableDiffer<V> implements IterableDiffer<V>, IterableChanges<V> {
2060 readonly length: number;
2061 readonly collection: V[] | Iterable<V> | null;
2062 private _linkedRecords;
2063 private _unlinkedRecords;
2064 private _previousItHead;
2065 private _itHead;
2066 private _itTail;
2067 private _additionsHead;
2068 private _additionsTail;
2069 private _movesHead;
2070 private _movesTail;
2071 private _removalsHead;
2072 private _removalsTail;
2073 private _identityChangesHead;
2074 private _identityChangesTail;
2075 private _trackByFn;
2076 constructor(trackByFn?: TrackByFunction<V>);
2077 forEachItem(fn: (record: IterableChangeRecord_<V>) => void): void;
2078 forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
2079 forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void): void;
2080 forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
2081 forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
2082 forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void): void;
2083 forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void): void;
2084 diff(collection: NgIterable<V> | null | undefined): DefaultIterableDiffer<V> | null;
2085 onDestroy(): void;
2086 check(collection: NgIterable<V>): boolean;
2087 get isDirty(): boolean;
2088 private _addToRemovals;
2089}
2090
2091/**
2092 * @deprecated in v8, delete after v10. This API should be used only by generated code, and that
2093 * code should now use ɵɵdefineInjectable instead.
2094 * @publicApi
2095 */
2096export declare const defineInjectable: typeof ɵɵdefineInjectable;
2097
2098declare type DependencyTypeList = (ɵDirectiveType<any> | ɵComponentType<any> | PipeType<any> | Type<any>)[];
2099
2100/**
2101 * Array of destroy hooks that should be executed for a view and their directive indices.
2102 *
2103 * The array is set up as a series of number/function or number/(number|function)[]:
2104 * - Even indices represent the context with which hooks should be called.
2105 * - Odd indices are the hook functions themselves. If a value at an odd index is an array,
2106 * it represents the destroy hooks of a `multi` provider where:
2107 * - Even indices represent the index of the provider for which we've registered a destroy hook,
2108 * inside of the `multi` provider array.
2109 * - Odd indices are the destroy hook functions.
2110 * For example:
2111 * LView: `[0, 1, 2, AService, 4, [BService, CService, DService]]`
2112 * destroyHooks: `[3, AService.ngOnDestroy, 5, [0, BService.ngOnDestroy, 2, DService.ngOnDestroy]]`
2113 *
2114 * In the example above `AService` is a type provider with an `ngOnDestroy`, whereas `BService`,
2115 * `CService` and `DService` are part of a `multi` provider where only `BService` and `DService`
2116 * have an `ngOnDestroy` hook.
2117 */
2118declare type DestroyHookData = (HookEntry | HookData)[];
2119
2120/**
2121 * Destroys the current Angular platform and all Angular applications on the page.
2122 * Destroys all modules and listeners registered with the platform.
2123 *
2124 * @publicApi
2125 */
2126export declare function destroyPlatform(): void;
2127
2128/**
2129 * Directive decorator and metadata.
2130 *
2131 * @Annotation
2132 * @publicApi
2133 */
2134export declare interface Directive {
2135 /**
2136 * The CSS selector that identifies this directive in a template
2137 * and triggers instantiation of the directive.
2138 *
2139 * Declare as one of the following:
2140 *
2141 * - `element-name`: Select by element name.
2142 * - `.class`: Select by class name.
2143 * - `[attribute]`: Select by attribute name.
2144 * - `[attribute=value]`: Select by attribute name and value.
2145 * - `:not(sub_selector)`: Select only if the element does not match the `sub_selector`.
2146 * - `selector1, selector2`: Select if either `selector1` or `selector2` matches.
2147 *
2148 * Angular only allows directives to apply on CSS selectors that do not cross
2149 * element boundaries.
2150 *
2151 * For the following template HTML, a directive with an `input[type=text]` selector,
2152 * would be instantiated only on the `<input type="text">` element.
2153 *
2154 * ```html
2155 * <form>
2156 * <input type="text">
2157 * <input type="radio">
2158 * <form>
2159 * ```
2160 *
2161 */
2162 selector?: string;
2163 /**
2164 * Enumerates the set of data-bound input properties for a directive
2165 *
2166 * Angular automatically updates input properties during change detection.
2167 * The `inputs` property defines a set of `directiveProperty` to `bindingProperty`
2168 * configuration:
2169 *
2170 * - `directiveProperty` specifies the component property where the value is written.
2171 * - `bindingProperty` specifies the DOM property where the value is read from.
2172 *
2173 * When `bindingProperty` is not provided, it is assumed to be equal to `directiveProperty`.
2174 *
2175 * @usageNotes
2176 *
2177 * The following example creates a component with two data-bound properties.
2178 *
2179 * ```typescript
2180 * @Component({
2181 * selector: 'bank-account',
2182 * inputs: ['bankName', 'id: account-id'],
2183 * template: `
2184 * Bank Name: {{bankName}}
2185 * Account Id: {{id}}
2186 * `
2187 * })
2188 * class BankAccount {
2189 * bankName: string;
2190 * id: string;
2191 * }
2192 * ```
2193 *
2194 */
2195 inputs?: string[];
2196 /**
2197 * Enumerates the set of event-bound output properties.
2198 *
2199 * When an output property emits an event, an event handler attached to that event
2200 * in the template is invoked.
2201 *
2202 * The `outputs` property defines a set of `directiveProperty` to `bindingProperty`
2203 * configuration:
2204 *
2205 * - `directiveProperty` specifies the component property that emits events.
2206 * - `bindingProperty` specifies the DOM property the event handler is attached to.
2207 *
2208 * @usageNotes
2209 *
2210 * ```typescript
2211 * @Component({
2212 * selector: 'child-dir',
2213 * outputs: [ 'bankNameChange' ]
2214 * template: `<input (input)="bankNameChange.emit($event.target.value)" />`
2215 * })
2216 * class ChildDir {
2217 * bankNameChange: EventEmitter<string> = new EventEmitter<string>();
2218 * }
2219 *
2220 * @Component({
2221 * selector: 'main',
2222 * template: `
2223 * {{ bankName }} <child-dir (bankNameChange)="onBankNameChange($event)"></child-dir>
2224 * `
2225 * })
2226 * class MainComponent {
2227 * bankName: string;
2228 *
2229 * onBankNameChange(bankName: string) {
2230 * this.bankName = bankName;
2231 * }
2232 * }
2233 * ```
2234 *
2235 */
2236 outputs?: string[];
2237 /**
2238 * Configures the [injector](guide/glossary#injector) of this
2239 * directive or component with a [token](guide/glossary#di-token)
2240 * that maps to a [provider](guide/glossary#provider) of a dependency.
2241 */
2242 providers?: Provider[];
2243 /**
2244 * Defines the name that can be used in the template to assign this directive to a variable.
2245 *
2246 * @usageNotes
2247 *
2248 * ```ts
2249 * @Directive({
2250 * selector: 'child-dir',
2251 * exportAs: 'child'
2252 * })
2253 * class ChildDir {
2254 * }
2255 *
2256 * @Component({
2257 * selector: 'main',
2258 * template: `<child-dir #c="child"></child-dir>`
2259 * })
2260 * class MainComponent {
2261 * }
2262 * ```
2263 *
2264 */
2265 exportAs?: string;
2266 /**
2267 * Configures the queries that will be injected into the directive.
2268 *
2269 * Content queries are set before the `ngAfterContentInit` callback is called.
2270 * View queries are set before the `ngAfterViewInit` callback is called.
2271 *
2272 * @usageNotes
2273 *
2274 * The following example shows how queries are defined
2275 * and when their results are available in lifecycle hooks:
2276 *
2277 * ```ts
2278 * @Component({
2279 * selector: 'someDir',
2280 * queries: {
2281 * contentChildren: new ContentChildren(ChildDirective),
2282 * viewChildren: new ViewChildren(ChildDirective)
2283 * },
2284 * template: '<child-directive></child-directive>'
2285 * })
2286 * class SomeDir {
2287 * contentChildren: QueryList<ChildDirective>,
2288 * viewChildren: QueryList<ChildDirective>
2289 *
2290 * ngAfterContentInit() {
2291 * // contentChildren is set
2292 * }
2293 *
2294 * ngAfterViewInit() {
2295 * // viewChildren is set
2296 * }
2297 * }
2298 * ```
2299 *
2300 * @Annotation
2301 */
2302 queries?: {
2303 [key: string]: any;
2304 };
2305 /**
2306 * Maps class properties to host element bindings for properties,
2307 * attributes, and events, using a set of key-value pairs.
2308 *
2309 * Angular automatically checks host property bindings during change detection.
2310 * If a binding changes, Angular updates the directive's host element.
2311 *
2312 * When the key is a property of the host element, the property value is
2313 * the propagated to the specified DOM property.
2314 *
2315 * When the key is a static attribute in the DOM, the attribute value
2316 * is propagated to the specified property in the host element.
2317 *
2318 * For event handling:
2319 * - The key is the DOM event that the directive listens to.
2320 * To listen to global events, add the target to the event name.
2321 * The target can be `window`, `document` or `body`.
2322 * - The value is the statement to execute when the event occurs. If the
2323 * statement evaluates to `false`, then `preventDefault` is applied on the DOM
2324 * event. A handler method can refer to the `$event` local variable.
2325 *
2326 */
2327 host?: {
2328 [key: string]: string;
2329 };
2330 /**
2331 * When present, this directive/component is ignored by the AOT compiler.
2332 * It remains in distributed code, and the JIT compiler attempts to compile it
2333 * at run time, in the browser.
2334 * To ensure the correct behavior, the app must import `@angular/compiler`.
2335 */
2336 jit?: true;
2337 /**
2338 * Angular directives marked as `standalone` do not need to be declared in an NgModule. Such
2339 * directives don't depend on any "intermediate context" of an NgModule (ex. configured
2340 * providers).
2341 *
2342 * More information about standalone components, directives, and pipes can be found in [this
2343 * guide](guide/standalone-components).
2344 */
2345 standalone?: boolean;
2346 /**
2347 * Standalone directives that should be applied to the host whenever the directive is matched.
2348 * By default, none of the inputs or outputs of the host directives will be available on the host,
2349 * unless they are specified in the `inputs` or `outputs` properties.
2350 *
2351 * You can additionally alias inputs and outputs by putting a colon and the alias after the
2352 * original input or output name. For example, if a directive applied via `hostDirectives`
2353 * defines an input named `menuDisabled`, you can alias this to `disabled` by adding
2354 * `'menuDisabled: disabled'` as an entry to `inputs`.
2355 */
2356 hostDirectives?: (Type<unknown> | {
2357 directive: Type<unknown>;
2358 inputs?: string[];
2359 outputs?: string[];
2360 })[];
2361}
2362
2363/**
2364 * Type of the Directive metadata.
2365 *
2366 * @publicApi
2367 */
2368export declare const Directive: DirectiveDecorator;
2369
2370/**
2371 * Type of the Directive decorator / constructor function.
2372 * @publicApi
2373 */
2374export declare interface DirectiveDecorator {
2375 /**
2376 * Decorator that marks a class as an Angular directive.
2377 * You can define your own directives to attach custom behavior to elements in the DOM.
2378 *
2379 * The options provide configuration metadata that determines
2380 * how the directive should be processed, instantiated and used at
2381 * runtime.
2382 *
2383 * Directive classes, like component classes, can implement
2384 * [life-cycle hooks](guide/lifecycle-hooks) to influence their configuration and behavior.
2385 *
2386 *
2387 * @usageNotes
2388 * To define a directive, mark the class with the decorator and provide metadata.
2389 *
2390 * ```ts
2391 * import {Directive} from '@angular/core';
2392 *
2393 * @Directive({
2394 * selector: 'my-directive',
2395 * })
2396 * export class MyDirective {
2397 * ...
2398 * }
2399 * ```
2400 *
2401 * ### Declaring directives
2402 *
2403 * In order to make a directive available to other components in your application, you should do
2404 * one of the following:
2405 * - either mark the directive as [standalone](guide/standalone-components),
2406 * - or declare it in an NgModule by adding it to the `declarations` and `exports` fields.
2407 *
2408 * ** Marking a directive as standalone **
2409 *
2410 * You can add the `standalone: true` flag to the Directive decorator metadata to declare it as
2411 * [standalone](guide/standalone-components):
2412 *
2413 * ```ts
2414 * @Directive({
2415 * standalone: true,
2416 * selector: 'my-directive',
2417 * })
2418 * class MyDirective {}
2419 * ```
2420 *
2421 * When marking a directive as standalone, please make sure that the directive is not already
2422 * declared in an NgModule.
2423 *
2424 *
2425 * ** Declaring a directive in an NgModule **
2426 *
2427 * Another approach is to declare a directive in an NgModule:
2428 *
2429 * ```ts
2430 * @Directive({
2431 * selector: 'my-directive',
2432 * })
2433 * class MyDirective {}
2434 *
2435 * @NgModule({
2436 * declarations: [MyDirective, SomeComponent],
2437 * exports: [MyDirective], // making it available outside of this module
2438 * })
2439 * class SomeNgModule {}
2440 * ```
2441 *
2442 * When declaring a directive in an NgModule, please make sure that:
2443 * - the directive is declared in exactly one NgModule.
2444 * - the directive is not standalone.
2445 * - you do not re-declare a directive imported from another module.
2446 * - the directive is included into the `exports` field as well if you want this directive to be
2447 * accessible for components outside of the NgModule.
2448 *
2449 *
2450 * @Annotation
2451 */
2452 (obj?: Directive): TypeDecorator;
2453 /**
2454 * See the `Directive` decorator.
2455 */
2456 new (obj?: Directive): Directive;
2457}
2458
2459declare interface DirectiveDefFeature {
2460 <T>(directiveDef: ɵDirectiveDef<T>): void;
2461 /**
2462 * Marks a feature as something that {@link InheritDefinitionFeature} will execute
2463 * during inheritance.
2464 *
2465 * NOTE: DO NOT SET IN ROOT OF MODULE! Doing so will result in tree-shakers/bundlers
2466 * identifying the change as a side effect, and the feature will be included in
2467 * every bundle.
2468 */
2469 ngInherit?: true;
2470}
2471
2472declare type DirectiveDefList = (ɵDirectiveDef<any> | ɵComponentDef<any>)[];
2473
2474/**
2475 * Type used for directiveDefs on component definition.
2476 *
2477 * The function is necessary to be able to support forward declarations.
2478 */
2479declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDefList;
2480
2481/**
2482 * @description
2483 * Hook for manual bootstrapping of the application instead of using `bootstrap` array in @NgModule
2484 * annotation. This hook is invoked only when the `bootstrap` array is empty or not provided.
2485 *
2486 * Reference to the current application is provided as a parameter.
2487 *
2488 * See ["Bootstrapping"](guide/bootstrapping) and ["Entry components"](guide/entry-components).
2489 *
2490 * @usageNotes
2491 * The example below uses `ApplicationRef.bootstrap()` to render the
2492 * `AppComponent` on the page.
2493 *
2494 * ```typescript
2495 * class AppModule implements DoBootstrap {
2496 * ngDoBootstrap(appRef: ApplicationRef) {
2497 * appRef.bootstrap(AppComponent); // Or some other component
2498 * }
2499 * }
2500 * ```
2501 *
2502 * @publicApi
2503 */
2504export declare interface DoBootstrap {
2505 ngDoBootstrap(appRef: ApplicationRef): void;
2506}
2507
2508/**
2509 * A lifecycle hook that invokes a custom change-detection function for a directive,
2510 * in addition to the check performed by the default change-detector.
2511 *
2512 * The default change-detection algorithm looks for differences by comparing
2513 * bound-property values by reference across change detection runs. You can use this
2514 * hook to check for and respond to changes by some other means.
2515 *
2516 * When the default change detector detects changes, it invokes `ngOnChanges()` if supplied,
2517 * regardless of whether you perform additional change detection.
2518 * Typically, you should not use both `DoCheck` and `OnChanges` to respond to
2519 * changes on the same input.
2520 *
2521 * @see `OnChanges`
2522 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
2523 *
2524 * @usageNotes
2525 * The following snippet shows how a component can implement this interface
2526 * to invoke it own change-detection cycle.
2527 *
2528 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'}
2529 *
2530 * For a more complete example and discussion, see
2531 * [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection).
2532 *
2533 * @publicApi
2534 */
2535export declare interface DoCheck {
2536 /**
2537 * A callback method that performs change-detection, invoked
2538 * after the default change-detector runs.
2539 * See `KeyValueDiffers` and `IterableDiffers` for implementing
2540 * custom change checking for collections.
2541 *
2542 */
2543 ngDoCheck(): void;
2544}
2545
2546/**
2547 * Marks that the next string is an element name.
2548 *
2549 * See `I18nMutateOpCodes` documentation.
2550 */
2551declare const ELEMENT_MARKER: ELEMENT_MARKER;
2552
2553declare interface ELEMENT_MARKER {
2554 marker: 'element';
2555}
2556
2557/**
2558 * A wrapper around a native element inside of a View.
2559 *
2560 * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM
2561 * element.
2562 *
2563 * @security Permitting direct access to the DOM can make your application more vulnerable to
2564 * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the
2565 * [Security Guide](https://g.co/ng/security).
2566 *
2567 * @publicApi
2568 */
2569export declare class ElementRef<T = any> {
2570 /**
2571 * The underlying native element or `null` if direct access to native elements is not supported
2572 * (e.g. when the application runs in a web worker).
2573 *
2574 * <div class="callout is-critical">
2575 * <header>Use with caution</header>
2576 * <p>
2577 * Use this API as the last resort when direct access to DOM is needed. Use templating and
2578 * data-binding provided by Angular instead. Alternatively you can take a look at {@link
2579 * Renderer2}
2580 * which provides API that can safely be used even when direct access to native elements is not
2581 * supported.
2582 * </p>
2583 * <p>
2584 * Relying on direct DOM access creates tight coupling between your application and rendering
2585 * layers which will make it impossible to separate the two and deploy your application into a
2586 * web worker.
2587 * </p>
2588 * </div>
2589 *
2590 */
2591 nativeElement: T;
2592 constructor(nativeElement: T);
2593}
2594
2595declare const EMBEDDED_VIEW_INJECTOR = 21;
2596
2597/**
2598 * Represents an Angular [view](guide/glossary#view) in a view container.
2599 * An [embedded view](guide/glossary#view-tree) can be referenced from a component
2600 * other than the hosting component whose template defines it, or it can be defined
2601 * independently by a `TemplateRef`.
2602 *
2603 * Properties of elements in a view can change, but the structure (number and order) of elements in
2604 * a view cannot. Change the structure of elements by inserting, moving, or
2605 * removing nested views in a view container.
2606 *
2607 * @see `ViewContainerRef`
2608 *
2609 * @usageNotes
2610 *
2611 * The following template breaks down into two separate `TemplateRef` instances,
2612 * an outer one and an inner one.
2613 *
2614 * ```
2615 * Count: {{items.length}}
2616 * <ul>
2617 * <li *ngFor="let item of items">{{item}}</li>
2618 * </ul>
2619 * ```
2620 *
2621 * This is the outer `TemplateRef`:
2622 *
2623 * ```
2624 * Count: {{items.length}}
2625 * <ul>
2626 * <ng-template ngFor let-item [ngForOf]="items"></ng-template>
2627 * </ul>
2628 * ```
2629 *
2630 * This is the inner `TemplateRef`:
2631 *
2632 * ```
2633 * <li>{{item}}</li>
2634 * ```
2635 *
2636 * The outer and inner `TemplateRef` instances are assembled into views as follows:
2637 *
2638 * ```
2639 * <!-- ViewRef: outer-0 -->
2640 * Count: 2
2641 * <ul>
2642 * <ng-template view-container-ref></ng-template>
2643 * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->
2644 * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->
2645 * </ul>
2646 * <!-- /ViewRef: outer-0 -->
2647 * ```
2648 * @publicApi
2649 */
2650export declare abstract class EmbeddedViewRef<C> extends ViewRef {
2651 /**
2652 * The context for this view, inherited from the anchor element.
2653 */
2654 abstract context: C;
2655 /**
2656 * The root nodes for this embedded view.
2657 */
2658 abstract get rootNodes(): any[];
2659}
2660
2661/**
2662 * Disable Angular's development mode, which turns off assertions and other
2663 * checks within the framework.
2664 *
2665 * One important assertion this disables verifies that a change detection pass
2666 * does not result in additional changes to any bindings (also known as
2667 * unidirectional data flow).
2668 *
2669 * Using this method is discouraged as the Angular CLI will set production mode when using the
2670 * `optimization` option.
2671 * @see {@link cli/build ng build}
2672 *
2673 * @publicApi
2674 */
2675export declare function enableProdMode(): void;
2676
2677/**
2678 * A multi-provider token for initialization functions that will run upon construction of an
2679 * environment injector.
2680 *
2681 * @publicApi
2682 */
2683export declare const ENVIRONMENT_INITIALIZER: InjectionToken<() => void>;
2684
2685/**
2686 * An `Injector` that's part of the environment injector hierarchy, which exists outside of the
2687 * component tree.
2688 */
2689export declare abstract class EnvironmentInjector implements Injector {
2690 /**
2691 * Retrieves an instance from the injector based on the provided token.
2692 * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
2693 * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
2694 */
2695 abstract get<T>(token: ProviderToken<T>, notFoundValue: undefined, options: InjectOptions & {
2696 optional?: false;
2697 }): T;
2698 /**
2699 * Retrieves an instance from the injector based on the provided token.
2700 * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
2701 * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
2702 */
2703 abstract get<T>(token: ProviderToken<T>, notFoundValue: null | undefined, options: InjectOptions): T | null;
2704 /**
2705 * Retrieves an instance from the injector based on the provided token.
2706 * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
2707 * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
2708 */
2709 abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions): T;
2710 /**
2711 * Retrieves an instance from the injector based on the provided token.
2712 * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
2713 * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
2714 * @deprecated use object-based flags (`InjectOptions`) instead.
2715 */
2716 abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
2717 /**
2718 * @deprecated from v4.0.0 use ProviderToken<T>
2719 * @suppress {duplicate}
2720 */
2721 abstract get(token: any, notFoundValue?: any): any;
2722 /**
2723 * Runs the given function in the context of this `EnvironmentInjector`.
2724 *
2725 * Within the function's stack frame, `inject` can be used to inject dependencies from this
2726 * injector. Note that `inject` is only usable synchronously, and cannot be used in any
2727 * asynchronous callbacks or after any `await` points.
2728 *
2729 * @param fn the closure to be run in the context of this injector
2730 * @returns the return value of the function, if any
2731 */
2732 abstract runInContext<ReturnT>(fn: () => ReturnT): ReturnT;
2733 abstract destroy(): void;
2734}
2735
2736/**
2737 * Encapsulated `Provider`s that are only accepted during creation of an `EnvironmentInjector` (e.g.
2738 * in an `NgModule`).
2739 *
2740 * Using this wrapper type prevents providers which are only designed to work in
2741 * application/environment injectors from being accidentally included in
2742 * `@Component.providers` and ending up in a component injector.
2743 *
2744 * This wrapper type prevents access to the `Provider`s inside.
2745 *
2746 * @see `makeEnvironmentProviders`
2747 * @see `importProvidersFrom`
2748 *
2749 * @publicApi
2750 */
2751export declare type EnvironmentProviders = {
2752 ɵbrand: 'EnvironmentProviders';
2753};
2754
2755
2756/**
2757 * Provides a hook for centralized exception handling.
2758 *
2759 * The default implementation of `ErrorHandler` prints error messages to the `console`. To
2760 * intercept error handling, write a custom exception handler that replaces this default as
2761 * appropriate for your app.
2762 *
2763 * @usageNotes
2764 * ### Example
2765 *
2766 * ```
2767 * class MyErrorHandler implements ErrorHandler {
2768 * handleError(error) {
2769 * // do something with the exception
2770 * }
2771 * }
2772 *
2773 * @NgModule({
2774 * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]
2775 * })
2776 * class MyModule {}
2777 * ```
2778 *
2779 * @publicApi
2780 */
2781export declare class ErrorHandler {
2782 handleError(error: any): void;
2783}
2784
2785/**
2786 * Use in components with the `@Output` directive to emit custom events
2787 * synchronously or asynchronously, and register handlers for those events
2788 * by subscribing to an instance.
2789 *
2790 * @usageNotes
2791 *
2792 * Extends
2793 * [RxJS `Subject`](https://rxjs.dev/api/index/class/Subject)
2794 * for Angular by adding the `emit()` method.
2795 *
2796 * In the following example, a component defines two output properties
2797 * that create event emitters. When the title is clicked, the emitter
2798 * emits an open or close event to toggle the current visibility state.
2799 *
2800 * ```html
2801 * @Component({
2802 * selector: 'zippy',
2803 * template: `
2804 * <div class="zippy">
2805 * <div (click)="toggle()">Toggle</div>
2806 * <div [hidden]="!visible">
2807 * <ng-content></ng-content>
2808 * </div>
2809 * </div>`})
2810 * export class Zippy {
2811 * visible: boolean = true;
2812 * @Output() open: EventEmitter<any> = new EventEmitter();
2813 * @Output() close: EventEmitter<any> = new EventEmitter();
2814 *
2815 * toggle() {
2816 * this.visible = !this.visible;
2817 * if (this.visible) {
2818 * this.open.emit(null);
2819 * } else {
2820 * this.close.emit(null);
2821 * }
2822 * }
2823 * }
2824 * ```
2825 *
2826 * Access the event object with the `$event` argument passed to the output event
2827 * handler:
2828 *
2829 * ```html
2830 * <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
2831 * ```
2832 *
2833 * @see [Observables in Angular](guide/observables-in-angular)
2834 * @publicApi
2835 */
2836export declare interface EventEmitter<T> extends Subject<T> {
2837 /**
2838 * Creates an instance of this class that can
2839 * deliver events synchronously or asynchronously.
2840 *
2841 * @param [isAsync=false] When true, deliver events asynchronously.
2842 *
2843 */
2844 new (isAsync?: boolean): EventEmitter<T>;
2845 /**
2846 * Emits an event containing a given value.
2847 * @param value The value to emit.
2848 */
2849 emit(value?: T): void;
2850 /**
2851 * Registers handlers for events emitted by this instance.
2852 * @param next When supplied, a custom handler for emitted events.
2853 * @param error When supplied, a custom handler for an error notification from this emitter.
2854 * @param complete When supplied, a custom handler for a completion notification from this
2855 * emitter.
2856 */
2857 subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Subscription;
2858 /**
2859 * Registers handlers for events emitted by this instance.
2860 * @param observerOrNext When supplied, a custom handler for emitted events, or an observer
2861 * object.
2862 * @param error When supplied, a custom handler for an error notification from this emitter.
2863 * @param complete When supplied, a custom handler for a completion notification from this
2864 * emitter.
2865 */
2866 subscribe(observerOrNext?: any, error?: any, complete?: any): Subscription;
2867}
2868
2869/**
2870 * @publicApi
2871 */
2872export declare const EventEmitter: {
2873 new (isAsync?: boolean): EventEmitter<any>;
2874 new <T>(isAsync?: boolean): EventEmitter<T>;
2875 readonly prototype: EventEmitter<any>;
2876};
2877
2878/**
2879 * Configures the `Injector` to return a value of another `useExisting` token.
2880 *
2881 * @see ["Dependency Injection Guide"](guide/dependency-injection).
2882 *
2883 * @usageNotes
2884 *
2885 * {@example core/di/ts/provider_spec.ts region='ExistingProvider'}
2886 *
2887 * ### Multi-value example
2888 *
2889 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
2890 *
2891 * @publicApi
2892 */
2893export declare interface ExistingProvider extends ExistingSansProvider {
2894 /**
2895 * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
2896 */
2897 provide: any;
2898 /**
2899 * When true, injector returns an array of instances. This is useful to allow multiple
2900 * providers spread across many files to provide configuration information to a common token.
2901 */
2902 multi?: boolean;
2903}
2904
2905/**
2906 * Configures the `Injector` to return a value of another `useExisting` token.
2907 *
2908 * @see `ExistingProvider`
2909 * @see ["Dependency Injection Guide"](guide/dependency-injection).
2910 *
2911 * @publicApi
2912 */
2913export declare interface ExistingSansProvider {
2914 /**
2915 * Existing `token` to return. (Equivalent to `injector.get(useExisting)`)
2916 */
2917 useExisting: any;
2918}
2919
2920/**
2921 * Definition of what a factory function should look like.
2922 */
2923declare type FactoryFn<T> = {
2924 /**
2925 * Subclasses without an explicit constructor call through to the factory of their base
2926 * definition, providing it with their own constructor to instantiate.
2927 */
2928 <U extends T>(t?: Type<U>): U;
2929 /**
2930 * If no constructor to instantiate is provided, an instance of type T itself is created.
2931 */
2932 (t?: undefined): T;
2933};
2934
2935/**
2936 * Configures the `Injector` to return a value by invoking a `useFactory` function.
2937 * @see ["Dependency Injection Guide"](guide/dependency-injection).
2938 *
2939 * @usageNotes
2940 *
2941 * {@example core/di/ts/provider_spec.ts region='FactoryProvider'}
2942 *
2943 * Dependencies can also be marked as optional:
2944 *
2945 * {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps'}
2946 *
2947 * ### Multi-value example
2948 *
2949 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
2950 *
2951 * @publicApi
2952 */
2953export declare interface FactoryProvider extends FactorySansProvider {
2954 /**
2955 * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
2956 */
2957 provide: any;
2958 /**
2959 * When true, injector returns an array of instances. This is useful to allow multiple
2960 * providers spread across many files to provide configuration information to a common token.
2961 */
2962 multi?: boolean;
2963}
2964
2965/**
2966 * Configures the `Injector` to return a value by invoking a `useFactory` function.
2967 *
2968 * @see `FactoryProvider`
2969 * @see ["Dependency Injection Guide"](guide/dependency-injection).
2970 *
2971 * @publicApi
2972 */
2973export declare interface FactorySansProvider {
2974 /**
2975 * A function to invoke to create a value for this `token`. The function is invoked with
2976 * resolved values of `token`s in the `deps` field.
2977 */
2978 useFactory: Function;
2979 /**
2980 * A list of `token`s to be resolved by the injector. The list of values is then
2981 * used as arguments to the `useFactory` function.
2982 */
2983 deps?: any[];
2984}
2985
2986declare const FLAGS = 2;
2987
2988/**
2989 * Allows to refer to references which are not yet defined.
2990 *
2991 * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
2992 * DI is declared, but not yet defined. It is also used when the `token` which we use when creating
2993 * a query is not yet defined.
2994 *
2995 * @usageNotes
2996 * ### Example
2997 * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
2998 * @publicApi
2999 */
3000export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
3001
3002/**
3003 * An interface that a function passed into {@link forwardRef} has to implement.
3004 *
3005 * @usageNotes
3006 * ### Example
3007 *
3008 * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}
3009 * @publicApi
3010 */
3011export declare interface ForwardRefFn {
3012 (): any;
3013}
3014
3015/**
3016 * @publicApi
3017 */
3018declare function getDebugNode(nativeNode: any): DebugNode | null;
3019export { getDebugNode }
3020export { getDebugNode as ɵgetDebugNode }
3021
3022/**
3023 * Returns the NgModuleFactory with the given id (specified using [@NgModule.id
3024 * field](api/core/NgModule#id)), if it exists and has been loaded. Factories for NgModules that do
3025 * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.
3026 * @publicApi
3027 * @deprecated Use `getNgModuleById` instead.
3028 */
3029export declare function getModuleFactory(id: string): NgModuleFactory<any>;
3030
3031/**
3032 * Returns the NgModule class with the given id (specified using [@NgModule.id
3033 * field](api/core/NgModule#id)), if it exists and has been loaded. Classes for NgModules that do
3034 * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.
3035 * @publicApi
3036 */
3037export declare function getNgModuleById<T>(id: string): Type<T>;
3038
3039/**
3040 * Returns the current platform.
3041 *
3042 * @publicApi
3043 */
3044export declare function getPlatform(): PlatformRef | null;
3045
3046/**
3047 * Adapter interface for retrieving the `Testability` service associated for a
3048 * particular context.
3049 *
3050 * @publicApi
3051 */
3052export declare interface GetTestability {
3053 addToWindow(registry: TestabilityRegistry): void;
3054 findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability | null;
3055}
3056
3057/**
3058 * The goal here is to make sure that the browser DOM API is the Renderer.
3059 * We do this by defining a subset of DOM API to be the renderer and then
3060 * use that at runtime for rendering.
3061 *
3062 * At runtime we can then use the DOM api directly, in server or web-worker
3063 * it will be easy to implement such API.
3064 */
3065declare type GlobalTargetName = 'document' | 'window' | 'body';
3066
3067declare type GlobalTargetResolver = (element: any) => EventTarget;
3068
3069/**
3070 * Flag to signify that this `LContainer` may have transplanted views which need to be change
3071 * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.
3072 *
3073 * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip
3074 * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify
3075 * that the `MOVED_VIEWS` are transplanted and on-push.
3076 */
3077declare const HAS_TRANSPLANTED_VIEWS = 2;
3078
3079/**
3080 * Array of hooks that should be executed for a view and their directive indices.
3081 *
3082 * For each node of the view, the following data is stored:
3083 * 1) Node index (optional)
3084 * 2) A series of number/function pairs where:
3085 * - even indices are directive indices
3086 * - odd indices are hook functions
3087 *
3088 * Special cases:
3089 * - a negative directive index flags an init hook (ngOnInit, ngAfterContentInit, ngAfterViewInit)
3090 */
3091declare type HookData = HookEntry[];
3092
3093/**
3094 * Information necessary to call a hook. E.g. the callback that
3095 * needs to invoked and the index at which to find its context.
3096 */
3097declare type HookEntry = number | HookFn;
3098
3099/** Single hook callback function. */
3100declare type HookFn = () => void;
3101
3102declare const HOST = 0;
3103
3104/**
3105 * Type of the Host metadata.
3106 *
3107 * @publicApi
3108 */
3109export declare interface Host {
3110}
3111
3112/**
3113 * Host decorator and metadata.
3114 *
3115 * @Annotation
3116 * @publicApi
3117 */
3118export declare const Host: HostDecorator;
3119
3120/**
3121 * Type of the HostBinding metadata.
3122 *
3123 * @publicApi
3124 */
3125export declare interface HostBinding {
3126 /**
3127 * The DOM property that is bound to a data property.
3128 */
3129 hostPropertyName?: string;
3130}
3131
3132/**
3133 * @Annotation
3134 * @publicApi
3135 */
3136export declare const HostBinding: HostBindingDecorator;
3137
3138/**
3139 * Type of the HostBinding decorator / constructor function.
3140 *
3141 * @publicApi
3142 */
3143export declare interface HostBindingDecorator {
3144 /**
3145 * Decorator that marks a DOM property as a host-binding property and supplies configuration
3146 * metadata.
3147 * Angular automatically checks host property bindings during change detection, and
3148 * if a binding changes it updates the host element of the directive.
3149 *
3150 * @usageNotes
3151 *
3152 * The following example creates a directive that sets the `valid` and `invalid`
3153 * properties on the DOM element that has an `ngModel` directive on it.
3154 *
3155 * ```typescript
3156 * @Directive({selector: '[ngModel]'})
3157 * class NgModelStatus {
3158 * constructor(public control: NgModel) {}
3159 * @HostBinding('class.valid') get valid() { return this.control.valid; }
3160 * @HostBinding('class.invalid') get invalid() { return this.control.invalid; }
3161 * }
3162 *
3163 * @Component({
3164 * selector: 'app',
3165 * template: `<input [(ngModel)]="prop">`,
3166 * })
3167 * class App {
3168 * prop;
3169 * }
3170 * ```
3171 *
3172 */
3173 (hostPropertyName?: string): any;
3174 new (hostPropertyName?: string): any;
3175}
3176
3177/**
3178 * Stores a set of OpCodes to process `HostBindingsFunction` associated with a current view.
3179 *
3180 * In order to invoke `HostBindingsFunction` we need:
3181 * 1. 'elementIdx`: Index to the element associated with the `HostBindingsFunction`.
3182 * 2. 'directiveIdx`: Index to the directive associated with the `HostBindingsFunction`. (This will
3183 * become the context for the `HostBindingsFunction` invocation.)
3184 * 3. `bindingRootIdx`: Location where the bindings for the `HostBindingsFunction` start. Internally
3185 * `HostBindingsFunction` binding indexes start from `0` so we need to add `bindingRootIdx` to
3186 * it.
3187 * 4. `HostBindingsFunction`: A host binding function to execute.
3188 *
3189 * The above information needs to be encoded into the `HostBindingOpCodes` in an efficient manner.
3190 *
3191 * 1. `elementIdx` is encoded into the `HostBindingOpCodes` as `~elementIdx` (so a negative number);
3192 * 2. `directiveIdx`
3193 * 3. `bindingRootIdx`
3194 * 4. `HostBindingsFunction` is passed in as is.
3195 *
3196 * The `HostBindingOpCodes` array contains:
3197 * - negative number to select the element index.
3198 * - followed by 1 or more of:
3199 * - a number to select the directive index
3200 * - a number to select the bindingRoot index
3201 * - and a function to invoke.
3202 *
3203 * ## Example
3204 *
3205 * ```
3206 * const hostBindingOpCodes = [
3207 * ~30, // Select element 30
3208 * 40, 45, MyDir.ɵdir.hostBindings // Invoke host bindings on MyDir on element 30;
3209 * // directiveIdx = 40; bindingRootIdx = 45;
3210 * 50, 55, OtherDir.ɵdir.hostBindings // Invoke host bindings on OtherDire on element 30
3211 * // directiveIdx = 50; bindingRootIdx = 55;
3212 * ]
3213 * ```
3214 *
3215 * ## Pseudocode
3216 * ```
3217 * const hostBindingOpCodes = tView.hostBindingOpCodes;
3218 * if (hostBindingOpCodes === null) return;
3219 * for (let i = 0; i < hostBindingOpCodes.length; i++) {
3220 * const opCode = hostBindingOpCodes[i] as number;
3221 * if (opCode < 0) {
3222 * // Negative numbers are element indexes.
3223 * setSelectedIndex(~opCode);
3224 * } else {
3225 * // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.
3226 * const directiveIdx = opCode;
3227 * const bindingRootIndx = hostBindingOpCodes[++i] as number;
3228 * const hostBindingFn = hostBindingOpCodes[++i] as HostBindingsFunction<any>;
3229 * setBindingRootForHostBindings(bindingRootIndx, directiveIdx);
3230 * const context = lView[directiveIdx];
3231 * hostBindingFn(RenderFlags.Update, context);
3232 * }
3233 * }
3234 * ```
3235 *
3236 */
3237declare interface HostBindingOpCodes extends Array<number | HostBindingsFunction<any>> {
3238 __brand__: 'HostBindingOpCodes';
3239 debug?: string[];
3240}
3241
3242declare type HostBindingsFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U) => void;
3243
3244/**
3245 * Type of the `Host` decorator / constructor function.
3246 *
3247 * @publicApi
3248 */
3249export declare interface HostDecorator {
3250 /**
3251 * Parameter decorator on a view-provider parameter of a class constructor
3252 * that tells the DI framework to resolve the view by checking injectors of child
3253 * elements, and stop when reaching the host element of the current component.
3254 *
3255 * @usageNotes
3256 *
3257 * The following shows use with the `@Optional` decorator, and allows for a `null` result.
3258 *
3259 * <code-example path="core/di/ts/metadata_spec.ts" region="Host">
3260 * </code-example>
3261 *
3262 * For an extended example, see ["Dependency Injection
3263 * Guide"](guide/dependency-injection-in-action#optional).
3264 */
3265 (): any;
3266 new (): Host;
3267}
3268
3269/**
3270 * Mapping between the public aliases of directive bindings and the underlying inputs/outputs that
3271 * they represent. Also serves as an allowlist of the inputs/outputs from the host directive that
3272 * the author has decided to expose.
3273 */
3274declare type HostDirectiveBindingMap = {
3275 [publicName: string]: string;
3276};
3277
3278/** Values that can be used to define a host directive through the `HostDirectivesFeature`. */
3279declare type HostDirectiveConfig = Type<unknown> | {
3280 directive: Type<unknown>;
3281 inputs?: string[];
3282 outputs?: string[];
3283};
3284
3285/** Runtime information used to configure a host directive. */
3286declare interface HostDirectiveDef<T = unknown> {
3287 /** Class representing the host directive. */
3288 directive: Type<T>;
3289 /** Directive inputs that have been exposed. */
3290 inputs: HostDirectiveBindingMap;
3291 /** Directive outputs that have been exposed. */
3292 outputs: HostDirectiveBindingMap;
3293}
3294
3295/**
3296 * Mapping between a directive that was used as a host directive
3297 * and the configuration that was used to define it as such.
3298 */
3299declare type HostDirectiveDefs = Map<ɵDirectiveDef<unknown>, HostDirectiveDef>;
3300
3301/**
3302 * Type of the HostListener metadata.
3303 *
3304 * @publicApi
3305 */
3306export declare interface HostListener {
3307 /**
3308 * The DOM event to listen for.
3309 */
3310 eventName?: string;
3311 /**
3312 * A set of arguments to pass to the handler method when the event occurs.
3313 */
3314 args?: string[];
3315}
3316
3317/**
3318 * Decorator that binds a DOM event to a host listener and supplies configuration metadata.
3319 * Angular invokes the supplied handler method when the host element emits the specified event,
3320 * and updates the bound element with the result.
3321 *
3322 * If the handler method returns false, applies `preventDefault` on the bound element.
3323 *
3324 * @usageNotes
3325 *
3326 * The following example declares a directive
3327 * that attaches a click listener to a button and counts clicks.
3328 *
3329 * ```ts
3330 * @Directive({selector: 'button[counting]'})
3331 * class CountClicks {
3332 * numberOfClicks = 0;
3333 *
3334 * @HostListener('click', ['$event.target'])
3335 * onClick(btn) {
3336 * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);
3337 * }
3338 * }
3339 *
3340 * @Component({
3341 * selector: 'app',
3342 * template: '<button counting>Increment</button>',
3343 * })
3344 * class App {}
3345 *
3346 * ```
3347 *
3348 * The following example registers another DOM event handler that listens for `Enter` key-press
3349 * events on the global `window`.
3350 * ``` ts
3351 * import { HostListener, Component } from "@angular/core";
3352 *
3353 * @Component({
3354 * selector: 'app',
3355 * template: `<h1>Hello, you have pressed enter {{counter}} number of times!</h1> Press enter key
3356 * to increment the counter.
3357 * <button (click)="resetCounter()">Reset Counter</button>`
3358 * })
3359 * class AppComponent {
3360 * counter = 0;
3361 * @HostListener('window:keydown.enter', ['$event'])
3362 * handleKeyDown(event: KeyboardEvent) {
3363 * this.counter++;
3364 * }
3365 * resetCounter() {
3366 * this.counter = 0;
3367 * }
3368 * }
3369 * ```
3370 * The list of valid key names for `keydown` and `keyup` events
3371 * can be found here:
3372 * https://www.w3.org/TR/DOM-Level-3-Events-key/#named-key-attribute-values
3373 *
3374 * Note that keys can also be combined, e.g. `@HostListener('keydown.shift.a')`.
3375 *
3376 * The global target names that can be used to prefix an event name are
3377 * `document:`, `window:` and `body:`.
3378 *
3379 * @Annotation
3380 * @publicApi
3381 */
3382export declare const HostListener: HostListenerDecorator;
3383
3384/**
3385 * Type of the HostListener decorator / constructor function.
3386 *
3387 * @publicApi
3388 */
3389export declare interface HostListenerDecorator {
3390 /**
3391 * Decorator that declares a DOM event to listen for,
3392 * and provides a handler method to run when that event occurs.
3393 *
3394 * Angular invokes the supplied handler method when the host element emits the specified event,
3395 * and updates the bound element with the result.
3396 *
3397 * If the handler method returns false, applies `preventDefault` on the bound element.
3398 */
3399 (eventName: string, args?: string[]): any;
3400 new (eventName: string, args?: string[]): any;
3401}
3402
3403declare namespace i0 {
3404 export {
3405 ɵɵinject,
3406 ɵɵdefineInjectable,
3407 ɵɵdefineInjector,
3408 ɵɵInjectableDeclaration,
3409 ɵNgModuleDef as NgModuleDef,
3410 ɵɵdefineNgModule,
3411 ɵɵFactoryDeclaration,
3412 ɵɵInjectorDeclaration,
3413 ɵɵNgModuleDeclaration,
3414 ɵsetClassMetadata as setClassMetadata,
3415 ɵNgModuleFactory as NgModuleFactory,
3416 ɵnoSideEffects,
3417 ITS_JUST_ANGULAR
3418 }
3419}
3420
3421/**
3422 * Array storing OpCode for dynamically creating `i18n` translation DOM elements.
3423 *
3424 * This array creates a sequence of `Text` and `Comment` (as ICU anchor) DOM elements. It consists
3425 * of a pair of `number` and `string` pairs which encode the operations for the creation of the
3426 * translated block.
3427 *
3428 * The number is shifted and encoded according to `I18nCreateOpCode`
3429 *
3430 * Pseudocode:
3431 * ```
3432 * const i18nCreateOpCodes = [
3433 * 10 << I18nCreateOpCode.SHIFT, "Text Node add to DOM",
3434 * 11 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.COMMENT, "Comment Node add to DOM",
3435 * 12 << I18nCreateOpCode.SHIFT | I18nCreateOpCode.APPEND_LATER, "Text Node added later"
3436 * ];
3437 *
3438 * for(var i=0; i<i18nCreateOpCodes.length; i++) {
3439 * const opcode = i18NCreateOpCodes[i++];
3440 * const index = opcode >> I18nCreateOpCode.SHIFT;
3441 * const text = i18NCreateOpCodes[i];
3442 * let node: Text|Comment;
3443 * if (opcode & I18nCreateOpCode.COMMENT === I18nCreateOpCode.COMMENT) {
3444 * node = lView[~index] = document.createComment(text);
3445 * } else {
3446 * node = lView[index] = document.createText(text);
3447 * }
3448 * if (opcode & I18nCreateOpCode.APPEND_EAGERLY !== I18nCreateOpCode.APPEND_EAGERLY) {
3449 * parentNode.appendChild(node);
3450 * }
3451 * }
3452 * ```
3453 */
3454declare interface I18nCreateOpCodes extends Array<number | string>, I18nDebug {
3455 __brand__: 'I18nCreateOpCodes';
3456}
3457
3458declare interface I18nDebug {
3459 /**
3460 * Human readable representation of the OpCode arrays.
3461 *
3462 * NOTE: This property only exists if `ngDevMode` is set to `true` and it is not present in
3463 * production. Its presence is purely to help debug issue in development, and should not be relied
3464 * on in production application.
3465 */
3466 debug?: string[];
3467}
3468
3469/**
3470 * Stores a list of nodes which need to be removed.
3471 *
3472 * Numbers are indexes into the `LView`
3473 * - index > 0: `removeRNode(lView[0])`
3474 * - index < 0: `removeICU(~lView[0])`
3475 */
3476declare interface I18nRemoveOpCodes extends Array<number> {
3477 __brand__: 'I18nRemoveOpCodes';
3478}
3479
3480/**
3481 * Stores DOM operations which need to be applied to update DOM render tree due to changes in
3482 * expressions.
3483 *
3484 * The basic idea is that `i18nExp` OpCodes capture expression changes and update a change
3485 * mask bit. (Bit 1 for expression 1, bit 2 for expression 2 etc..., bit 32 for expression 32 and
3486 * higher.) The OpCodes then compare its own change mask against the expression change mask to
3487 * determine if the OpCodes should execute.
3488 *
3489 * NOTE: 32nd bit is special as it says 32nd or higher. This way if we have more than 32 bindings
3490 * the code still works, but with lower efficiency. (it is unlikely that a translation would have
3491 * more than 32 bindings.)
3492 *
3493 * These OpCodes can be used by both the i18n block as well as ICU sub-block.
3494 *
3495 * ## Example
3496 *
3497 * Assume
3498 * ```ts
3499 * if (rf & RenderFlags.Update) {
3500 * i18nExp(ctx.exp1); // If changed set mask bit 1
3501 * i18nExp(ctx.exp2); // If changed set mask bit 2
3502 * i18nExp(ctx.exp3); // If changed set mask bit 3
3503 * i18nExp(ctx.exp4); // If changed set mask bit 4
3504 * i18nApply(0); // Apply all changes by executing the OpCodes.
3505 * }
3506 * ```
3507 * We can assume that each call to `i18nExp` sets an internal `changeMask` bit depending on the
3508 * index of `i18nExp`.
3509 *
3510 * ### OpCodes
3511 * ```ts
3512 * <I18nUpdateOpCodes>[
3513 * // The following OpCodes represent: `<div i18n-title="pre{{exp1}}in{{exp2}}post">`
3514 * // If `changeMask & 0b11`
3515 * // has changed then execute update OpCodes.
3516 * // has NOT changed then skip `8` values and start processing next OpCodes.
3517 * 0b11, 8,
3518 * // Concatenate `newValue = 'pre'+lView[bindIndex-4]+'in'+lView[bindIndex-3]+'post';`.
3519 * 'pre', -4, 'in', -3, 'post',
3520 * // Update attribute: `elementAttribute(1, 'title', sanitizerFn(newValue));`
3521 * 1 << SHIFT_REF | Attr, 'title', sanitizerFn,
3522 *
3523 * // The following OpCodes represent: `<div i18n>Hello {{exp3}}!">`
3524 * // If `changeMask & 0b100`
3525 * // has changed then execute update OpCodes.
3526 * // has NOT changed then skip `4` values and start processing next OpCodes.
3527 * 0b100, 4,
3528 * // Concatenate `newValue = 'Hello ' + lView[bindIndex -2] + '!';`.
3529 * 'Hello ', -2, '!',
3530 * // Update text: `lView[1].textContent = newValue;`
3531 * 1 << SHIFT_REF | Text,
3532 *
3533 * // The following OpCodes represent: `<div i18n>{exp4, plural, ... }">`
3534 * // If `changeMask & 0b1000`
3535 * // has changed then execute update OpCodes.
3536 * // has NOT changed then skip `2` values and start processing next OpCodes.
3537 * 0b1000, 2,
3538 * // Concatenate `newValue = lView[bindIndex -1];`.
3539 * -1,
3540 * // Switch ICU: `icuSwitchCase(lView[1], 0, newValue);`
3541 * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuSwitch,
3542 *
3543 * // Note `changeMask & -1` is always true, so the IcuUpdate will always execute.
3544 * -1, 1,
3545 * // Update ICU: `icuUpdateCase(lView[1], 0);`
3546 * 0 << SHIFT_ICU | 1 << SHIFT_REF | IcuUpdate,
3547 *
3548 * ];
3549 * ```
3550 *
3551 */
3552declare interface I18nUpdateOpCodes extends Array<string | number | SanitizerFn | null>, I18nDebug {
3553 __brand__: 'I18nUpdateOpCodes';
3554}
3555
3556/**
3557 * Marks that the next string is comment text need for ICU.
3558 *
3559 * See `I18nMutateOpCodes` documentation.
3560 */
3561declare const ICU_MARKER: ICU_MARKER;
3562
3563declare interface ICU_MARKER {
3564 marker: 'ICU';
3565}
3566
3567/**
3568 * Array storing OpCode for dynamically creating `i18n` blocks.
3569 *
3570 * Example:
3571 * ```ts
3572 * <I18nCreateOpCode>[
3573 * // For adding text nodes
3574 * // ---------------------
3575 * // Equivalent to:
3576 * // lView[1].appendChild(lView[0] = document.createTextNode('xyz'));
3577 * 'xyz', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
3578 *
3579 * // For adding element nodes
3580 * // ---------------------
3581 * // Equivalent to:
3582 * // lView[1].appendChild(lView[0] = document.createElement('div'));
3583 * ELEMENT_MARKER, 'div', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
3584 *
3585 * // For adding comment nodes
3586 * // ---------------------
3587 * // Equivalent to:
3588 * // lView[1].appendChild(lView[0] = document.createComment(''));
3589 * ICU_MARKER, '', 0, 1 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
3590 *
3591 * // For moving existing nodes to a different location
3592 * // --------------------------------------------------
3593 * // Equivalent to:
3594 * // const node = lView[1];
3595 * // lView[2].appendChild(node);
3596 * 1 << SHIFT_REF | Select, 2 << SHIFT_PARENT | 0 << SHIFT_REF | AppendChild,
3597 *
3598 * // For removing existing nodes
3599 * // --------------------------------------------------
3600 * // const node = lView[1];
3601 * // removeChild(tView.data(1), node, lView);
3602 * 1 << SHIFT_REF | Remove,
3603 *
3604 * // For writing attributes
3605 * // --------------------------------------------------
3606 * // const node = lView[1];
3607 * // node.setAttribute('attr', 'value');
3608 * 1 << SHIFT_REF | Attr, 'attr', 'value'
3609 * ];
3610 * ```
3611 */
3612declare interface IcuCreateOpCodes extends Array<number | string | ELEMENT_MARKER | ICU_MARKER | null>, I18nDebug {
3613 __brand__: 'I18nCreateOpCodes';
3614}
3615
3616/**
3617 * Defines the ICU type of `select` or `plural`
3618 */
3619declare const enum IcuType {
3620 select = 0,
3621 plural = 1
3622}
3623
3624declare const ID = 20;
3625
3626/**
3627 * Providers that were imported from NgModules via the `importProvidersFrom` function.
3628 *
3629 * These providers are meant for use in an application injector (or other environment injectors) and
3630 * should not be used in component injectors.
3631 *
3632 * This type cannot be directly implemented. It's returned from the `importProvidersFrom` function
3633 * and serves to prevent the extracted NgModule providers from being used in the wrong contexts.
3634 *
3635 * @see `importProvidersFrom`
3636 *
3637 * @publicApi
3638 * @deprecated replaced by `EnvironmentProviders`
3639 */
3640export declare type ImportedNgModuleProviders = EnvironmentProviders;
3641
3642/**
3643 * Collects providers from all NgModules and standalone components, including transitively imported
3644 * ones.
3645 *
3646 * Providers extracted via `importProvidersFrom` are only usable in an application injector or
3647 * another environment injector (such as a route injector). They should not be used in component
3648 * providers.
3649 *
3650 * More information about standalone components can be found in [this
3651 * guide](guide/standalone-components).
3652 *
3653 * @usageNotes
3654 * The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:
3655 *
3656 * ```typescript
3657 * await bootstrapApplication(RootComponent, {
3658 * providers: [
3659 * importProvidersFrom(NgModuleOne, NgModuleTwo)
3660 * ]
3661 * });
3662 * ```
3663 *
3664 * You can also use the `importProvidersFrom` results in the `providers` field of a route, when a
3665 * standalone component is used:
3666 *
3667 * ```typescript
3668 * export const ROUTES: Route[] = [
3669 * {
3670 * path: 'foo',
3671 * providers: [
3672 * importProvidersFrom(NgModuleOne, NgModuleTwo)
3673 * ],
3674 * component: YourStandaloneComponent
3675 * }
3676 * ];
3677 * ```
3678 *
3679 * @returns Collected providers from the specified list of types.
3680 * @publicApi
3681 */
3682export declare function importProvidersFrom(...sources: ImportProvidersSource[]): EnvironmentProviders;
3683
3684/**
3685 * A source of providers for the `importProvidersFrom` function.
3686 *
3687 * @publicApi
3688 */
3689export declare type ImportProvidersSource = Type<unknown> | ModuleWithProviders<unknown> | Array<ImportProvidersSource>;
3690
3691/**
3692 * This array contains information about input properties that
3693 * need to be set once from attribute data. It's ordered by
3694 * directive index (relative to element) so it's simple to
3695 * look up a specific directive's initial input data.
3696 *
3697 * Within each sub-array:
3698 *
3699 * i+0: attribute name
3700 * i+1: minified/internal input name
3701 * i+2: initial value
3702 *
3703 * If a directive on a node does not have any input properties
3704 * that should be set from attributes, its index is set to null
3705 * to avoid a sparse array.
3706 *
3707 * e.g. [null, ['role-min', 'minified-input', 'button']]
3708 */
3709declare type InitialInputData = (InitialInputs | null)[];
3710
3711/**
3712 * Used by InitialInputData to store input properties
3713 * that should be set once from attributes.
3714 *
3715 * i+0: attribute name
3716 * i+1: minified/internal input name
3717 * i+2: initial value
3718 *
3719 * e.g. ['role-min', 'minified-input', 'button']
3720 */
3721declare type InitialInputs = string[];
3722
3723/**
3724 * Type of the Inject metadata.
3725 *
3726 * @publicApi
3727 */
3728export declare interface Inject {
3729 /**
3730 * A [DI token](guide/glossary#di-token) that maps to the dependency to be injected.
3731 */
3732 token: any;
3733}
3734
3735/**
3736 * Inject decorator and metadata.
3737 *
3738 * @Annotation
3739 * @publicApi
3740 */
3741export declare const Inject: InjectDecorator;
3742
3743/**
3744 * @param token A token that represents a dependency that should be injected.
3745 * @returns the injected value if operation is successful, `null` otherwise.
3746 * @throws if called outside of a supported context.
3747 *
3748 * @publicApi
3749 */
3750export declare function inject<T>(token: ProviderToken<T>): T;
3751
3752/**
3753 * @param token A token that represents a dependency that should be injected.
3754 * @param flags Control how injection is executed. The flags correspond to injection strategies that
3755 * can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and `@Optional`.
3756 * @returns the injected value if operation is successful, `null` otherwise.
3757 * @throws if called outside of a supported context.
3758 *
3759 * @publicApi
3760 * @deprecated prefer an options object instead of `InjectFlags`
3761 */
3762export declare function inject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
3763
3764/**
3765 * @param token A token that represents a dependency that should be injected.
3766 * @param options Control how injection is executed. Options correspond to injection strategies
3767 * that can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and
3768 * `@Optional`.
3769 * @returns the injected value if operation is successful.
3770 * @throws if called outside of a supported context, or if the token is not found.
3771 *
3772 * @publicApi
3773 */
3774export declare function inject<T>(token: ProviderToken<T>, options: InjectOptions & {
3775 optional?: false;
3776}): T;
3777
3778/**
3779 * @param token A token that represents a dependency that should be injected.
3780 * @param options Control how injection is executed. Options correspond to injection strategies
3781 * that can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and
3782 * `@Optional`.
3783 * @returns the injected value if operation is successful, `null` if the token is not
3784 * found and optional injection has been requested.
3785 * @throws if called outside of a supported context, or if the token is not found and optional
3786 * injection was not requested.
3787 *
3788 * @publicApi
3789 */
3790export declare function inject<T>(token: ProviderToken<T>, options: InjectOptions): T | null;
3791
3792/**
3793 * Type of the Injectable metadata.
3794 *
3795 * @publicApi
3796 */
3797export declare interface Injectable {
3798 /**
3799 * Determines which injectors will provide the injectable.
3800 *
3801 * - `Type<any>` - associates the injectable with an `@NgModule` or other `InjectorType`. This
3802 * option is DEPRECATED.
3803 * - 'null' : Equivalent to `undefined`. The injectable is not provided in any scope automatically
3804 * and must be added to a `providers` array of an [@NgModule](api/core/NgModule#providers),
3805 * [@Component](api/core/Directive#providers) or [@Directive](api/core/Directive#providers).
3806 *
3807 * The following options specify that this injectable should be provided in one of the following
3808 * injectors:
3809 * - 'root' : The application-level injector in most apps.
3810 * - 'platform' : A special singleton platform injector shared by all
3811 * applications on the page.
3812 * - 'any' : Provides a unique instance in each lazy loaded module while all eagerly loaded
3813 * modules share one instance. This option is DEPRECATED.
3814 *
3815 */
3816 providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
3817}
3818
3819/**
3820 * Injectable decorator and metadata.
3821 *
3822 * @Annotation
3823 * @publicApi
3824 */
3825export declare const Injectable: InjectableDecorator;
3826
3827/**
3828 * Type of the Injectable decorator / constructor function.
3829 *
3830 * @publicApi
3831 */
3832export declare interface InjectableDecorator {
3833 /**
3834 * Decorator that marks a class as available to be
3835 * provided and injected as a dependency.
3836 *
3837 * @see [Introduction to Services and DI](guide/architecture-services)
3838 * @see [Dependency Injection Guide](guide/dependency-injection)
3839 *
3840 * @usageNotes
3841 *
3842 * Marking a class with `@Injectable` ensures that the compiler
3843 * will generate the necessary metadata to create the class's
3844 * dependencies when the class is injected.
3845 *
3846 * The following example shows how a service class is properly
3847 * marked so that a supporting service can be injected upon creation.
3848 *
3849 * <code-example path="core/di/ts/metadata_spec.ts" region="Injectable"></code-example>
3850 *
3851 */
3852 (): TypeDecorator;
3853 (options?: {
3854 providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
3855 } & InjectableProvider): TypeDecorator;
3856 new (): Injectable;
3857 new (options?: {
3858 providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
3859 } & InjectableProvider): Injectable;
3860}
3861
3862/**
3863 * Injectable providers used in `@Injectable` decorator.
3864 *
3865 * @publicApi
3866 */
3867export declare type InjectableProvider = ValueSansProvider | ExistingSansProvider | StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider;
3868
3869/**
3870 * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.
3871 *
3872 * `InjectableType`s contain their own Dependency Injection metadata and are usable in an
3873 * `InjectorDef`-based `StaticInjector`.
3874 *
3875 * @publicApi
3876 */
3877export declare interface InjectableType<T> extends Type<T> {
3878 /**
3879 * Opaque type whose structure is highly version dependent. Do not rely on any properties.
3880 */
3881 ɵprov: unknown;
3882}
3883
3884
3885/**
3886 * Type of the Inject decorator / constructor function.
3887 *
3888 * @publicApi
3889 */
3890export declare interface InjectDecorator {
3891 /**
3892 * Parameter decorator on a dependency parameter of a class constructor
3893 * that specifies a custom provider of the dependency.
3894 *
3895 * @usageNotes
3896 * The following example shows a class constructor that specifies a
3897 * custom provider of a dependency using the parameter decorator.
3898 *
3899 * When `@Inject()` is not present, the injector uses the type annotation of the
3900 * parameter as the provider.
3901 *
3902 * <code-example path="core/di/ts/metadata_spec.ts" region="InjectWithoutDecorator">
3903 * </code-example>
3904 *
3905 * @see ["Dependency Injection Guide"](guide/dependency-injection)
3906 *
3907 */
3908 (token: any): any;
3909 new (token: any): Inject;
3910}
3911
3912/**
3913 * Injection flags for DI.
3914 *
3915 * @publicApi
3916 * @deprecated use an options object for `inject` instead.
3917 */
3918export declare enum InjectFlags {
3919 /** Check self and check parent injector if needed */
3920 Default = 0,
3921 /**
3922 * Specifies that an injector should retrieve a dependency from any injector until reaching the
3923 * host element of the current component. (Only used with Element Injector)
3924 */
3925 Host = 1,
3926 /** Don't ascend to ancestors of the node requesting injection. */
3927 Self = 2,
3928 /** Skip the node that is requesting injection. */
3929 SkipSelf = 4,
3930 /** Inject `defaultValue` instead if token not found. */
3931 Optional = 8
3932}
3933
3934/**
3935 * Creates a token that can be used in a DI Provider.
3936 *
3937 * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a
3938 * runtime representation) such as when injecting an interface, callable type, array or
3939 * parameterized type.
3940 *
3941 * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
3942 * the `Injector`. This provides an additional level of type safety.
3943 *
3944 * ```
3945 * interface MyInterface {...}
3946 * const myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));
3947 * // myInterface is inferred to be MyInterface.
3948 * ```
3949 *
3950 * When creating an `InjectionToken`, you can optionally specify a factory function which returns
3951 * (possibly by creating) a default value of the parameterized type `T`. This sets up the
3952 * `InjectionToken` using this factory as a provider as if it was defined explicitly in the
3953 * application's root injector. If the factory function, which takes zero arguments, needs to inject
3954 * dependencies, it can do so using the `inject` function.
3955 * As you can see in the Tree-shakable InjectionToken example below.
3956 *
3957 * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which
3958 * overrides the above behavior and marks the token as belonging to a particular `@NgModule` (note:
3959 * this option is now deprecated). As mentioned above, `'root'` is the default value for
3960 * `providedIn`.
3961 *
3962 * The `providedIn: NgModule` and `providedIn: 'any'` options are deprecated.
3963 *
3964 * @usageNotes
3965 * ### Basic Examples
3966 *
3967 * ### Plain InjectionToken
3968 *
3969 * {@example core/di/ts/injector_spec.ts region='InjectionToken'}
3970 *
3971 * ### Tree-shakable InjectionToken
3972 *
3973 * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
3974 *
3975 *
3976 * @publicApi
3977 */
3978export declare class InjectionToken<T> {
3979 protected _desc: string;
3980 readonly ɵprov: unknown;
3981 /**
3982 * @param _desc Description for the token,
3983 * used only for debugging purposes,
3984 * it should but does not need to be unique
3985 * @param options Options for the token's usage, as described above
3986 */
3987 constructor(_desc: string, options?: {
3988 providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
3989 factory: () => T;
3990 });
3991 toString(): string;
3992}
3993
3994/**
3995 * Type of the options argument to `inject`.
3996 *
3997 * @publicApi
3998 */
3999export declare interface InjectOptions {
4000 /**
4001 * Use optional injection, and return `null` if the requested token is not found.
4002 */
4003 optional?: boolean;
4004 /**
4005 * Start injection at the parent of the current injector.
4006 */
4007 skipSelf?: boolean;
4008 /**
4009 * Only query the current injector for the token, and don't fall back to the parent injector if
4010 * it's not found.
4011 */
4012 self?: boolean;
4013 /**
4014 * Stop injection at the host component's injector. Only relevant when injecting from an element
4015 * injector, and a no-op for environment injectors.
4016 */
4017 host?: boolean;
4018}
4019
4020/**
4021 * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.
4022 *
4023 * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a
4024 * project.
4025 *
4026 * @publicApi
4027 */
4028export declare const INJECTOR: InjectionToken<Injector>;
4029
4030/**
4031 * Concrete injectors implement this interface. Injectors are configured
4032 * with [providers](guide/glossary#provider) that associate
4033 * dependencies of various types with [injection tokens](guide/glossary#di-token).
4034 *
4035 * @see ["DI Providers"](guide/dependency-injection-providers).
4036 * @see `StaticProvider`
4037 *
4038 * @usageNotes
4039 *
4040 * The following example creates a service injector instance.
4041 *
4042 * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
4043 *
4044 * ### Usage example
4045 *
4046 * {@example core/di/ts/injector_spec.ts region='Injector'}
4047 *
4048 * `Injector` returns itself when given `Injector` as a token:
4049 *
4050 * {@example core/di/ts/injector_spec.ts region='injectInjector'}
4051 *
4052 * @publicApi
4053 */
4054export declare abstract class Injector {
4055 static THROW_IF_NOT_FOUND: {};
4056 static NULL: Injector;
4057 /**
4058 * Internal note on the `options?: InjectOptions|InjectFlags` override of the `get`
4059 * method: consider dropping the `InjectFlags` part in one of the major versions.
4060 * It can **not** be done in minor/patch, since it's breaking for custom injectors
4061 * that only implement the old `InjectorFlags` interface.
4062 */
4063 /**
4064 * Retrieves an instance from the injector based on the provided token.
4065 * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
4066 * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
4067 */
4068 abstract get<T>(token: ProviderToken<T>, notFoundValue: undefined, options: InjectOptions & {
4069 optional?: false;
4070 }): T;
4071 /**
4072 * Retrieves an instance from the injector based on the provided token.
4073 * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
4074 * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
4075 */
4076 abstract get<T>(token: ProviderToken<T>, notFoundValue: null | undefined, options: InjectOptions): T | null;
4077 /**
4078 * Retrieves an instance from the injector based on the provided token.
4079 * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
4080 * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
4081 */
4082 abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions | InjectFlags): T;
4083 /**
4084 * Retrieves an instance from the injector based on the provided token.
4085 * @returns The instance from the injector if defined, otherwise the `notFoundValue`.
4086 * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
4087 * @deprecated use object-based flags (`InjectOptions`) instead.
4088 */
4089 abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
4090 /**
4091 * @deprecated from v4.0.0 use ProviderToken<T>
4092 * @suppress {duplicate}
4093 */
4094 abstract get(token: any, notFoundValue?: any): any;
4095 /**
4096 * @deprecated from v5 use the new signature Injector.create(options)
4097 */
4098 static create(providers: StaticProvider[], parent?: Injector): Injector;
4099 /**
4100 * Creates a new injector instance that provides one or more dependencies,
4101 * according to a given type or types of `StaticProvider`.
4102 *
4103 * @param options An object with the following properties:
4104 * * `providers`: An array of providers of the [StaticProvider type](api/core/StaticProvider).
4105 * * `parent`: (optional) A parent injector.
4106 * * `name`: (optional) A developer-defined identifying name for the new injector.
4107 *
4108 * @returns The new injector instance.
4109 *
4110 */
4111 static create(options: {
4112 providers: StaticProvider[];
4113 parent?: Injector;
4114 name?: string;
4115 }): Injector;
4116 /** @nocollapse */
4117 static ɵprov: unknown;
4118}
4119
4120declare const INJECTOR_2 = 9;
4121
4122declare type InjectorScope = 'root' | 'platform' | 'environment';
4123
4124/**
4125 * A type which has an `InjectorDef` static field.
4126 *
4127 * `InjectorTypes` can be used to configure a `StaticInjector`.
4128 *
4129 * This is an opaque type whose structure is highly version dependent. Do not rely on any
4130 * properties.
4131 *
4132 * @publicApi
4133 */
4134export declare interface InjectorType<T> extends Type<T> {
4135 ɵfac?: unknown;
4136 ɵinj: unknown;
4137}
4138
4139/**
4140 * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorType` with an
4141 * associated array of providers.
4142 *
4143 * Objects of this type can be listed in the imports section of an `InjectorDef`.
4144 *
4145 * NOTE: This is a private type and should not be exported
4146 */
4147declare interface InjectorTypeWithProviders<T> {
4148 ngModule: InjectorType<T>;
4149 providers?: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | EnvironmentProviders | any[])[];
4150}
4151
4152/**
4153 * Type of metadata for an `Input` property.
4154 *
4155 * @publicApi
4156 */
4157export declare interface Input {
4158 /**
4159 * The name of the DOM property to which the input property is bound.
4160 */
4161 bindingPropertyName?: string;
4162}
4163
4164/**
4165 * @Annotation
4166 * @publicApi
4167 */
4168export declare const Input: InputDecorator;
4169
4170/**
4171 * @publicApi
4172 */
4173export declare interface InputDecorator {
4174 /**
4175 * Decorator that marks a class field as an input property and supplies configuration metadata.
4176 * The input property is bound to a DOM property in the template. During change detection,
4177 * Angular automatically updates the data property with the DOM property's value.
4178 *
4179 * @usageNotes
4180 *
4181 * You can supply an optional name to use in templates when the
4182 * component is instantiated, that maps to the
4183 * name of the bound property. By default, the original
4184 * name of the bound property is used for input binding.
4185 *
4186 * The following example creates a component with two input properties,
4187 * one of which is given a special binding name.
4188 *
4189 * ```typescript
4190 * @Component({
4191 * selector: 'bank-account',
4192 * template: `
4193 * Bank Name: {{bankName}}
4194 * Account Id: {{id}}
4195 * `
4196 * })
4197 * class BankAccount {
4198 * // This property is bound using its original name.
4199 * @Input() bankName: string;
4200 * // this property value is bound to a different property name
4201 * // when this component is instantiated in a template.
4202 * @Input('account-id') id: string;
4203 *
4204 * // this property is not bound, and is not automatically updated by Angular
4205 * normalizedBankName: string;
4206 * }
4207 *
4208 * @Component({
4209 * selector: 'app',
4210 * template: `
4211 * <bank-account bankName="RBC" account-id="4747"></bank-account>
4212 * `
4213 * })
4214 * class App {}
4215 * ```
4216 *
4217 * @see [Input and Output properties](guide/inputs-outputs)
4218 */
4219 (bindingPropertyName?: string): any;
4220 new (bindingPropertyName?: string): any;
4221}
4222
4223/**
4224 * See `TNode.insertBeforeIndex`
4225 */
4226declare type InsertBeforeIndex = null | number | number[];
4227
4228declare interface InternalNgModuleRef<T> extends NgModuleRef<T> {
4229 _bootstrapComponents: Type<any>[];
4230}
4231
4232declare interface InternalViewRef extends ViewRef {
4233 detachFromAppRef(): void;
4234 attachToAppRef(appRef: ViewRefTracker): void;
4235}
4236
4237
4238/**
4239 * Returns whether Angular is in development mode.
4240 *
4241 * By default, this is true, unless `enableProdMode` is invoked prior to calling this method or the
4242 * application is built using the Angular CLI with the `optimization` option.
4243 * @see {@link cli/build ng build}
4244 *
4245 * @publicApi
4246 */
4247export declare function isDevMode(): boolean;
4248
4249/**
4250 * Checks whether a given Component, Directive or Pipe is marked as standalone.
4251 * This will return false if passed anything other than a Component, Directive, or Pipe class
4252 * See this guide for additional information: https://angular.io/guide/standalone-components
4253 *
4254 * @param type A reference to a Component, Directive or Pipe.
4255 * @publicApi
4256 */
4257export declare function isStandalone(type: Type<unknown>): boolean;
4258
4259/**
4260 * Record representing the item change information.
4261 *
4262 * @publicApi
4263 */
4264export declare interface IterableChangeRecord<V> {
4265 /** Current index of the item in `Iterable` or null if removed. */
4266 readonly currentIndex: number | null;
4267 /** Previous index of the item in `Iterable` or null if added. */
4268 readonly previousIndex: number | null;
4269 /** The item. */
4270 readonly item: V;
4271 /** Track by identity as computed by the `TrackByFunction`. */
4272 readonly trackById: any;
4273}
4274
4275declare class IterableChangeRecord_<V> implements IterableChangeRecord<V> {
4276 item: V;
4277 trackById: any;
4278 currentIndex: number | null;
4279 previousIndex: number | null;
4280 constructor(item: V, trackById: any);
4281}
4282
4283/**
4284 * An object describing the changes in the `Iterable` collection since last time
4285 * `IterableDiffer#diff()` was invoked.
4286 *
4287 * @publicApi
4288 */
4289export declare interface IterableChanges<V> {
4290 /**
4291 * Iterate over all changes. `IterableChangeRecord` will contain information about changes
4292 * to each item.
4293 */
4294 forEachItem(fn: (record: IterableChangeRecord<V>) => void): void;
4295 /**
4296 * Iterate over a set of operations which when applied to the original `Iterable` will produce the
4297 * new `Iterable`.
4298 *
4299 * NOTE: These are not necessarily the actual operations which were applied to the original
4300 * `Iterable`, rather these are a set of computed operations which may not be the same as the
4301 * ones applied.
4302 *
4303 * @param record A change which needs to be applied
4304 * @param previousIndex The `IterableChangeRecord#previousIndex` of the `record` refers to the
4305 * original `Iterable` location, where as `previousIndex` refers to the transient location
4306 * of the item, after applying the operations up to this point.
4307 * @param currentIndex The `IterableChangeRecord#currentIndex` of the `record` refers to the
4308 * original `Iterable` location, where as `currentIndex` refers to the transient location
4309 * of the item, after applying the operations up to this point.
4310 */
4311 forEachOperation(fn: (record: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void): void;
4312 /**
4313 * Iterate over changes in the order of original `Iterable` showing where the original items
4314 * have moved.
4315 */
4316 forEachPreviousItem(fn: (record: IterableChangeRecord<V>) => void): void;
4317 /** Iterate over all added items. */
4318 forEachAddedItem(fn: (record: IterableChangeRecord<V>) => void): void;
4319 /** Iterate over all moved items. */
4320 forEachMovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
4321 /** Iterate over all removed items. */
4322 forEachRemovedItem(fn: (record: IterableChangeRecord<V>) => void): void;
4323 /**
4324 * Iterate over all items which had their identity (as computed by the `TrackByFunction`)
4325 * changed.
4326 */
4327 forEachIdentityChange(fn: (record: IterableChangeRecord<V>) => void): void;
4328}
4329
4330/**
4331 * A strategy for tracking changes over time to an iterable. Used by {@link NgForOf} to
4332 * respond to changes in an iterable by effecting equivalent changes in the DOM.
4333 *
4334 * @publicApi
4335 */
4336export declare interface IterableDiffer<V> {
4337 /**
4338 * Compute a difference between the previous state and the new `object` state.
4339 *
4340 * @param object containing the new value.
4341 * @returns an object describing the difference. The return value is only valid until the next
4342 * `diff()` invocation.
4343 */
4344 diff(object: NgIterable<V> | undefined | null): IterableChanges<V> | null;
4345}
4346
4347/**
4348 * Provides a factory for {@link IterableDiffer}.
4349 *
4350 * @publicApi
4351 */
4352export declare interface IterableDifferFactory {
4353 supports(objects: any): boolean;
4354 create<V>(trackByFn?: TrackByFunction<V>): IterableDiffer<V>;
4355}
4356
4357/**
4358 * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
4359 *
4360 * @publicApi
4361 */
4362export declare class IterableDiffers {
4363 /** @nocollapse */
4364 static ɵprov: unknown;
4365 /**
4366 * @deprecated v4.0.0 - Should be private
4367 */
4368 factories: IterableDifferFactory[];
4369 constructor(factories: IterableDifferFactory[]);
4370 static create(factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers;
4371 /**
4372 * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the
4373 * inherited {@link IterableDiffers} instance with the provided factories and return a new
4374 * {@link IterableDiffers} instance.
4375 *
4376 * @usageNotes
4377 * ### Example
4378 *
4379 * The following example shows how to extend an existing list of factories,
4380 * which will only be applied to the injector for this component and its children.
4381 * This step is all that's required to make a new {@link IterableDiffer} available.
4382 *
4383 * ```
4384 * @Component({
4385 * viewProviders: [
4386 * IterableDiffers.extend([new ImmutableListDiffer()])
4387 * ]
4388 * })
4389 * ```
4390 */
4391 static extend(factories: IterableDifferFactory[]): StaticProvider;
4392 find(iterable: any): IterableDifferFactory;
4393}
4394
4395/**
4396 * The existence of this constant (in this particular file) informs the Angular compiler that the
4397 * current program is actually @angular/core, which needs to be compiled specially.
4398 */
4399declare const ITS_JUST_ANGULAR = true;
4400
4401/**
4402 * `KeyValueArray` is an array where even positions contain keys and odd positions contain values.
4403 *
4404 * `KeyValueArray` provides a very efficient way of iterating over its contents. For small
4405 * sets (~10) the cost of binary searching an `KeyValueArray` has about the same performance
4406 * characteristics that of a `Map` with significantly better memory footprint.
4407 *
4408 * If used as a `Map` the keys are stored in alphabetical order so that they can be binary searched
4409 * for retrieval.
4410 *
4411 * See: `keyValueArraySet`, `keyValueArrayGet`, `keyValueArrayIndexOf`, `keyValueArrayDelete`.
4412 */
4413declare interface KeyValueArray<VALUE> extends Array<VALUE | string> {
4414 __brand__: 'array-map';
4415}
4416
4417/**
4418 * Record representing the item change information.
4419 *
4420 * @publicApi
4421 */
4422export declare interface KeyValueChangeRecord<K, V> {
4423 /**
4424 * Current key in the Map.
4425 */
4426 readonly key: K;
4427 /**
4428 * Current value for the key or `null` if removed.
4429 */
4430 readonly currentValue: V | null;
4431 /**
4432 * Previous value for the key or `null` if added.
4433 */
4434 readonly previousValue: V | null;
4435}
4436
4437/**
4438 * An object describing the changes in the `Map` or `{[k:string]: string}` since last time
4439 * `KeyValueDiffer#diff()` was invoked.
4440 *
4441 * @publicApi
4442 */
4443export declare interface KeyValueChanges<K, V> {
4444 /**
4445 * Iterate over all changes. `KeyValueChangeRecord` will contain information about changes
4446 * to each item.
4447 */
4448 forEachItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
4449 /**
4450 * Iterate over changes in the order of original Map showing where the original items
4451 * have moved.
4452 */
4453 forEachPreviousItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
4454 /**
4455 * Iterate over all keys for which values have changed.
4456 */
4457 forEachChangedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
4458 /**
4459 * Iterate over all added items.
4460 */
4461 forEachAddedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
4462 /**
4463 * Iterate over all removed items.
4464 */
4465 forEachRemovedItem(fn: (r: KeyValueChangeRecord<K, V>) => void): void;
4466}
4467
4468/**
4469 * A differ that tracks changes made to an object over time.
4470 *
4471 * @publicApi
4472 */
4473export declare interface KeyValueDiffer<K, V> {
4474 /**
4475 * Compute a difference between the previous state and the new `object` state.
4476 *
4477 * @param object containing the new value.
4478 * @returns an object describing the difference. The return value is only valid until the next
4479 * `diff()` invocation.
4480 */
4481 diff(object: Map<K, V>): KeyValueChanges<K, V> | null;
4482 /**
4483 * Compute a difference between the previous state and the new `object` state.
4484 *
4485 * @param object containing the new value.
4486 * @returns an object describing the difference. The return value is only valid until the next
4487 * `diff()` invocation.
4488 */
4489 diff(object: {
4490 [key: string]: V;
4491 }): KeyValueChanges<string, V> | null;
4492}
4493
4494/**
4495 * Provides a factory for {@link KeyValueDiffer}.
4496 *
4497 * @publicApi
4498 */
4499export declare interface KeyValueDifferFactory {
4500 /**
4501 * Test to see if the differ knows how to diff this kind of object.
4502 */
4503 supports(objects: any): boolean;
4504 /**
4505 * Create a `KeyValueDiffer`.
4506 */
4507 create<K, V>(): KeyValueDiffer<K, V>;
4508}
4509
4510/**
4511 * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
4512 *
4513 * @publicApi
4514 */
4515export declare class KeyValueDiffers {
4516 /** @nocollapse */
4517 static ɵprov: unknown;
4518 /**
4519 * @deprecated v4.0.0 - Should be private.
4520 */
4521 factories: KeyValueDifferFactory[];
4522 constructor(factories: KeyValueDifferFactory[]);
4523 static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers;
4524 /**
4525 * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the
4526 * inherited {@link KeyValueDiffers} instance with the provided factories and return a new
4527 * {@link KeyValueDiffers} instance.
4528 *
4529 * @usageNotes
4530 * ### Example
4531 *
4532 * The following example shows how to extend an existing list of factories,
4533 * which will only be applied to the injector for this component and its children.
4534 * This step is all that's required to make a new {@link KeyValueDiffer} available.
4535 *
4536 * ```
4537 * @Component({
4538 * viewProviders: [
4539 * KeyValueDiffers.extend([new ImmutableMapDiffer()])
4540 * ]
4541 * })
4542 * ```
4543 */
4544 static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider;
4545 find(kv: any): KeyValueDifferFactory;
4546}
4547
4548/**
4549 * The state associated with a container.
4550 *
4551 * This is an array so that its structure is closer to LView. This helps
4552 * when traversing the view tree (which is a mix of containers and component
4553 * views), so we can jump to viewOrContainer[NEXT] in the same way regardless
4554 * of type.
4555 */
4556declare interface LContainer extends Array<any> {
4557 /**
4558 * The host element of this LContainer.
4559 *
4560 * The host could be an LView if this container is on a component node.
4561 * In that case, the component LView is its HOST.
4562 */
4563 readonly [HOST]: RElement | RComment | LView;
4564 /**
4565 * This is a type field which allows us to differentiate `LContainer` from `StylingContext` in an
4566 * efficient way. The value is always set to `true`
4567 */
4568 [TYPE]: true;
4569 /**
4570 * Flag to signify that this `LContainer` may have transplanted views which need to be change
4571 * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.
4572 *
4573 * This flag, once set, is never unset for the `LContainer`.
4574 */
4575 [HAS_TRANSPLANTED_VIEWS]: boolean;
4576 /**
4577 * Access to the parent view is necessary so we can propagate back
4578 * up from inside a container to parent[NEXT].
4579 */
4580 [PARENT]: LView;
4581 /**
4582 * This allows us to jump from a container to a sibling container or component
4583 * view with the same parent, so we can remove listeners efficiently.
4584 */
4585 [NEXT]: LView | LContainer | null;
4586 /**
4587 * The number of direct transplanted views which need a refresh or have descendants themselves
4588 * that need a refresh but have not marked their ancestors as Dirty. This tells us that during
4589 * change detection we should still descend to find those children to refresh, even if the parents
4590 * are not `Dirty`/`CheckAlways`.
4591 */
4592 [TRANSPLANTED_VIEWS_TO_REFRESH]: number;
4593 /**
4594 * A collection of views created based on the underlying `<ng-template>` element but inserted into
4595 * a different `LContainer`. We need to track views created from a given declaration point since
4596 * queries collect matches from the embedded view declaration point and _not_ the insertion point.
4597 */
4598 [MOVED_VIEWS]: LView[] | null;
4599 /**
4600 * Pointer to the `TNode` which represents the host of the container.
4601 */
4602 [T_HOST]: TNode;
4603 /** The comment element that serves as an anchor for this LContainer. */
4604 readonly [NATIVE]: RComment;
4605 /**
4606 * Array of `ViewRef`s used by any `ViewContainerRef`s that point to this container.
4607 *
4608 * This is lazily initialized by `ViewContainerRef` when the first view is inserted.
4609 *
4610 * NOTE: This is stored as `any[]` because render3 should really not be aware of `ViewRef` and
4611 * doing so creates circular dependency.
4612 */
4613 [VIEW_REFS]: unknown[] | null;
4614}
4615
4616/**
4617 * Provide this token to set the locale of your application.
4618 * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
4619 * DecimalPipe and PercentPipe) and by ICU expressions.
4620 *
4621 * See the [i18n guide](guide/i18n-common-locale-id) for more information.
4622 *
4623 * @usageNotes
4624 * ### Example
4625 *
4626 * ```typescript
4627 * import { LOCALE_ID } from '@angular/core';
4628 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4629 * import { AppModule } from './app/app.module';
4630 *
4631 * platformBrowserDynamic().bootstrapModule(AppModule, {
4632 * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]
4633 * });
4634 * ```
4635 *
4636 * @publicApi
4637 */
4638export declare const LOCALE_ID: InjectionToken<string>;
4639
4640/**
4641 * Type for a function that extracts a value for a local refs.
4642 * Example:
4643 * - `<div #nativeDivEl>` - `nativeDivEl` should point to the native `<div>` element;
4644 * - `<ng-template #tplRef>` - `tplRef` should point to the `TemplateRef` instance;
4645 */
4646declare type LocalRefExtractor = (tNode: TNodeWithLocalRefs, currentView: LView) => any;
4647
4648/**
4649 * lQueries represent a collection of individual LQuery objects tracked in a given view.
4650 */
4651declare interface LQueries {
4652 /**
4653 * A collection of queries tracked in a given view.
4654 */
4655 queries: LQuery<any>[];
4656 /**
4657 * A method called when a new embedded view is created. As a result a set of LQueries applicable
4658 * for a new embedded view is instantiated (cloned) from the declaration view.
4659 * @param tView
4660 */
4661 createEmbeddedView(tView: TView): LQueries | null;
4662 /**
4663 * A method called when an embedded view is inserted into a container. As a result all impacted
4664 * `LQuery` objects (and associated `QueryList`) are marked as dirty.
4665 * @param tView
4666 */
4667 insertView(tView: TView): void;
4668 /**
4669 * A method called when an embedded view is detached from a container. As a result all impacted
4670 * `LQuery` objects (and associated `QueryList`) are marked as dirty.
4671 * @param tView
4672 */
4673 detachView(tView: TView): void;
4674}
4675
4676/**
4677 * An interface that represents query-related information specific to a view instance. Most notably
4678 * it contains:
4679 * - materialized query matches;
4680 * - a pointer to a QueryList where materialized query results should be reported.
4681 */
4682declare interface LQuery<T> {
4683 /**
4684 * Materialized query matches for a given view only (!). Results are initialized lazily so the
4685 * array of matches is set to `null` initially.
4686 */
4687 matches: (T | null)[] | null;
4688 /**
4689 * A QueryList where materialized query results should be reported.
4690 */
4691 queryList: QueryList<T>;
4692 /**
4693 * Clones an LQuery for an embedded view. A cloned query shares the same `QueryList` but has a
4694 * separate collection of materialized matches.
4695 */
4696 clone(): LQuery<T>;
4697 /**
4698 * Called when an embedded view, impacting results of this query, is inserted or removed.
4699 */
4700 setDirty(): void;
4701}
4702
4703/**
4704 * `LView` stores all of the information needed to process the instructions as
4705 * they are invoked from the template. Each embedded view and component view has its
4706 * own `LView`. When processing a particular view, we set the `viewData` to that
4707 * `LView`. When that view is done processing, the `viewData` is set back to
4708 * whatever the original `viewData` was before (the parent `LView`).
4709 *
4710 * Keeping separate state for each view facilities view insertion / deletion, so we
4711 * don't have to edit the data array based on which views are present.
4712 */
4713declare interface LView<T = unknown> extends Array<any> {
4714 /**
4715 * The node into which this `LView` is inserted.
4716 */
4717 [HOST]: RElement | null;
4718 /**
4719 * The static data for this view. We need a reference to this so we can easily walk up the
4720 * node tree in DI and get the TView.data array associated with a node (where the
4721 * directive defs are stored).
4722 */
4723 readonly [TVIEW]: TView;
4724 /** Flags for this view. See LViewFlags for more info. */
4725 [FLAGS]: LViewFlags;
4726 /**
4727 * This may store an {@link LView} or {@link LContainer}.
4728 *
4729 * `LView` - The parent view. This is needed when we exit the view and must restore the previous
4730 * LView. Without this, the render method would have to keep a stack of
4731 * views as it is recursively rendering templates.
4732 *
4733 * `LContainer` - The current view is part of a container, and is an embedded view.
4734 */
4735 [PARENT]: LView | LContainer | null;
4736 /**
4737 *
4738 * The next sibling LView or LContainer.
4739 *
4740 * Allows us to propagate between sibling view states that aren't in the same
4741 * container. Embedded views already have a node.next, but it is only set for
4742 * views in the same container. We need a way to link component views and views
4743 * across containers as well.
4744 */
4745 [NEXT]: LView | LContainer | null;
4746 /** Queries active for this view - nodes from a view are reported to those queries. */
4747 [QUERIES]: LQueries | null;
4748 /**
4749 * Store the `TNode` of the location where the current `LView` is inserted into.
4750 *
4751 * Given:
4752 * ```
4753 * <div>
4754 * <ng-template><span></span></ng-template>
4755 * </div>
4756 * ```
4757 *
4758 * We end up with two `TView`s.
4759 * - `parent` `TView` which contains `<div><!-- anchor --></div>`
4760 * - `child` `TView` which contains `<span></span>`
4761 *
4762 * Typically the `child` is inserted into the declaration location of the `parent`, but it can be
4763 * inserted anywhere. Because it can be inserted anywhere it is not possible to store the
4764 * insertion information in the `TView` and instead we must store it in the `LView[T_HOST]`.
4765 *
4766 * So to determine where is our insertion parent we would execute:
4767 * ```
4768 * const parentLView = lView[PARENT];
4769 * const parentTNode = lView[T_HOST];
4770 * const insertionParent = parentLView[parentTNode.index];
4771 * ```
4772 *
4773 *
4774 * If `null`, this is the root view of an application (root component is in this view) and it has
4775 * no parents.
4776 */
4777 [T_HOST]: TNode | null;
4778 /**
4779 * When a view is destroyed, listeners need to be released and outputs need to be
4780 * unsubscribed. This context array stores both listener functions wrapped with
4781 * their context and output subscription instances for a particular view.
4782 *
4783 * These change per LView instance, so they cannot be stored on TView. Instead,
4784 * TView.cleanup saves an index to the necessary context in this array.
4785 *
4786 * After `LView` is created it is possible to attach additional instance specific functions at the
4787 * end of the `lView[CLEANUP]` because we know that no more `T` level cleanup functions will be
4788 * added here.
4789 */
4790 [CLEANUP]: any[] | null;
4791 /**
4792 * - For dynamic views, this is the context with which to render the template (e.g.
4793 * `NgForContext`), or `{}` if not defined explicitly.
4794 * - For root view of the root component it's a reference to the component instance itself.
4795 * - For components, the context is a reference to the component instance itself.
4796 * - For inline views, the context is null.
4797 */
4798 [CONTEXT]: T;
4799 /** An optional Module Injector to be used as fall back after Element Injectors are consulted. */
4800 readonly [INJECTOR_2]: Injector | null;
4801 /** Factory to be used for creating Renderer. */
4802 [RENDERER_FACTORY]: RendererFactory;
4803 /** Renderer to be used for this view. */
4804 [RENDERER]: Renderer;
4805 /** An optional custom sanitizer. */
4806 [SANITIZER]: Sanitizer | null;
4807 /**
4808 * Reference to the first LView or LContainer beneath this LView in
4809 * the hierarchy.
4810 *
4811 * Necessary to store this so views can traverse through their nested views
4812 * to remove listeners and call onDestroy callbacks.
4813 */
4814 [CHILD_HEAD]: LView | LContainer | null;
4815 /**
4816 * The last LView or LContainer beneath this LView in the hierarchy.
4817 *
4818 * The tail allows us to quickly add a new state to the end of the view list
4819 * without having to propagate starting from the first child.
4820 */
4821 [CHILD_TAIL]: LView | LContainer | null;
4822 /**
4823 * View where this view's template was declared.
4824 *
4825 * The template for a dynamically created view may be declared in a different view than
4826 * it is inserted. We already track the "insertion view" (view where the template was
4827 * inserted) in LView[PARENT], but we also need access to the "declaration view"
4828 * (view where the template was declared). Otherwise, we wouldn't be able to call the
4829 * view's template function with the proper contexts. Context should be inherited from
4830 * the declaration view tree, not the insertion view tree.
4831 *
4832 * Example (AppComponent template):
4833 *
4834 * <ng-template #foo></ng-template> <-- declared here -->
4835 * <some-comp [tpl]="foo"></some-comp> <-- inserted inside this component -->
4836 *
4837 * The <ng-template> above is declared in the AppComponent template, but it will be passed into
4838 * SomeComp and inserted there. In this case, the declaration view would be the AppComponent,
4839 * but the insertion view would be SomeComp. When we are removing views, we would want to
4840 * traverse through the insertion view to clean up listeners. When we are calling the
4841 * template function during change detection, we need the declaration view to get inherited
4842 * context.
4843 */
4844 [DECLARATION_VIEW]: LView | null;
4845 /**
4846 * Points to the declaration component view, used to track transplanted `LView`s.
4847 *
4848 * See: `DECLARATION_VIEW` which points to the actual `LView` where it was declared, whereas
4849 * `DECLARATION_COMPONENT_VIEW` points to the component which may not be same as
4850 * `DECLARATION_VIEW`.
4851 *
4852 * Example:
4853 * ```
4854 * <#VIEW #myComp>
4855 * <div *ngIf="true">
4856 * <ng-template #myTmpl>...</ng-template>
4857 * </div>
4858 * </#VIEW>
4859 * ```
4860 * In the above case `DECLARATION_VIEW` for `myTmpl` points to the `LView` of `ngIf` whereas
4861 * `DECLARATION_COMPONENT_VIEW` points to `LView` of the `myComp` which owns the template.
4862 *
4863 * The reason for this is that all embedded views are always check-always whereas the component
4864 * view can be check-always or on-push. When we have a transplanted view it is important to
4865 * determine if we have transplanted a view from check-always declaration to on-push insertion
4866 * point. In such a case the transplanted view needs to be added to the `LContainer` in the
4867 * declared `LView` and CD during the declared view CD (in addition to the CD at the insertion
4868 * point.) (Any transplanted views which are intra Component are of no interest because the CD
4869 * strategy of declaration and insertion will always be the same, because it is the same
4870 * component.)
4871 *
4872 * Queries already track moved views in `LView[DECLARATION_LCONTAINER]` and
4873 * `LContainer[MOVED_VIEWS]`. However the queries also track `LView`s which moved within the same
4874 * component `LView`. Transplanted views are a subset of moved views, and we use
4875 * `DECLARATION_COMPONENT_VIEW` to differentiate them. As in this example.
4876 *
4877 * Example showing intra component `LView` movement.
4878 * ```
4879 * <#VIEW #myComp>
4880 * <div *ngIf="condition; then thenBlock else elseBlock"></div>
4881 * <ng-template #thenBlock>Content to render when condition is true.</ng-template>
4882 * <ng-template #elseBlock>Content to render when condition is false.</ng-template>
4883 * </#VIEW>
4884 * ```
4885 * The `thenBlock` and `elseBlock` is moved but not transplanted.
4886 *
4887 * Example showing inter component `LView` movement (transplanted view).
4888 * ```
4889 * <#VIEW #myComp>
4890 * <ng-template #myTmpl>...</ng-template>
4891 * <insertion-component [template]="myTmpl"></insertion-component>
4892 * </#VIEW>
4893 * ```
4894 * In the above example `myTmpl` is passed into a different component. If `insertion-component`
4895 * instantiates `myTmpl` and `insertion-component` is on-push then the `LContainer` needs to be
4896 * marked as containing transplanted views and those views need to be CD as part of the
4897 * declaration CD.
4898 *
4899 *
4900 * When change detection runs, it iterates over `[MOVED_VIEWS]` and CDs any child `LView`s where
4901 * the `DECLARATION_COMPONENT_VIEW` of the current component and the child `LView` does not match
4902 * (it has been transplanted across components.)
4903 *
4904 * Note: `[DECLARATION_COMPONENT_VIEW]` points to itself if the LView is a component view (the
4905 * simplest / most common case).
4906 *
4907 * see also:
4908 * - https://hackmd.io/@mhevery/rJUJsvv9H write up of the problem
4909 * - `LContainer[HAS_TRANSPLANTED_VIEWS]` which marks which `LContainer` has transplanted views.
4910 * - `LContainer[TRANSPLANT_HEAD]` and `LContainer[TRANSPLANT_TAIL]` storage for transplanted
4911 * - `LView[DECLARATION_LCONTAINER]` similar problem for queries
4912 * - `LContainer[MOVED_VIEWS]` similar problem for queries
4913 */
4914 [DECLARATION_COMPONENT_VIEW]: LView;
4915 /**
4916 * A declaration point of embedded views (ones instantiated based on the content of a
4917 * <ng-template>), null for other types of views.
4918 *
4919 * We need to track all embedded views created from a given declaration point so we can prepare
4920 * query matches in a proper order (query matches are ordered based on their declaration point and
4921 * _not_ the insertion point).
4922 */
4923 [DECLARATION_LCONTAINER]: LContainer | null;
4924 /**
4925 * More flags for this view. See PreOrderHookFlags for more info.
4926 */
4927 [PREORDER_HOOK_FLAGS]: PreOrderHookFlags;
4928 /**
4929 * The number of direct transplanted views which need a refresh or have descendants themselves
4930 * that need a refresh but have not marked their ancestors as Dirty. This tells us that during
4931 * change detection we should still descend to find those children to refresh, even if the parents
4932 * are not `Dirty`/`CheckAlways`.
4933 */
4934 [TRANSPLANTED_VIEWS_TO_REFRESH]: number;
4935 /** Unique ID of the view. Used for `__ngContext__` lookups in the `LView` registry. */
4936 [ID]: number;
4937 /**
4938 * Optional injector assigned to embedded views that takes
4939 * precedence over the element and module injectors.
4940 */
4941 readonly [EMBEDDED_VIEW_INJECTOR]: Injector | null;
4942}
4943
4944/** Flags associated with an LView (saved in LView[FLAGS]) */
4945declare const enum LViewFlags {
4946 /** The state of the init phase on the first 2 bits */
4947 InitPhaseStateIncrementer = 1,
4948 InitPhaseStateMask = 3,
4949 /**
4950 * Whether or not the view is in creationMode.
4951 *
4952 * This must be stored in the view rather than using `data` as a marker so that
4953 * we can properly support embedded views. Otherwise, when exiting a child view
4954 * back into the parent view, `data` will be defined and `creationMode` will be
4955 * improperly reported as false.
4956 */
4957 CreationMode = 4,
4958 /**
4959 * Whether or not this LView instance is on its first processing pass.
4960 *
4961 * An LView instance is considered to be on its "first pass" until it
4962 * has completed one creation mode run and one update mode run. At this
4963 * time, the flag is turned off.
4964 */
4965 FirstLViewPass = 8,
4966 /** Whether this view has default change detection strategy (checks always) or onPush */
4967 CheckAlways = 16,
4968 /** Whether or not this view is currently dirty (needing check) */
4969 Dirty = 32,
4970 /** Whether or not this view is currently attached to change detection tree. */
4971 Attached = 64,
4972 /** Whether or not this view is destroyed. */
4973 Destroyed = 128,
4974 /** Whether or not this view is the root view */
4975 IsRoot = 256,
4976 /**
4977 * Whether this moved LView was needs to be refreshed at the insertion location because the
4978 * declaration was dirty.
4979 */
4980 RefreshTransplantedView = 512,
4981 /** Indicates that the view **or any of its ancestors** have an embedded view injector. */
4982 HasEmbeddedViewInjector = 1024,
4983 /**
4984 * Index of the current init phase on last 21 bits
4985 */
4986 IndexWithinInitPhaseIncrementer = 2048,
4987 IndexWithinInitPhaseShift = 11,
4988 IndexWithinInitPhaseReset = 2047
4989}
4990
4991/**
4992 * Wrap an array of `Provider`s into `EnvironmentProviders`, preventing them from being accidentally
4993 * referenced in `@Component in a component injector.
4994 */
4995export declare function makeEnvironmentProviders(providers: (Provider | EnvironmentProviders)[]): EnvironmentProviders;
4996
4997/**
4998 * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
4999 * that the compiler should use in case of missing translations:
5000 * - Error: throw if you have missing translations.
5001 * - Warning (default): show a warning in the console and/or shell.
5002 * - Ignore: do nothing.
5003 *
5004 * See the [i18n guide](guide/i18n-common-merge#report-missing-translations) for more information.
5005 *
5006 * @usageNotes
5007 * ### Example
5008 * ```typescript
5009 * import { MissingTranslationStrategy } from '@angular/core';
5010 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
5011 * import { AppModule } from './app/app.module';
5012 *
5013 * platformBrowserDynamic().bootstrapModule(AppModule, {
5014 * missingTranslation: MissingTranslationStrategy.Error
5015 * });
5016 * ```
5017 *
5018 * @publicApi
5019 */
5020export declare enum MissingTranslationStrategy {
5021 Error = 0,
5022 Warning = 1,
5023 Ignore = 2
5024}
5025
5026/**
5027 * Combination of NgModuleFactory and ComponentFactories.
5028 *
5029 * @publicApi
5030 *
5031 * @deprecated
5032 * Ivy JIT mode doesn't require accessing this symbol.
5033 * See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes) for
5034 * additional context.
5035 */
5036export declare class ModuleWithComponentFactories<T> {
5037 ngModuleFactory: NgModuleFactory<T>;
5038 componentFactories: ComponentFactory<any>[];
5039 constructor(ngModuleFactory: NgModuleFactory<T>, componentFactories: ComponentFactory<any>[]);
5040}
5041
5042/**
5043 * A wrapper around an NgModule that associates it with [providers](guide/glossary#provider
5044 * "Definition"). Usage without a generic type is deprecated.
5045 *
5046 * @see [Deprecations](guide/deprecations#modulewithproviders-type-without-a-generic)
5047 *
5048 * @publicApi
5049 */
5050export declare interface ModuleWithProviders<T> {
5051 ngModule: Type<T>;
5052 providers?: Array<Provider | EnvironmentProviders>;
5053}
5054
5055declare const MOVED_VIEWS = 9;
5056
5057declare const NATIVE = 7;
5058
5059declare const NEXT = 4;
5060
5061/**
5062 * A type describing supported iterable types.
5063 *
5064 * @publicApi
5065 */
5066export declare type NgIterable<T> = Array<T> | Iterable<T>;
5067
5068/**
5069 * Type of the NgModule metadata.
5070 *
5071 * @publicApi
5072 */
5073export declare interface NgModule {
5074 /**
5075 * The set of injectable objects that are available in the injector
5076 * of this module.
5077 *
5078 * @see [Dependency Injection guide](guide/dependency-injection)
5079 * @see [NgModule guide](guide/providers)
5080 *
5081 * @usageNotes
5082 *
5083 * Dependencies whose providers are listed here become available for injection
5084 * into any component, directive, pipe or service that is a child of this injector.
5085 * The NgModule used for bootstrapping uses the root injector, and can provide dependencies
5086 * to any part of the app.
5087 *
5088 * A lazy-loaded module has its own injector, typically a child of the app root injector.
5089 * Lazy-loaded services are scoped to the lazy-loaded module's injector.
5090 * If a lazy-loaded module also provides the `UserService`, any component created
5091 * within that module's context (such as by router navigation) gets the local instance
5092 * of the service, not the instance in the root injector.
5093 * Components in external modules continue to receive the instance provided by their injectors.
5094 *
5095 * ### Example
5096 *
5097 * The following example defines a class that is injected in
5098 * the HelloWorld NgModule:
5099 *
5100 * ```
5101 * class Greeter {
5102 * greet(name:string) {
5103 * return 'Hello ' + name + '!';
5104 * }
5105 * }
5106 *
5107 * @NgModule({
5108 * providers: [
5109 * Greeter
5110 * ]
5111 * })
5112 * class HelloWorld {
5113 * greeter:Greeter;
5114 *
5115 * constructor(greeter:Greeter) {
5116 * this.greeter = greeter;
5117 * }
5118 * }
5119 * ```
5120 */
5121 providers?: Array<Provider | EnvironmentProviders>;
5122 /**
5123 * The set of components, directives, and pipes ([declarables](guide/glossary#declarable))
5124 * that belong to this module.
5125 *
5126 * @usageNotes
5127 *
5128 * The set of selectors that are available to a template include those declared here, and
5129 * those that are exported from imported NgModules.
5130 *
5131 * Declarables must belong to exactly one module.
5132 * The compiler emits an error if you try to declare the same class in more than one module.
5133 * Be careful not to declare a class that is imported from another module.
5134 *
5135 * ### Example
5136 *
5137 * The following example allows the CommonModule to use the `NgFor`
5138 * directive.
5139 *
5140 * ```javascript
5141 * @NgModule({
5142 * declarations: [NgFor]
5143 * })
5144 * class CommonModule {
5145 * }
5146 * ```
5147 */
5148 declarations?: Array<Type<any> | any[]>;
5149 /**
5150 * The set of NgModules whose exported [declarables](guide/glossary#declarable)
5151 * are available to templates in this module.
5152 *
5153 * @usageNotes
5154 *
5155 * A template can use exported declarables from any
5156 * imported module, including those from modules that are imported indirectly
5157 * and re-exported.
5158 * For example, `ModuleA` imports `ModuleB`, and also exports
5159 * it, which makes the declarables from `ModuleB` available
5160 * wherever `ModuleA` is imported.
5161 *
5162 * ### Example
5163 *
5164 * The following example allows MainModule to use anything exported by
5165 * `CommonModule`:
5166 *
5167 * ```javascript
5168 * @NgModule({
5169 * imports: [CommonModule]
5170 * })
5171 * class MainModule {
5172 * }
5173 * ```
5174 *
5175 */
5176 imports?: Array<Type<any> | ModuleWithProviders<{}> | any[]>;
5177 /**
5178 * The set of components, directives, and pipes declared in this
5179 * NgModule that can be used in the template of any component that is part of an
5180 * NgModule that imports this NgModule. Exported declarations are the module's public API.
5181 *
5182 * A declarable belongs to one and only one NgModule.
5183 * A module can list another module among its exports, in which case all of that module's
5184 * public declaration are exported.
5185 *
5186 * @usageNotes
5187 *
5188 * Declarations are private by default.
5189 * If this ModuleA does not export UserComponent, then only the components within this
5190 * ModuleA can use UserComponent.
5191 *
5192 * ModuleA can import ModuleB and also export it, making exports from ModuleB
5193 * available to an NgModule that imports ModuleA.
5194 *
5195 * ### Example
5196 *
5197 * The following example exports the `NgFor` directive from CommonModule.
5198 *
5199 * ```javascript
5200 * @NgModule({
5201 * exports: [NgFor]
5202 * })
5203 * class CommonModule {
5204 * }
5205 * ```
5206 */
5207 exports?: Array<Type<any> | any[]>;
5208 /**
5209 * The set of components to compile when this NgModule is defined,
5210 * so that they can be dynamically loaded into the view.
5211 *
5212 * For each component listed here, Angular creates a `ComponentFactory`
5213 * and stores it in the `ComponentFactoryResolver`.
5214 *
5215 * Angular automatically adds components in the module's bootstrap
5216 * and route definitions into the `entryComponents` list. Use this
5217 * option to add components that are bootstrapped
5218 * using one of the imperative techniques, such as `ViewContainerRef.createComponent()`.
5219 *
5220 * @see [Entry Components](guide/entry-components)
5221 * @deprecated
5222 * Since 9.0.0. With Ivy, this property is no longer necessary.
5223 * (You may need to keep these if building a library that will be consumed by a View Engine
5224 * application.)
5225 */
5226 entryComponents?: Array<Type<any> | any[]>;
5227 /**
5228 * The set of components that are bootstrapped when
5229 * this module is bootstrapped. The components listed here
5230 * are automatically added to `entryComponents`.
5231 */
5232 bootstrap?: Array<Type<any> | any[]>;
5233 /**
5234 * The set of schemas that declare elements to be allowed in the NgModule.
5235 * Elements and properties that are neither Angular components nor directives
5236 * must be declared in a schema.
5237 *
5238 * Allowed value are `NO_ERRORS_SCHEMA` and `CUSTOM_ELEMENTS_SCHEMA`.
5239 *
5240 * @security When using one of `NO_ERRORS_SCHEMA` or `CUSTOM_ELEMENTS_SCHEMA`
5241 * you must ensure that allowed elements and properties securely escape inputs.
5242 */
5243 schemas?: Array<SchemaMetadata | any[]>;
5244 /**
5245 * A name or path that uniquely identifies this NgModule in `getNgModuleById`.
5246 * If left `undefined`, the NgModule is not registered with `getNgModuleById`.
5247 */
5248 id?: string;
5249 /**
5250 * When present, this module is ignored by the AOT compiler.
5251 * It remains in distributed code, and the JIT compiler attempts to compile it
5252 * at run time, in the browser.
5253 * To ensure the correct behavior, the app must import `@angular/compiler`.
5254 */
5255 jit?: true;
5256}
5257
5258/**
5259 * @Annotation
5260 * @publicApi
5261 */
5262export declare const NgModule: NgModuleDecorator;
5263
5264/**
5265 * Type of the NgModule decorator / constructor function.
5266 *
5267 * @publicApi
5268 */
5269export declare interface NgModuleDecorator {
5270 /**
5271 * Decorator that marks a class as an NgModule and supplies configuration metadata.
5272 */
5273 (obj?: NgModule): TypeDecorator;
5274 new (obj?: NgModule): NgModule;
5275}
5276
5277/**
5278 * @publicApi
5279 *
5280 * @deprecated
5281 * This class was mostly used as a part of ViewEngine-based JIT API and is no longer needed in Ivy
5282 * JIT mode. See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes)
5283 * for additional context. Angular provides APIs that accept NgModule classes directly (such as
5284 * [PlatformRef.bootstrapModule](api/core/PlatformRef#bootstrapModule) and
5285 * [createNgModule](api/core/createNgModule)), consider switching to those APIs instead of
5286 * using factory-based ones.
5287 */
5288export declare abstract class NgModuleFactory<T> {
5289 abstract get moduleType(): Type<T>;
5290 abstract create(parentInjector: Injector | null): NgModuleRef<T>;
5291}
5292
5293/**
5294 * Represents an instance of an `NgModule` created by an `NgModuleFactory`.
5295 * Provides access to the `NgModule` instance and related objects.
5296 *
5297 * @publicApi
5298 */
5299export declare abstract class NgModuleRef<T> {
5300 /**
5301 * The injector that contains all of the providers of the `NgModule`.
5302 */
5303 abstract get injector(): EnvironmentInjector;
5304 /**
5305 * The resolver that can retrieve component factories in a context of this module.
5306 *
5307 * Note: since v13, dynamic component creation via
5308 * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)
5309 * does **not** require resolving component factory: component class can be used directly.
5310 *
5311 * @deprecated Angular no longer requires Component factories. Please use other APIs where
5312 * Component class can be used directly.
5313 */
5314 abstract get componentFactoryResolver(): ComponentFactoryResolver;
5315 /**
5316 * The `NgModule` instance.
5317 */
5318 abstract get instance(): T;
5319 /**
5320 * Destroys the module instance and all of the data structures associated with it.
5321 */
5322 abstract destroy(): void;
5323 /**
5324 * Registers a callback to be executed when the module is destroyed.
5325 */
5326 abstract onDestroy(callback: () => void): void;
5327}
5328
5329/**
5330 * A token for third-party components that can register themselves with NgProbe.
5331 *
5332 * @publicApi
5333 */
5334export declare class NgProbeToken {
5335 name: string;
5336 token: any;
5337 constructor(name: string, token: any);
5338}
5339
5340/**
5341 * An injectable service for executing work inside or outside of the Angular zone.
5342 *
5343 * The most common use of this service is to optimize performance when starting a work consisting of
5344 * one or more asynchronous tasks that don't require UI updates or error handling to be handled by
5345 * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks
5346 * can reenter the Angular zone via {@link #run}.
5347 *
5348 * <!-- TODO: add/fix links to:
5349 * - docs explaining zones and the use of zones in Angular and change-detection
5350 * - link to runOutsideAngular/run (throughout this file!)
5351 * -->
5352 *
5353 * @usageNotes
5354 * ### Example
5355 *
5356 * ```
5357 * import {Component, NgZone} from '@angular/core';
5358 * import {NgIf} from '@angular/common';
5359 *
5360 * @Component({
5361 * selector: 'ng-zone-demo',
5362 * template: `
5363 * <h2>Demo: NgZone</h2>
5364 *
5365 * <p>Progress: {{progress}}%</p>
5366 * <p *ngIf="progress >= 100">Done processing {{label}} of Angular zone!</p>
5367 *
5368 * <button (click)="processWithinAngularZone()">Process within Angular zone</button>
5369 * <button (click)="processOutsideOfAngularZone()">Process outside of Angular zone</button>
5370 * `,
5371 * })
5372 * export class NgZoneDemo {
5373 * progress: number = 0;
5374 * label: string;
5375 *
5376 * constructor(private _ngZone: NgZone) {}
5377 *
5378 * // Loop inside the Angular zone
5379 * // so the UI DOES refresh after each setTimeout cycle
5380 * processWithinAngularZone() {
5381 * this.label = 'inside';
5382 * this.progress = 0;
5383 * this._increaseProgress(() => console.log('Inside Done!'));
5384 * }
5385 *
5386 * // Loop outside of the Angular zone
5387 * // so the UI DOES NOT refresh after each setTimeout cycle
5388 * processOutsideOfAngularZone() {
5389 * this.label = 'outside';
5390 * this.progress = 0;
5391 * this._ngZone.runOutsideAngular(() => {
5392 * this._increaseProgress(() => {
5393 * // reenter the Angular zone and display done
5394 * this._ngZone.run(() => { console.log('Outside Done!'); });
5395 * });
5396 * });
5397 * }
5398 *
5399 * _increaseProgress(doneCallback: () => void) {
5400 * this.progress += 1;
5401 * console.log(`Current progress: ${this.progress}%`);
5402 *
5403 * if (this.progress < 100) {
5404 * window.setTimeout(() => this._increaseProgress(doneCallback), 10);
5405 * } else {
5406 * doneCallback();
5407 * }
5408 * }
5409 * }
5410 * ```
5411 *
5412 * @publicApi
5413 */
5414export declare class NgZone {
5415 readonly hasPendingMacrotasks: boolean;
5416 readonly hasPendingMicrotasks: boolean;
5417 /**
5418 * Whether there are no outstanding microtasks or macrotasks.
5419 */
5420 readonly isStable: boolean;
5421 /**
5422 * Notifies when code enters Angular Zone. This gets fired first on VM Turn.
5423 */
5424 readonly onUnstable: EventEmitter<any>;
5425 /**
5426 * Notifies when there is no more microtasks enqueued in the current VM Turn.
5427 * This is a hint for Angular to do change detection, which may enqueue more microtasks.
5428 * For this reason this event can fire multiple times per VM Turn.
5429 */
5430 readonly onMicrotaskEmpty: EventEmitter<any>;
5431 /**
5432 * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
5433 * implies we are about to relinquish VM turn.
5434 * This event gets called just once.
5435 */
5436 readonly onStable: EventEmitter<any>;
5437 /**
5438 * Notifies that an error has been delivered.
5439 */
5440 readonly onError: EventEmitter<any>;
5441 constructor({ enableLongStackTrace, shouldCoalesceEventChangeDetection, shouldCoalesceRunChangeDetection }: {
5442 enableLongStackTrace?: boolean | undefined;
5443 shouldCoalesceEventChangeDetection?: boolean | undefined;
5444 shouldCoalesceRunChangeDetection?: boolean | undefined;
5445 });
5446 static isInAngularZone(): boolean;
5447 static assertInAngularZone(): void;
5448 static assertNotInAngularZone(): void;
5449 /**
5450 * Executes the `fn` function synchronously within the Angular zone and returns value returned by
5451 * the function.
5452 *
5453 * Running functions via `run` allows you to reenter Angular zone from a task that was executed
5454 * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
5455 *
5456 * Any future tasks or microtasks scheduled from within this function will continue executing from
5457 * within the Angular zone.
5458 *
5459 * If a synchronous error happens it will be rethrown and not reported via `onError`.
5460 */
5461 run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
5462 /**
5463 * Executes the `fn` function synchronously within the Angular zone as a task and returns value
5464 * returned by the function.
5465 *
5466 * Running functions via `run` allows you to reenter Angular zone from a task that was executed
5467 * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
5468 *
5469 * Any future tasks or microtasks scheduled from within this function will continue executing from
5470 * within the Angular zone.
5471 *
5472 * If a synchronous error happens it will be rethrown and not reported via `onError`.
5473 */
5474 runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T;
5475 /**
5476 * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
5477 * rethrown.
5478 */
5479 runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T;
5480 /**
5481 * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
5482 * the function.
5483 *
5484 * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
5485 * work that
5486 * doesn't trigger Angular change-detection or is subject to Angular's error handling.
5487 *
5488 * Any future tasks or microtasks scheduled from within this function will continue executing from
5489 * outside of the Angular zone.
5490 *
5491 * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
5492 */
5493 runOutsideAngular<T>(fn: (...args: any[]) => T): T;
5494}
5495
5496/**
5497 * Defines a schema that allows any property on any element.
5498 *
5499 * This schema allows you to ignore the errors related to any unknown elements or properties in a
5500 * template. The usage of this schema is generally discouraged because it prevents useful validation
5501 * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.
5502 *
5503 * @publicApi
5504 */
5505export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
5506
5507/**
5508 * @description
5509 * A lifecycle hook that is called when any data-bound property of a directive changes.
5510 * Define an `ngOnChanges()` method to handle the changes.
5511 *
5512 * @see `DoCheck`
5513 * @see `OnInit`
5514 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
5515 *
5516 * @usageNotes
5517 * The following snippet shows how a component can implement this interface to
5518 * define an on-changes handler for an input property.
5519 *
5520 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnChanges'}
5521 *
5522 * @publicApi
5523 */
5524export declare interface OnChanges {
5525 /**
5526 * A callback method that is invoked immediately after the
5527 * default change detector has checked data-bound properties
5528 * if at least one has changed, and before the view and content
5529 * children are checked.
5530 * @param changes The changed properties.
5531 */
5532 ngOnChanges(changes: SimpleChanges): void;
5533}
5534
5535/**
5536 * A lifecycle hook that is called when a directive, pipe, or service is destroyed.
5537 * Use for any custom cleanup that needs to occur when the
5538 * instance is destroyed.
5539 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
5540 *
5541 * @usageNotes
5542 * The following snippet shows how a component can implement this interface
5543 * to define its own custom clean-up method.
5544 *
5545 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'}
5546 *
5547 * @publicApi
5548 */
5549export declare interface OnDestroy {
5550 /**
5551 * A callback method that performs custom clean-up, invoked immediately
5552 * before a directive, pipe, or service instance is destroyed.
5553 */
5554 ngOnDestroy(): void;
5555}
5556
5557/**
5558 * @description
5559 * A lifecycle hook that is called after Angular has initialized
5560 * all data-bound properties of a directive.
5561 * Define an `ngOnInit()` method to handle any additional initialization tasks.
5562 *
5563 * @see `AfterContentInit`
5564 * @see [Lifecycle hooks guide](guide/lifecycle-hooks)
5565 *
5566 * @usageNotes
5567 * The following snippet shows how a component can implement this interface to
5568 * define its own initialization method.
5569 *
5570 * {@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'}
5571 *
5572 * @publicApi
5573 */
5574export declare interface OnInit {
5575 /**
5576 * A callback method that is invoked immediately after the
5577 * default change detector has checked the directive's
5578 * data-bound properties for the first time,
5579 * and before any of the view or content children have been checked.
5580 * It is invoked only once when the directive is instantiated.
5581 */
5582 ngOnInit(): void;
5583}
5584
5585declare type OpaqueValue = unknown;
5586
5587declare interface OpaqueViewState {
5588 '__brand__': 'Brand for OpaqueViewState that nothing will match';
5589}
5590
5591/**
5592 * Type of the Optional metadata.
5593 *
5594 * @publicApi
5595 */
5596export declare interface Optional {
5597}
5598
5599/**
5600 * Optional decorator and metadata.
5601 *
5602 * @Annotation
5603 * @publicApi
5604 */
5605export declare const Optional: OptionalDecorator;
5606
5607/**
5608 * Type of the Optional decorator / constructor function.
5609 *
5610 * @publicApi
5611 */
5612export declare interface OptionalDecorator {
5613 /**
5614 * Parameter decorator to be used on constructor parameters,
5615 * which marks the parameter as being an optional dependency.
5616 * The DI framework provides `null` if the dependency is not found.
5617 *
5618 * Can be used together with other parameter decorators
5619 * that modify how dependency injection operates.
5620 *
5621 * @usageNotes
5622 *
5623 * The following code allows the possibility of a `null` result:
5624 *
5625 * <code-example path="core/di/ts/metadata_spec.ts" region="Optional">
5626 * </code-example>
5627 *
5628 * @see ["Dependency Injection Guide"](guide/dependency-injection).
5629 */
5630 (): any;
5631 new (): Optional;
5632}
5633
5634/**
5635 * Type of the Output metadata.
5636 *
5637 * @publicApi
5638 */
5639export declare interface Output {
5640 /**
5641 * The name of the DOM property to which the output property is bound.
5642 */
5643 bindingPropertyName?: string;
5644}
5645
5646/**
5647 * @Annotation
5648 * @publicApi
5649 */
5650export declare const Output: OutputDecorator;
5651
5652/**
5653 * Type of the Output decorator / constructor function.
5654 *
5655 * @publicApi
5656 */
5657export declare interface OutputDecorator {
5658 /**
5659 * Decorator that marks a class field as an output property and supplies configuration metadata.
5660 * The DOM property bound to the output property is automatically updated during change detection.
5661 *
5662 * @usageNotes
5663 *
5664 * You can supply an optional name to use in templates when the
5665 * component is instantiated, that maps to the
5666 * name of the bound property. By default, the original
5667 * name of the bound property is used for output binding.
5668 *
5669 * See `Input` decorator for an example of providing a binding name.
5670 *
5671 * @see [Input and Output properties](guide/inputs-outputs)
5672 *
5673 */
5674 (bindingPropertyName?: string): any;
5675 new (bindingPropertyName?: string): any;
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 * Angular pipes marked as `standalone` do not need to be declared in an NgModule. Such
5712 * pipes don't depend on any "intermediate context" of an NgModule (ex. configured providers).
5713 *
5714 * More information about standalone components, directives, and pipes can be found in [this
5715 * guide](guide/standalone-components).
5716 */
5717 standalone?: boolean;
5718}
5719
5720/**
5721 * @Annotation
5722 * @publicApi
5723 */
5724export declare const Pipe: PipeDecorator;
5725
5726/**
5727 * Type of the Pipe decorator / constructor function.
5728 *
5729 * @publicApi
5730 */
5731export declare interface PipeDecorator {
5732 /**
5733 *
5734 * Decorator that marks a class as pipe and supplies configuration metadata.
5735 *
5736 * A pipe class must implement the `PipeTransform` interface.
5737 * For example, if the name is "myPipe", use a template binding expression
5738 * such as the following:
5739 *
5740 * ```
5741 * {{ exp | myPipe }}
5742 * ```
5743 *
5744 * The result of the expression is passed to the pipe's `transform()` method.
5745 *
5746 * A pipe must belong to an NgModule in order for it to be available
5747 * to a template. To make it a member of an NgModule,
5748 * list it in the `declarations` field of the `NgModule` metadata.
5749 *
5750 * @see [Style Guide: Pipe Names](guide/styleguide#02-09)
5751 *
5752 */
5753 (obj: Pipe): TypeDecorator;
5754 /**
5755 * See the `Pipe` decorator.
5756 */
5757 new (obj: Pipe): Pipe;
5758}
5759
5760declare type PipeDefList = ɵPipeDef<any>[];
5761
5762/**
5763 * Type used for PipeDefs on component definition.
5764 *
5765 * The function is necessary to be able to support forward declarations.
5766 */
5767declare type PipeDefListOrFactory = (() => PipeDefList) | PipeDefList;
5768
5769
5770/**
5771 * An interface that is implemented by pipes in order to perform a transformation.
5772 * Angular invokes the `transform` method with the value of a binding
5773 * as the first argument, and any parameters as the second argument in list form.
5774 *
5775 * @usageNotes
5776 *
5777 * In the following example, `TruncatePipe` returns the shortened value with an added ellipses.
5778 *
5779 * <code-example path="core/ts/pipes/simple_truncate.ts" header="simple_truncate.ts"></code-example>
5780 *
5781 * Invoking `{{ 'It was the best of times' | truncate }}` in a template will produce `It was...`.
5782 *
5783 * In the following example, `TruncatePipe` takes parameters that sets the truncated length and the
5784 * string to append with.
5785 *
5786 * <code-example path="core/ts/pipes/truncate.ts" header="truncate.ts"></code-example>
5787 *
5788 * Invoking `{{ 'It was the best of times' | truncate:4:'....' }}` in a template will produce `It
5789 * was the best....`.
5790 *
5791 * @publicApi
5792 */
5793export declare interface PipeTransform {
5794 transform(value: any, ...args: any[]): any;
5795}
5796
5797/**
5798 * A subclass of `Type` which has a static `ɵpipe`:`PipeDef` field making it
5799 * consumable for rendering.
5800 */
5801declare interface PipeType<T> extends Type<T> {
5802 ɵpipe: unknown;
5803}
5804
5805/**
5806 * A token that indicates an opaque platform ID.
5807 * @publicApi
5808 */
5809export declare const PLATFORM_ID: InjectionToken<Object>;
5810
5811/**
5812 * A function that is executed when a platform is initialized.
5813 * @publicApi
5814 */
5815export declare const PLATFORM_INITIALIZER: InjectionToken<(() => void)[]>;
5816
5817/**
5818 * This platform has to be included in any other platform
5819 *
5820 * @publicApi
5821 */
5822export declare const platformCore: (extraProviders?: StaticProvider[] | undefined) => PlatformRef;
5823
5824/**
5825 * The Angular platform is the entry point for Angular on a web page.
5826 * Each page has exactly one platform. Services (such as reflection) which are common
5827 * to every Angular application running on the page are bound in its scope.
5828 * A page's platform is initialized implicitly when a platform is created using a platform
5829 * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.
5830 *
5831 * @publicApi
5832 */
5833export declare class PlatformRef {
5834 private _injector;
5835 private _modules;
5836 private _destroyListeners;
5837 private _destroyed;
5838 /**
5839 * Creates an instance of an `@NgModule` for the given platform.
5840 *
5841 * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function
5842 * argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.
5843 */
5844 bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions): Promise<NgModuleRef<M>>;
5845 /**
5846 * Creates an instance of an `@NgModule` for a given platform.
5847 *
5848 * @usageNotes
5849 * ### Simple Example
5850 *
5851 * ```typescript
5852 * @NgModule({
5853 * imports: [BrowserModule]
5854 * })
5855 * class MyModule {}
5856 *
5857 * let moduleRef = platformBrowser().bootstrapModule(MyModule);
5858 * ```
5859 *
5860 */
5861 bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>>;
5862 private _moduleDoBootstrap;
5863 /**
5864 * Registers a listener to be called when the platform is destroyed.
5865 */
5866 onDestroy(callback: () => void): void;
5867 /**
5868 * Retrieves the platform {@link Injector}, which is the parent injector for
5869 * every Angular application on the page and provides singleton providers.
5870 */
5871 get injector(): Injector;
5872 /**
5873 * Destroys the current Angular platform and all Angular applications on the page.
5874 * Destroys all modules and listeners registered with the platform.
5875 */
5876 destroy(): void;
5877 /**
5878 * Indicates whether this instance was destroyed.
5879 */
5880 get destroyed(): boolean;
5881 static ɵfac: i0.ɵɵFactoryDeclaration<PlatformRef, never>;
5882 static ɵprov: i0.ɵɵInjectableDeclaration<PlatformRef>;
5883}
5884
5885declare interface PlatformReflectionCapabilities {
5886 factory(type: Type<any>): Function;
5887 hasLifecycleHook(type: any, lcProperty: string): boolean;
5888 /**
5889 * Return a list of annotations/types for constructor parameters
5890 */
5891 parameters(type: Type<any>): any[][];
5892 /**
5893 * Return a list of annotations declared on the class
5894 */
5895 annotations(type: Type<any>): any[];
5896 /**
5897 * Return a object literal which describes the annotations on Class fields/properties.
5898 */
5899 propMetadata(typeOrFunc: Type<any>): {
5900 [key: string]: any[];
5901 };
5902}
5903
5904/**
5905 * A boolean-valued function over a value, possibly including context information
5906 * regarding that value's position in an array.
5907 *
5908 * @publicApi
5909 */
5910export declare interface Predicate<T> {
5911 (value: T): boolean;
5912}
5913
5914declare const PREORDER_HOOK_FLAGS = 18;
5915
5916/** More flags associated with an LView (saved in LView[PREORDER_HOOK_FLAGS]) */
5917declare const enum PreOrderHookFlags {
5918 /**
5919 The index of the next pre-order hook to be called in the hooks array, on the first 16
5920 bits
5921 */
5922 IndexOfTheNextPreOrderHookMaskMask = 65535,
5923 /**
5924 * The number of init hooks that have already been called, on the last 16 bits
5925 */
5926 NumberOfInitHooksCalledIncrementer = 65536,
5927 NumberOfInitHooksCalledShift = 16,
5928 NumberOfInitHooksCalledMask = 4294901760
5929}
5930
5931/**
5932 * Describes a function that is used to process provider lists (such as provider
5933 * overrides).
5934 */
5935declare type ProcessProvidersFunction = (providers: Provider[]) => Provider[];
5936
5937/**
5938 * List of slots for a projection. A slot can be either based on a parsed CSS selector
5939 * which will be used to determine nodes which are projected into that slot.
5940 *
5941 * When set to "*", the slot is reserved and can be used for multi-slot projection
5942 * using {@link ViewContainerRef#createComponent}. The last slot that specifies the
5943 * wildcard selector will retrieve all projectable nodes which do not match any selector.
5944 */
5945declare type ProjectionSlots = (ɵCssSelectorList | '*')[];
5946
5947/**
5948 * This mapping is necessary so we can set input properties and output listeners
5949 * properly at runtime when property names are minified or aliased.
5950 *
5951 * Key: unminified / public input or output name
5952 * Value: array containing minified / internal name and related directive index
5953 *
5954 * The value must be an array to support inputs and outputs with the same name
5955 * on the same node.
5956 */
5957declare type PropertyAliases = {
5958 [key: string]: PropertyAliasValue;
5959};
5960
5961/**
5962 * Store the runtime input or output names for all the directives.
5963 *
5964 * i+0: directive instance index
5965 * i+1: privateName
5966 *
5967 * e.g. [0, 'change-minified']
5968 */
5969declare type PropertyAliasValue = (number | string)[];
5970
5971/**
5972 * Describes how the `Injector` should be configured.
5973 * @see ["Dependency Injection Guide"](guide/dependency-injection).
5974 *
5975 * @see `StaticProvider`
5976 *
5977 * @publicApi
5978 */
5979export declare type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | any[];
5980
5981/**
5982 * @description
5983 *
5984 * Token that can be used to retrieve an instance from an injector or through a query.
5985 *
5986 * @publicApi
5987 */
5988export declare type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToken<T>;
5989
5990/**
5991 * Testability API.
5992 * `declare` keyword causes tsickle to generate externs, so these methods are
5993 * not renamed by Closure Compiler.
5994 * @publicApi
5995 */
5996declare interface PublicTestability {
5997 isStable(): boolean;
5998 whenStable(callback: Function, timeout?: number, updateCallback?: Function): void;
5999 findProviders(using: any, provider: string, exactMatch: boolean): any[];
6000}
6001
6002declare const QUERIES = 19;
6003
6004/**
6005 * Type of the Query metadata.
6006 *
6007 * @publicApi
6008 */
6009export declare interface Query {
6010 descendants: boolean;
6011 emitDistinctChangesOnly: boolean;
6012 first: boolean;
6013 read: any;
6014 isViewQuery: boolean;
6015 selector: any;
6016 static?: boolean;
6017}
6018
6019/**
6020 * Base class for query metadata.
6021 *
6022 * @see `ContentChildren`.
6023 * @see `ContentChild`.
6024 * @see `ViewChildren`.
6025 * @see `ViewChild`.
6026 *
6027 * @publicApi
6028 */
6029export declare abstract class Query {
6030}
6031
6032/**
6033 * A set of flags to be used with Queries.
6034 *
6035 * NOTE: Ensure changes here are reflected in `packages/compiler/src/render3/view/compiler.ts`
6036 */
6037declare const enum QueryFlags {
6038 /**
6039 * No flags
6040 */
6041 none = 0,
6042 /**
6043 * Whether or not the query should descend into children.
6044 */
6045 descendants = 1,
6046 /**
6047 * The query can be computed statically and hence can be assigned eagerly.
6048 *
6049 * NOTE: Backwards compatibility with ViewEngine.
6050 */
6051 isStatic = 2,
6052 /**
6053 * If the `QueryList` should fire change event only if actual change to query was computed (vs old
6054 * behavior where the change was fired whenever the query was recomputed, even if the recomputed
6055 * query resulted in the same list.)
6056 */
6057 emitDistinctChangesOnly = 4
6058}
6059
6060/**
6061 * An unmodifiable list of items that Angular keeps up to date when the state
6062 * of the application changes.
6063 *
6064 * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}
6065 * provide.
6066 *
6067 * Implements an iterable interface, therefore it can be used in both ES6
6068 * javascript `for (var i of items)` loops as well as in Angular templates with
6069 * `*ngFor="let i of myList"`.
6070 *
6071 * Changes can be observed by subscribing to the changes `Observable`.
6072 *
6073 * NOTE: In the future this class will implement an `Observable` interface.
6074 *
6075 * @usageNotes
6076 * ### Example
6077 * ```typescript
6078 * @Component({...})
6079 * class Container {
6080 * @ViewChildren(Item) items:QueryList<Item>;
6081 * }
6082 * ```
6083 *
6084 * @publicApi
6085 */
6086export declare class QueryList<T> implements Iterable<T> {
6087 private _emitDistinctChangesOnly;
6088 readonly dirty = true;
6089 private _results;
6090 private _changesDetected;
6091 private _changes;
6092 readonly length: number;
6093 readonly first: T;
6094 readonly last: T;
6095 /**
6096 * Returns `Observable` of `QueryList` notifying the subscriber of changes.
6097 */
6098 get changes(): Observable<any>;
6099 /**
6100 * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change
6101 * has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in
6102 * the same result)
6103 */
6104 constructor(_emitDistinctChangesOnly?: boolean);
6105 /**
6106 * Returns the QueryList entry at `index`.
6107 */
6108 get(index: number): T | undefined;
6109 /**
6110 * See
6111 * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
6112 */
6113 map<U>(fn: (item: T, index: number, array: T[]) => U): U[];
6114 /**
6115 * See
6116 * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)
6117 */
6118 filter(fn: (item: T, index: number, array: T[]) => boolean): T[];
6119 /**
6120 * See
6121 * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)
6122 */
6123 find(fn: (item: T, index: number, array: T[]) => boolean): T | undefined;
6124 /**
6125 * See
6126 * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
6127 */
6128 reduce<U>(fn: (prevValue: U, curValue: T, curIndex: number, array: T[]) => U, init: U): U;
6129 /**
6130 * See
6131 * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)
6132 */
6133 forEach(fn: (item: T, index: number, array: T[]) => void): void;
6134 /**
6135 * See
6136 * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
6137 */
6138 some(fn: (value: T, index: number, array: T[]) => boolean): boolean;
6139 /**
6140 * Returns a copy of the internal results list as an Array.
6141 */
6142 toArray(): T[];
6143 toString(): string;
6144 /**
6145 * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that
6146 * on change detection, it will not notify of changes to the queries, unless a new change
6147 * occurs.
6148 *
6149 * @param resultsTree The query results to store
6150 * @param identityAccessor Optional function for extracting stable object identity from a value
6151 * in the array. This function is executed for each element of the query result list while
6152 * comparing current query list with the new one (provided as a first argument of the `reset`
6153 * function) to detect if the lists are different. If the function is not provided, elements
6154 * are compared as is (without any pre-processing).
6155 */
6156 reset(resultsTree: Array<T | any[]>, identityAccessor?: (value: T) => unknown): void;
6157 /**
6158 * Triggers a change event by emitting on the `changes` {@link EventEmitter}.
6159 */
6160 notifyOnChanges(): void;
6161 /** internal */
6162 setDirty(): void;
6163 /** internal */
6164 destroy(): void;
6165 [Symbol.iterator]: () => Iterator<T>;
6166}
6167
6168declare interface R3DeclareComponentFacade extends R3DeclareDirectiveFacade {
6169 template: string;
6170 isInline?: boolean;
6171 styles?: string[];
6172 dependencies?: R3DeclareTemplateDependencyFacade[];
6173 components?: R3DeclareDirectiveDependencyFacade[];
6174 directives?: R3DeclareDirectiveDependencyFacade[];
6175 pipes?: {
6176 [pipeName: string]: OpaqueValue | (() => OpaqueValue);
6177 };
6178 viewProviders?: OpaqueValue;
6179 animations?: OpaqueValue;
6180 changeDetection?: ChangeDetectionStrategy_2;
6181 encapsulation?: ViewEncapsulation_2;
6182 interpolation?: [string, string];
6183 preserveWhitespaces?: boolean;
6184}
6185
6186declare interface R3DeclareDependencyMetadataFacade {
6187 token: OpaqueValue;
6188 attribute?: boolean;
6189 host?: boolean;
6190 optional?: boolean;
6191 self?: boolean;
6192 skipSelf?: boolean;
6193}
6194
6195declare interface R3DeclareDirectiveDependencyFacade {
6196 kind?: 'directive' | 'component';
6197 selector: string;
6198 type: OpaqueValue | (() => OpaqueValue);
6199 inputs?: string[];
6200 outputs?: string[];
6201 exportAs?: string[];
6202}
6203
6204declare interface R3DeclareDirectiveFacade {
6205 selector?: string;
6206 type: Type_2;
6207 inputs?: {
6208 [classPropertyName: string]: string | [string, string];
6209 };
6210 outputs?: {
6211 [classPropertyName: string]: string;
6212 };
6213 host?: {
6214 attributes?: {
6215 [key: string]: OpaqueValue;
6216 };
6217 listeners?: {
6218 [key: string]: string;
6219 };
6220 properties?: {
6221 [key: string]: string;
6222 };
6223 classAttribute?: string;
6224 styleAttribute?: string;
6225 };
6226 queries?: R3DeclareQueryMetadataFacade[];
6227 viewQueries?: R3DeclareQueryMetadataFacade[];
6228 providers?: OpaqueValue;
6229 exportAs?: string[];
6230 usesInheritance?: boolean;
6231 usesOnChanges?: boolean;
6232 isStandalone?: boolean;
6233 hostDirectives?: R3HostDirectiveMetadataFacade[] | null;
6234}
6235
6236declare interface R3DeclareFactoryFacade {
6237 type: Type_2;
6238 deps: R3DeclareDependencyMetadataFacade[] | 'invalid' | null;
6239 target: ɵɵFactoryTarget;
6240}
6241
6242declare interface R3DeclareInjectableFacade {
6243 type: Type_2;
6244 providedIn?: Type_2 | 'root' | 'platform' | 'any' | null;
6245 useClass?: OpaqueValue;
6246 useFactory?: OpaqueValue;
6247 useExisting?: OpaqueValue;
6248 useValue?: OpaqueValue;
6249 deps?: R3DeclareDependencyMetadataFacade[];
6250}
6251
6252declare interface R3DeclareInjectorFacade {
6253 type: Type_2;
6254 imports?: OpaqueValue[];
6255 providers?: OpaqueValue[];
6256}
6257
6258declare interface R3DeclareNgModuleDependencyFacade {
6259 kind: 'ngmodule';
6260 type: OpaqueValue | (() => OpaqueValue);
6261}
6262
6263declare interface R3DeclareNgModuleFacade {
6264 type: Type_2;
6265 bootstrap?: OpaqueValue[] | (() => OpaqueValue[]);
6266 declarations?: OpaqueValue[] | (() => OpaqueValue[]);
6267 imports?: OpaqueValue[] | (() => OpaqueValue[]);
6268 exports?: OpaqueValue[] | (() => OpaqueValue[]);
6269 schemas?: OpaqueValue[];
6270 id?: OpaqueValue;
6271}
6272
6273declare interface R3DeclarePipeDependencyFacade {
6274 kind?: 'pipe';
6275 name: string;
6276 type: OpaqueValue | (() => OpaqueValue);
6277}
6278
6279declare interface R3DeclarePipeFacade {
6280 type: Type_2;
6281 name: string;
6282 pure?: boolean;
6283 isStandalone?: boolean;
6284}
6285
6286declare interface R3DeclareQueryMetadataFacade {
6287 propertyName: string;
6288 first?: boolean;
6289 predicate: OpaqueValue | string[];
6290 descendants?: boolean;
6291 read?: OpaqueValue;
6292 static?: boolean;
6293 emitDistinctChangesOnly?: boolean;
6294}
6295
6296declare type R3DeclareTemplateDependencyFacade = {
6297 kind: string;
6298} & (R3DeclareDirectiveDependencyFacade | R3DeclarePipeDependencyFacade | R3DeclareNgModuleDependencyFacade);
6299
6300declare interface R3HostDirectiveMetadataFacade {
6301 directive: Type_2;
6302 inputs?: string[];
6303 outputs?: string[];
6304}
6305
6306declare class R3Injector extends EnvironmentInjector {
6307 readonly parent: Injector;
6308 readonly source: string | null;
6309 readonly scopes: Set<InjectorScope>;
6310 /**
6311 * Map of tokens to records which contain the instances of those tokens.
6312 * - `null` value implies that we don't have the record. Used by tree-shakable injectors
6313 * to prevent further searches.
6314 */
6315 private records;
6316 /**
6317 * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
6318 */
6319 private _ngOnDestroyHooks;
6320 private _onDestroyHooks;
6321 /**
6322 * Flag indicating that this injector was previously destroyed.
6323 */
6324 get destroyed(): boolean;
6325 private _destroyed;
6326 private injectorDefTypes;
6327 constructor(providers: Array<Provider | EnvironmentProviders>, parent: Injector, source: string | null, scopes: Set<InjectorScope>);
6328 /**
6329 * Destroy the injector and release references to every instance or provider associated with it.
6330 *
6331 * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a
6332 * hook was found.
6333 */
6334 destroy(): void;
6335 onDestroy(callback: () => void): void;
6336 runInContext<ReturnT>(fn: () => ReturnT): ReturnT;
6337 get<T>(token: ProviderToken<T>, notFoundValue?: any, flags?: InjectFlags | InjectOptions): T;
6338 toString(): string;
6339 private assertNotDestroyed;
6340 /**
6341 * Process a `SingleProvider` and add it.
6342 */
6343 private processProvider;
6344 private hydrate;
6345 private injectableDefInScope;
6346}
6347
6348declare interface RComment extends RNode {
6349 textContent: string | null;
6350}
6351
6352declare interface RCssStyleDeclaration {
6353 removeProperty(propertyName: string): string;
6354 setProperty(propertyName: string, value: string | null, priority?: string): void;
6355}
6356
6357declare interface RDomTokenList {
6358 add(token: string): void;
6359 remove(token: string): void;
6360}
6361
6362/**
6363 * Creates an object that allows to retrieve component metadata.
6364 *
6365 * @usageNotes
6366 *
6367 * The example below demonstrates how to use the function and how the fields
6368 * of the returned object map to the component metadata.
6369 *
6370 * ```typescript
6371 * @Component({
6372 * standalone: true,
6373 * selector: 'foo-component',
6374 * template: `
6375 * <ng-content></ng-content>
6376 * <ng-content select="content-selector-a"></ng-content>
6377 * `,
6378 * })
6379 * class FooComponent {
6380 * @Input('inputName') inputPropName: string;
6381 * @Output('outputName') outputPropName = new EventEmitter<void>();
6382 * }
6383 *
6384 * const mirror = reflectComponentType(FooComponent);
6385 * expect(mirror.type).toBe(FooComponent);
6386 * expect(mirror.selector).toBe('foo-component');
6387 * expect(mirror.isStandalone).toBe(true);
6388 * expect(mirror.inputs).toEqual([{propName: 'inputName', templateName: 'inputPropName'}]);
6389 * expect(mirror.outputs).toEqual([{propName: 'outputName', templateName: 'outputPropName'}]);
6390 * expect(mirror.ngContentSelectors).toEqual([
6391 * '*', // first `<ng-content>` in a template, the selector defaults to `*`
6392 * 'content-selector-a' // second `<ng-content>` in a template
6393 * ]);
6394 * ```
6395 *
6396 * @param component Component class reference.
6397 * @returns An object that allows to retrieve component metadata.
6398 *
6399 * @publicApi
6400 */
6401export declare function reflectComponentType<C>(component: Type<C>): ComponentMirror<C> | null;
6402
6403/**
6404 * `Dependency` is used by the framework to extend DI.
6405 * This is internal to Angular and should not be used directly.
6406 */
6407declare class ReflectiveDependency {
6408 key: ReflectiveKey;
6409 optional: boolean;
6410 visibility: Self | SkipSelf | null;
6411 constructor(key: ReflectiveKey, optional: boolean, visibility: Self | SkipSelf | null);
6412 static fromKey(key: ReflectiveKey): ReflectiveDependency;
6413}
6414
6415/**
6416 * A ReflectiveDependency injection container used for instantiating objects and resolving
6417 * dependencies.
6418 *
6419 * An `Injector` is a replacement for a `new` operator, which can automatically resolve the
6420 * constructor dependencies.
6421 *
6422 * In typical use, application code asks for the dependencies in the constructor and they are
6423 * resolved by the `Injector`.
6424 *
6425 * @usageNotes
6426 * ### Example
6427 *
6428 * The following example creates an `Injector` configured to create `Engine` and `Car`.
6429 *
6430 * ```typescript
6431 * @Injectable()
6432 * class Engine {
6433 * }
6434 *
6435 * @Injectable()
6436 * class Car {
6437 * constructor(public engine:Engine) {}
6438 * }
6439 *
6440 * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
6441 * var car = injector.get(Car);
6442 * expect(car instanceof Car).toBe(true);
6443 * expect(car.engine instanceof Engine).toBe(true);
6444 * ```
6445 *
6446 * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`
6447 * resolve all of the object's dependencies automatically.
6448 *
6449 * TODO: delete in v14.
6450 *
6451 * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.
6452 * @publicApi
6453 */
6454export declare abstract class ReflectiveInjector implements Injector {
6455 /**
6456 * Turns an array of provider definitions into an array of resolved providers.
6457 *
6458 * A resolution is a process of flattening multiple nested arrays and converting individual
6459 * providers into an array of `ResolvedReflectiveProvider`s.
6460 *
6461 * @usageNotes
6462 * ### Example
6463 *
6464 * ```typescript
6465 * @Injectable()
6466 * class Engine {
6467 * }
6468 *
6469 * @Injectable()
6470 * class Car {
6471 * constructor(public engine:Engine) {}
6472 * }
6473 *
6474 * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);
6475 *
6476 * expect(providers.length).toEqual(2);
6477 *
6478 * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);
6479 * expect(providers[0].key.displayName).toBe("Car");
6480 * expect(providers[0].dependencies.length).toEqual(1);
6481 * expect(providers[0].factory).toBeDefined();
6482 *
6483 * expect(providers[1].key.displayName).toBe("Engine");
6484 * });
6485 * ```
6486 *
6487 */
6488 static resolve(providers: Provider[]): ResolvedReflectiveProvider[];
6489 /**
6490 * Resolves an array of providers and creates an injector from those providers.
6491 *
6492 * The passed-in providers can be an array of `Type`, `Provider`,
6493 * or a recursive array of more providers.
6494 *
6495 * @usageNotes
6496 * ### Example
6497 *
6498 * ```typescript
6499 * @Injectable()
6500 * class Engine {
6501 * }
6502 *
6503 * @Injectable()
6504 * class Car {
6505 * constructor(public engine:Engine) {}
6506 * }
6507 *
6508 * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);
6509 * expect(injector.get(Car) instanceof Car).toBe(true);
6510 * ```
6511 */
6512 static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector;
6513 /**
6514 * Creates an injector from previously resolved providers.
6515 *
6516 * This API is the recommended way to construct injectors in performance-sensitive parts.
6517 *
6518 * @usageNotes
6519 * ### Example
6520 *
6521 * ```typescript
6522 * @Injectable()
6523 * class Engine {
6524 * }
6525 *
6526 * @Injectable()
6527 * class Car {
6528 * constructor(public engine:Engine) {}
6529 * }
6530 *
6531 * var providers = ReflectiveInjector.resolve([Car, Engine]);
6532 * var injector = ReflectiveInjector.fromResolvedProviders(providers);
6533 * expect(injector.get(Car) instanceof Car).toBe(true);
6534 * ```
6535 */
6536 static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector;
6537 /**
6538 * Parent of this injector.
6539 *
6540 * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
6541 * -->
6542 */
6543 abstract get parent(): Injector | null;
6544 /**
6545 * Resolves an array of providers and creates a child injector from those providers.
6546 *
6547 * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
6548 * -->
6549 *
6550 * The passed-in providers can be an array of `Type`, `Provider`,
6551 * or a recursive array of more providers.
6552 *
6553 * @usageNotes
6554 * ### Example
6555 *
6556 * ```typescript
6557 * class ParentProvider {}
6558 * class ChildProvider {}
6559 *
6560 * var parent = ReflectiveInjector.resolveAndCreate([ParentProvider]);
6561 * var child = parent.resolveAndCreateChild([ChildProvider]);
6562 *
6563 * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
6564 * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
6565 * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
6566 * ```
6567 */
6568 abstract resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
6569 /**
6570 * Creates a child injector from previously resolved providers.
6571 *
6572 * <!-- TODO: Add a link to the section of the user guide talking about hierarchical injection.
6573 * -->
6574 *
6575 * This API is the recommended way to construct injectors in performance-sensitive parts.
6576 *
6577 * @usageNotes
6578 * ### Example
6579 *
6580 * ```typescript
6581 * class ParentProvider {}
6582 * class ChildProvider {}
6583 *
6584 * var parentProviders = ReflectiveInjector.resolve([ParentProvider]);
6585 * var childProviders = ReflectiveInjector.resolve([ChildProvider]);
6586 *
6587 * var parent = ReflectiveInjector.fromResolvedProviders(parentProviders);
6588 * var child = parent.createChildFromResolved(childProviders);
6589 *
6590 * expect(child.get(ParentProvider) instanceof ParentProvider).toBe(true);
6591 * expect(child.get(ChildProvider) instanceof ChildProvider).toBe(true);
6592 * expect(child.get(ParentProvider)).toBe(parent.get(ParentProvider));
6593 * ```
6594 */
6595 abstract createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
6596 /**
6597 * Resolves a provider and instantiates an object in the context of the injector.
6598 *
6599 * The created object does not get cached by the injector.
6600 *
6601 * @usageNotes
6602 * ### Example
6603 *
6604 * ```typescript
6605 * @Injectable()
6606 * class Engine {
6607 * }
6608 *
6609 * @Injectable()
6610 * class Car {
6611 * constructor(public engine:Engine) {}
6612 * }
6613 *
6614 * var injector = ReflectiveInjector.resolveAndCreate([Engine]);
6615 *
6616 * var car = injector.resolveAndInstantiate(Car);
6617 * expect(car.engine).toBe(injector.get(Engine));
6618 * expect(car).not.toBe(injector.resolveAndInstantiate(Car));
6619 * ```
6620 */
6621 abstract resolveAndInstantiate(provider: Provider): any;
6622 /**
6623 * Instantiates an object using a resolved provider in the context of the injector.
6624 *
6625 * The created object does not get cached by the injector.
6626 *
6627 * @usageNotes
6628 * ### Example
6629 *
6630 * ```typescript
6631 * @Injectable()
6632 * class Engine {
6633 * }
6634 *
6635 * @Injectable()
6636 * class Car {
6637 * constructor(public engine:Engine) {}
6638 * }
6639 *
6640 * var injector = ReflectiveInjector.resolveAndCreate([Engine]);
6641 * var carProvider = ReflectiveInjector.resolve([Car])[0];
6642 * var car = injector.instantiateResolved(carProvider);
6643 * expect(car.engine).toBe(injector.get(Engine));
6644 * expect(car).not.toBe(injector.instantiateResolved(carProvider));
6645 * ```
6646 */
6647 abstract instantiateResolved(provider: ResolvedReflectiveProvider): any;
6648 abstract get(token: any, notFoundValue?: any): any;
6649}
6650
6651
6652/**
6653 * A unique object used for retrieving items from the {@link ReflectiveInjector}.
6654 *
6655 * Keys have:
6656 * - a system-wide unique `id`.
6657 * - a `token`.
6658 *
6659 * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows
6660 * the
6661 * injector to store created objects in a more efficient way.
6662 *
6663 * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when
6664 * resolving
6665 * providers.
6666 *
6667 * @deprecated No replacement
6668 * @publicApi
6669 */
6670export declare class ReflectiveKey {
6671 token: Object;
6672 id: number;
6673 readonly displayName: string;
6674 /**
6675 * Private
6676 */
6677 constructor(token: Object, id: number);
6678 /**
6679 * Retrieves a `Key` for a token.
6680 */
6681 static get(token: Object): ReflectiveKey;
6682 /**
6683 * @returns the number of keys registered in the system.
6684 */
6685 static get numberOfKeys(): number;
6686}
6687
6688/**
6689 * Subset of API needed for writing attributes, properties, and setting up
6690 * listeners on Element.
6691 */
6692declare interface RElement extends RNode {
6693 style: RCssStyleDeclaration;
6694 classList: RDomTokenList;
6695 className: string;
6696 tagName: string;
6697 textContent: string | null;
6698 setAttribute(name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL): void;
6699 removeAttribute(name: string): void;
6700 setAttributeNS(namespaceURI: string, qualifiedName: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL): void;
6701 addEventListener(type: string, listener: EventListener, useCapture?: boolean): void;
6702 removeEventListener(type: string, listener?: EventListener, options?: boolean): void;
6703 setProperty?(name: string, value: any): void;
6704}
6705
6706declare const RENDERER = 11;
6707
6708/**
6709 * Procedural style of API needed to create elements and text nodes.
6710 *
6711 * In non-native browser environments (e.g. platforms such as web-workers), this is the
6712 * facade that enables element manipulation. In practice, this is implemented by `Renderer2`.
6713 */
6714declare interface Renderer {
6715 destroy(): void;
6716 createComment(value: string): RComment;
6717 createElement(name: string, namespace?: string | null): RElement;
6718 createText(value: string): RText;
6719 /**
6720 * This property is allowed to be null / undefined,
6721 * in which case the view engine won't call it.
6722 * This is used as a performance optimization for production mode.
6723 */
6724 destroyNode?: ((node: RNode) => void) | null;
6725 appendChild(parent: RElement, newChild: RNode): void;
6726 insertBefore(parent: RNode, newChild: RNode, refChild: RNode | null, isMove?: boolean): void;
6727 removeChild(parent: RElement, oldChild: RNode, isHostElement?: boolean): void;
6728 selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): RElement;
6729 parentNode(node: RNode): RElement | null;
6730 nextSibling(node: RNode): RNode | null;
6731 setAttribute(el: RElement, name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL, namespace?: string | null): void;
6732 removeAttribute(el: RElement, name: string, namespace?: string | null): void;
6733 addClass(el: RElement, name: string): void;
6734 removeClass(el: RElement, name: string): void;
6735 setStyle(el: RElement, style: string, value: any, flags?: RendererStyleFlags2): void;
6736 removeStyle(el: RElement, style: string, flags?: RendererStyleFlags2): void;
6737 setProperty(el: RElement, name: string, value: any): void;
6738 setValue(node: RText | RComment, value: string): void;
6739 listen(target: GlobalTargetName | RNode, eventName: string, callback: (event: any) => boolean | void): () => void;
6740}
6741
6742/**
6743 * Extend this base class to implement custom rendering. By default, Angular
6744 * renders a template into DOM. You can use custom rendering to intercept
6745 * rendering calls, or to render to something other than DOM.
6746 *
6747 * Create your custom renderer using `RendererFactory2`.
6748 *
6749 * Use a custom renderer to bypass Angular's templating and
6750 * make custom UI changes that can't be expressed declaratively.
6751 * For example if you need to set a property or an attribute whose name is
6752 * not statically known, use the `setProperty()` or
6753 * `setAttribute()` method.
6754 *
6755 * @publicApi
6756 */
6757export declare abstract class Renderer2 {
6758 /**
6759 * Use to store arbitrary developer-defined data on a renderer instance,
6760 * as an object containing key-value pairs.
6761 * This is useful for renderers that delegate to other renderers.
6762 */
6763 abstract get data(): {
6764 [key: string]: any;
6765 };
6766 /**
6767 * Implement this callback to destroy the renderer or the host element.
6768 */
6769 abstract destroy(): void;
6770 /**
6771 * Implement this callback to create an instance of the host element.
6772 * @param name An identifying name for the new element, unique within the namespace.
6773 * @param namespace The namespace for the new element.
6774 * @returns The new element.
6775 */
6776 abstract createElement(name: string, namespace?: string | null): any;
6777 /**
6778 * Implement this callback to add a comment to the DOM of the host element.
6779 * @param value The comment text.
6780 * @returns The modified element.
6781 */
6782 abstract createComment(value: string): any;
6783 /**
6784 * Implement this callback to add text to the DOM of the host element.
6785 * @param value The text string.
6786 * @returns The modified element.
6787 */
6788 abstract createText(value: string): any;
6789 /**
6790 * If null or undefined, the view engine won't call it.
6791 * This is used as a performance optimization for production mode.
6792 */
6793 destroyNode: ((node: any) => void) | null;
6794 /**
6795 * Appends a child to a given parent node in the host element DOM.
6796 * @param parent The parent node.
6797 * @param newChild The new child node.
6798 */
6799 abstract appendChild(parent: any, newChild: any): void;
6800 /**
6801 * Implement this callback to insert a child node at a given position in a parent node
6802 * in the host element DOM.
6803 * @param parent The parent node.
6804 * @param newChild The new child nodes.
6805 * @param refChild The existing child node before which `newChild` is inserted.
6806 * @param isMove Optional argument which signifies if the current `insertBefore` is a result of a
6807 * move. Animation uses this information to trigger move animations. In the past the Animation
6808 * would always assume that any `insertBefore` is a move. This is not strictly true because
6809 * with runtime i18n it is possible to invoke `insertBefore` as a result of i18n and it should
6810 * not trigger an animation move.
6811 */
6812 abstract insertBefore(parent: any, newChild: any, refChild: any, isMove?: boolean): void;
6813 /**
6814 * Implement this callback to remove a child node from the host element's DOM.
6815 * @param parent The parent node.
6816 * @param oldChild The child node to remove.
6817 * @param isHostElement Optionally signal to the renderer whether this element is a host element
6818 * or not
6819 */
6820 abstract removeChild(parent: any, oldChild: any, isHostElement?: boolean): void;
6821 /**
6822 * Implement this callback to prepare an element to be bootstrapped
6823 * as a root element, and return the element instance.
6824 * @param selectorOrNode The DOM element.
6825 * @param preserveContent Whether the contents of the root element
6826 * should be preserved, or cleared upon bootstrap (default behavior).
6827 * Use with `ViewEncapsulation.ShadowDom` to allow simple native
6828 * content projection via `<slot>` elements.
6829 * @returns The root element.
6830 */
6831 abstract selectRootElement(selectorOrNode: string | any, preserveContent?: boolean): any;
6832 /**
6833 * Implement this callback to get the parent of a given node
6834 * in the host element's DOM.
6835 * @param node The child node to query.
6836 * @returns The parent node, or null if there is no parent.
6837 * For WebWorkers, always returns true.
6838 * This is because the check is synchronous,
6839 * and the caller can't rely on checking for null.
6840 */
6841 abstract parentNode(node: any): any;
6842 /**
6843 * Implement this callback to get the next sibling node of a given node
6844 * in the host element's DOM.
6845 * @returns The sibling node, or null if there is no sibling.
6846 * For WebWorkers, always returns a value.
6847 * This is because the check is synchronous,
6848 * and the caller can't rely on checking for null.
6849 */
6850 abstract nextSibling(node: any): any;
6851 /**
6852 * Implement this callback to set an attribute value for an element in the DOM.
6853 * @param el The element.
6854 * @param name The attribute name.
6855 * @param value The new value.
6856 * @param namespace The namespace.
6857 */
6858 abstract setAttribute(el: any, name: string, value: string, namespace?: string | null): void;
6859 /**
6860 * Implement this callback to remove an attribute from an element in the DOM.
6861 * @param el The element.
6862 * @param name The attribute name.
6863 * @param namespace The namespace.
6864 */
6865 abstract removeAttribute(el: any, name: string, namespace?: string | null): void;
6866 /**
6867 * Implement this callback to add a class to an element in the DOM.
6868 * @param el The element.
6869 * @param name The class name.
6870 */
6871 abstract addClass(el: any, name: string): void;
6872 /**
6873 * Implement this callback to remove a class from an element in the DOM.
6874 * @param el The element.
6875 * @param name The class name.
6876 */
6877 abstract removeClass(el: any, name: string): void;
6878 /**
6879 * Implement this callback to set a CSS style for an element in the DOM.
6880 * @param el The element.
6881 * @param style The name of the style.
6882 * @param value The new value.
6883 * @param flags Flags for style variations. No flags are set by default.
6884 */
6885 abstract setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void;
6886 /**
6887 * Implement this callback to remove the value from a CSS style for an element in the DOM.
6888 * @param el The element.
6889 * @param style The name of the style.
6890 * @param flags Flags for style variations to remove, if set. ???
6891 */
6892 abstract removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void;
6893 /**
6894 * Implement this callback to set the value of a property of an element in the DOM.
6895 * @param el The element.
6896 * @param name The property name.
6897 * @param value The new value.
6898 */
6899 abstract setProperty(el: any, name: string, value: any): void;
6900 /**
6901 * Implement this callback to set the value of a node in the host element.
6902 * @param node The node.
6903 * @param value The new value.
6904 */
6905 abstract setValue(node: any, value: string): void;
6906 /**
6907 * Implement this callback to start an event listener.
6908 * @param target The context in which to listen for events. Can be
6909 * the entire window or document, the body of the document, or a specific
6910 * DOM element.
6911 * @param eventName The event to listen for.
6912 * @param callback A handler function to invoke when the event occurs.
6913 * @returns An "unlisten" function for disposing of this handler.
6914 */
6915 abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void;
6916}
6917
6918declare const RENDERER_FACTORY = 10;
6919
6920declare interface RendererFactory {
6921 createRenderer(hostElement: RElement | null, rendererType: RendererType2 | null): Renderer;
6922 begin?(): void;
6923 end?(): void;
6924}
6925
6926/**
6927 * Creates and initializes a custom renderer that implements the `Renderer2` base class.
6928 *
6929 * @publicApi
6930 */
6931export declare abstract class RendererFactory2 {
6932 /**
6933 * Creates and initializes a custom renderer for a host DOM element.
6934 * @param hostElement The element to render.
6935 * @param type The base class to implement.
6936 * @returns The new custom renderer instance.
6937 */
6938 abstract createRenderer(hostElement: any, type: RendererType2 | null): Renderer2;
6939 /**
6940 * A callback invoked when rendering has begun.
6941 */
6942 abstract begin?(): void;
6943 /**
6944 * A callback invoked when rendering has completed.
6945 */
6946 abstract end?(): void;
6947 /**
6948 * Use with animations test-only mode. Notifies the test when rendering has completed.
6949 * @returns The asynchronous result of the developer-defined function.
6950 */
6951 abstract whenRenderingDone?(): Promise<any>;
6952}
6953
6954/**
6955 * Flags for renderer-specific style modifiers.
6956 * @publicApi
6957 */
6958export declare enum RendererStyleFlags2 {
6959 /**
6960 * Marks a style as important.
6961 */
6962 Important = 1,
6963 /**
6964 * Marks a style as using dash case naming (this-is-dash-case).
6965 */
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
7118declare interface RText extends RNode {
7119 textContent: string | null;
7120}
7121
7122
7123/**
7124 * The list of error codes used in runtime code of the `core` package.
7125 * Reserved error code range: 100-999.
7126 *
7127 * Note: the minus sign denotes the fact that a particular code has a detailed guide on
7128 * angular.io. This extra annotation is needed to avoid introducing a separate set to store
7129 * error codes which have guides, which might leak into runtime code.
7130 *
7131 * Full list of available error guides can be found at https://angular.io/errors.
7132 */
7133declare const enum RuntimeErrorCode {
7134 EXPRESSION_CHANGED_AFTER_CHECKED = -100,
7135 RECURSIVE_APPLICATION_REF_TICK = 101,
7136 CYCLIC_DI_DEPENDENCY = -200,
7137 PROVIDER_NOT_FOUND = -201,
7138 INVALID_FACTORY_DEPENDENCY = 202,
7139 MISSING_INJECTION_CONTEXT = -203,
7140 INVALID_INJECTION_TOKEN = 204,
7141 INJECTOR_ALREADY_DESTROYED = 205,
7142 PROVIDER_IN_WRONG_CONTEXT = 207,
7143 MISSING_INJECTION_TOKEN = 208,
7144 INVALID_MULTI_PROVIDER = -209,
7145 MULTIPLE_COMPONENTS_MATCH = -300,
7146 EXPORT_NOT_FOUND = -301,
7147 PIPE_NOT_FOUND = -302,
7148 UNKNOWN_BINDING = 303,
7149 UNKNOWN_ELEMENT = 304,
7150 TEMPLATE_STRUCTURE_ERROR = 305,
7151 INVALID_EVENT_BINDING = 306,
7152 HOST_DIRECTIVE_UNRESOLVABLE = 307,
7153 HOST_DIRECTIVE_NOT_STANDALONE = 308,
7154 DUPLICATE_DIRECTITVE = 309,
7155 HOST_DIRECTIVE_COMPONENT = 310,
7156 HOST_DIRECTIVE_UNDEFINED_BINDING = 311,
7157 HOST_DIRECTIVE_CONFLICTING_ALIAS = 312,
7158 MULTIPLE_PLATFORMS = 400,
7159 PLATFORM_NOT_FOUND = 401,
7160 ERROR_HANDLER_NOT_FOUND = 402,
7161 BOOTSTRAP_COMPONENTS_NOT_FOUND = -403,
7162 PLATFORM_ALREADY_DESTROYED = 404,
7163 ASYNC_INITIALIZERS_STILL_RUNNING = 405,
7164 APPLICATION_REF_ALREADY_DESTROYED = 406,
7165 RENDERER_NOT_FOUND = 407,
7166 INVALID_I18N_STRUCTURE = 700,
7167 MISSING_LOCALE_DATA = 701,
7168 IMPORT_PROVIDERS_FROM_STANDALONE = 800,
7169 INVALID_DIFFER_INPUT = 900,
7170 NO_SUPPORTING_DIFFER_FACTORY = 901,
7171 VIEW_ALREADY_ATTACHED = 902,
7172 INVALID_INHERITANCE = 903,
7173 UNSAFE_VALUE_IN_RESOURCE_URL = 904,
7174 UNSAFE_VALUE_IN_SCRIPT = 905,
7175 MISSING_GENERATED_DEF = 906,
7176 TYPE_IS_NOT_STANDALONE = 907,
7177 MISSING_ZONEJS = 908,
7178 UNEXPECTED_ZONE_STATE = 909,
7179 UNSAFE_IFRAME_ATTRS = -910
7180}
7181
7182declare const SANITIZER = 12;
7183
7184/**
7185 * Sanitizer is used by the views to sanitize potentially dangerous values.
7186 *
7187 * @publicApi
7188 */
7189export declare abstract class Sanitizer {
7190 abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;
7191 /** @nocollapse */
7192 static ɵprov: unknown;
7193}
7194
7195/**
7196 * Function used to sanitize the value before writing it into the renderer.
7197 */
7198declare type SanitizerFn = (value: any, tagName?: string, propName?: string) => string | TrustedHTML | TrustedScript | TrustedScriptURL;
7199
7200
7201/**
7202 * A schema definition associated with an NgModule.
7203 *
7204 * @see `@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`
7205 *
7206 * @param name The name of a defined schema.
7207 *
7208 * @publicApi
7209 */
7210export declare interface SchemaMetadata {
7211 name: string;
7212}
7213
7214
7215/**
7216 * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
7217 * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
7218 * handled.
7219 *
7220 * See DomSanitizer for more details on security in Angular applications.
7221 *
7222 * @publicApi
7223 */
7224export declare enum SecurityContext {
7225 NONE = 0,
7226 HTML = 1,
7227 STYLE = 2,
7228 SCRIPT = 3,
7229 URL = 4,
7230 RESOURCE_URL = 5
7231}
7232
7233/** Flags used to build up CssSelectors */
7234declare const enum SelectorFlags {
7235 /** Indicates this is the beginning of a new negative selector */
7236 NOT = 1,
7237 /** Mode for matching attributes */
7238 ATTRIBUTE = 2,
7239 /** Mode for matching tag names */
7240 ELEMENT = 4,
7241 /** Mode for matching class names */
7242 CLASS = 8
7243}
7244
7245/**
7246 * Type of the Self metadata.
7247 *
7248 * @publicApi
7249 */
7250export declare interface Self {
7251}
7252
7253/**
7254 * Self decorator and metadata.
7255 *
7256 * @Annotation
7257 * @publicApi
7258 */
7259export declare const Self: SelfDecorator;
7260
7261/**
7262 * Type of the Self decorator / constructor function.
7263 *
7264 * @publicApi
7265 */
7266export declare interface SelfDecorator {
7267 /**
7268 * Parameter decorator to be used on constructor parameters,
7269 * which tells the DI framework to start dependency resolution from the local injector.
7270 *
7271 * Resolution works upward through the injector hierarchy, so the children
7272 * of this class must configure their own providers or be prepared for a `null` result.
7273 *
7274 * @usageNotes
7275 *
7276 * In the following example, the dependency can be resolved
7277 * by the local injector when instantiating the class itself, but not
7278 * when instantiating a child.
7279 *
7280 * <code-example path="core/di/ts/metadata_spec.ts" region="Self">
7281 * </code-example>
7282 *
7283 * @see `SkipSelf`
7284 * @see `Optional`
7285 *
7286 */
7287 (): any;
7288 new (): Self;
7289}
7290
7291/**
7292 * Set the {@link GetTestability} implementation used by the Angular testing framework.
7293 * @publicApi
7294 */
7295export declare function setTestabilityGetter(getter: GetTestability): void;
7296
7297
7298/**
7299 * Represents a basic change from a previous to a new value for a single
7300 * property on a directive instance. Passed as a value in a
7301 * {@link SimpleChanges} object to the `ngOnChanges` hook.
7302 *
7303 * @see `OnChanges`
7304 *
7305 * @publicApi
7306 */
7307export declare class SimpleChange {
7308 previousValue: any;
7309 currentValue: any;
7310 firstChange: boolean;
7311 constructor(previousValue: any, currentValue: any, firstChange: boolean);
7312 /**
7313 * Check whether the new value is the first value assigned.
7314 */
7315 isFirstChange(): boolean;
7316}
7317
7318/**
7319 * A hashtable of changes represented by {@link SimpleChange} objects stored
7320 * at the declared property name they belong to on a Directive or Component. This is
7321 * the type passed to the `ngOnChanges` hook.
7322 *
7323 * @see `OnChanges`
7324 *
7325 * @publicApi
7326 */
7327export declare interface SimpleChanges {
7328 [propName: string]: SimpleChange;
7329}
7330
7331/**
7332 * Type of the `SkipSelf` metadata.
7333 *
7334 * @publicApi
7335 */
7336export declare interface SkipSelf {
7337}
7338
7339/**
7340 * `SkipSelf` decorator and metadata.
7341 *
7342 * @Annotation
7343 * @publicApi
7344 */
7345export declare const SkipSelf: SkipSelfDecorator;
7346
7347/**
7348 * Type of the `SkipSelf` decorator / constructor function.
7349 *
7350 * @publicApi
7351 */
7352export declare interface SkipSelfDecorator {
7353 /**
7354 * Parameter decorator to be used on constructor parameters,
7355 * which tells the DI framework to start dependency resolution from the parent injector.
7356 * Resolution works upward through the injector hierarchy, so the local injector
7357 * is not checked for a provider.
7358 *
7359 * @usageNotes
7360 *
7361 * In the following example, the dependency can be resolved when
7362 * instantiating a child, but not when instantiating the class itself.
7363 *
7364 * <code-example path="core/di/ts/metadata_spec.ts" region="SkipSelf">
7365 * </code-example>
7366 *
7367 * @see [Dependency Injection guide](guide/dependency-injection-in-action#skip).
7368 * @see `Self`
7369 * @see `Optional`
7370 *
7371 */
7372 (): any;
7373 new (): SkipSelf;
7374}
7375
7376/**
7377 * Configures the `Injector` to return an instance of `useClass` for a token.
7378 * @see ["Dependency Injection Guide"](guide/dependency-injection).
7379 *
7380 * @usageNotes
7381 *
7382 * {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}
7383 *
7384 * Note that following two providers are not equal:
7385 *
7386 * {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}
7387 *
7388 * ### Multi-value example
7389 *
7390 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
7391 *
7392 * @publicApi
7393 */
7394export declare interface StaticClassProvider extends StaticClassSansProvider {
7395 /**
7396 * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
7397 */
7398 provide: any;
7399 /**
7400 * When true, injector returns an array of instances. This is useful to allow multiple
7401 * providers spread across many files to provide configuration information to a common token.
7402 */
7403 multi?: boolean;
7404}
7405
7406/**
7407 * Configures the `Injector` to return an instance of `useClass` for a token.
7408 * Base for `StaticClassProvider` decorator.
7409 *
7410 * @publicApi
7411 */
7412export declare interface StaticClassSansProvider {
7413 /**
7414 * An optional class to instantiate for the `token`. By default, the `provide`
7415 * class is instantiated.
7416 */
7417 useClass: Type<any>;
7418 /**
7419 * A list of `token`s to be resolved by the injector. The list of values is then
7420 * used as arguments to the `useClass` constructor.
7421 */
7422 deps: any[];
7423}
7424
7425/**
7426 * Describes how an `Injector` should be configured as static (that is, without reflection).
7427 * A static provider provides tokens to an injector for various types of dependencies.
7428 *
7429 * @see `Injector.create()`.
7430 * @see ["Dependency Injection Guide"](guide/dependency-injection-providers).
7431 *
7432 * @publicApi
7433 */
7434export declare type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[];
7435
7436declare const T_HOST = 6;
7437
7438/**
7439 * A combination of:
7440 * - Attribute names and values.
7441 * - Special markers acting as flags to alter attributes processing.
7442 * - Parsed ngProjectAs selectors.
7443 */
7444declare type TAttributes = (string | ɵAttributeMarker | CssSelector)[];
7445
7446/**
7447 * Constants that are associated with a view. Includes:
7448 * - Attribute arrays.
7449 * - Local definition arrays.
7450 * - Translated messages (i18n).
7451 */
7452declare type TConstants = (TAttributes | string)[];
7453
7454/**
7455 * Factory function that returns an array of consts. Consts can be represented as a function in
7456 * case any additional statements are required to define consts in the list. An example is i18n
7457 * where additional i18n calls are generated, which should be executed when consts are requested
7458 * for the first time.
7459 */
7460declare type TConstantsFactory = () => TConstants;
7461
7462/**
7463 * TConstants type that describes how the `consts` field is generated on ComponentDef: it can be
7464 * either an array or a factory function that returns that array.
7465 */
7466declare type TConstantsOrFactory = TConstants | TConstantsFactory;
7467
7468/** Static data for an LContainer */
7469declare interface TContainerNode extends TNode {
7470 /**
7471 * Index in the data[] array.
7472 *
7473 * If it's -1, this is a dynamically created container node that isn't stored in
7474 * data[] (e.g. when you inject ViewContainerRef) .
7475 */
7476 index: number;
7477 child: null;
7478 /**
7479 * Container nodes will have parents unless:
7480 *
7481 * - They are the first node of a component or embedded view
7482 * - They are dynamically created
7483 */
7484 parent: TElementNode | TElementContainerNode | null;
7485 tViews: TView | TView[] | null;
7486 projection: null;
7487 value: null;
7488}
7489
7490/**
7491 * Static data that corresponds to the instance-specific data array on an LView.
7492 *
7493 * Each node's static data is stored in tData at the same index that it's stored
7494 * in the data array. Any nodes that do not have static data store a null value in
7495 * tData to avoid a sparse array.
7496 *
7497 * Each pipe's definition is stored here at the same index as its pipe instance in
7498 * the data array.
7499 *
7500 * Each host property's name is stored here at the same index as its value in the
7501 * data array.
7502 *
7503 * Each property binding name is stored here at the same index as its value in
7504 * the data array. If the binding is an interpolation, the static string values
7505 * are stored parallel to the dynamic values. Example:
7506 *
7507 * id="prefix {{ v0 }} a {{ v1 }} b {{ v2 }} suffix"
7508 *
7509 * LView | TView.data
7510 *------------------------
7511 * v0 value | 'a'
7512 * v1 value | 'b'
7513 * v2 value | id � prefix � suffix
7514 *
7515 * Injector bloom filters are also stored here.
7516 */
7517declare type TData = (TNode | ɵPipeDef<any> | ɵDirectiveDef<any> | ɵComponentDef<any> | number | TStylingRange | TStylingKey | ProviderToken<any> | TI18n | I18nUpdateOpCodes | TIcu | null | string)[];
7518
7519/** Static data for an <ng-container> */
7520declare interface TElementContainerNode extends TNode {
7521 /** Index in the LView[] array. */
7522 index: number;
7523 child: TElementNode | TTextNode | TContainerNode | TElementContainerNode | TProjectionNode | null;
7524 parent: TElementNode | TElementContainerNode | null;
7525 tViews: null;
7526 projection: null;
7527}
7528
7529/** Static data for an element */
7530declare interface TElementNode extends TNode {
7531 /** Index in the data[] array */
7532 index: number;
7533 child: TElementNode | TTextNode | TElementContainerNode | TContainerNode | TProjectionNode | null;
7534 /**
7535 * Element nodes will have parents unless they are the first node of a component or
7536 * embedded view (which means their parent is in a different view and must be
7537 * retrieved using viewData[HOST_NODE]).
7538 */
7539 parent: TElementNode | TElementContainerNode | null;
7540 tViews: null;
7541 /**
7542 * If this is a component TNode with projection, this will be an array of projected
7543 * TNodes or native nodes (see TNode.projection for more info). If it's a regular element node
7544 * or a component without projection, it will be null.
7545 */
7546 projection: (TNode | RNode[])[] | null;
7547 /**
7548 * Stores TagName
7549 */
7550 value: string;
7551}
7552
7553/**
7554 * Represents an embedded template that can be used to instantiate embedded views.
7555 * To instantiate embedded views based on a template, use the `ViewContainerRef`
7556 * method `createEmbeddedView()`.
7557 *
7558 * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`
7559 * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view
7560 * is injected into the constructor of the directive,
7561 * using the `TemplateRef` token.
7562 *
7563 * You can also use a `Query` to find a `TemplateRef` associated with
7564 * a component or a directive.
7565 *
7566 * @see `ViewContainerRef`
7567 * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)
7568 *
7569 * @publicApi
7570 */
7571export declare abstract class TemplateRef<C> {
7572 /**
7573 * The anchor element in the parent view for this embedded view.
7574 *
7575 * The data-binding and injection contexts of embedded views created from this `TemplateRef`
7576 * inherit from the contexts of this location.
7577 *
7578 * Typically new embedded views are attached to the view container of this location, but in
7579 * advanced use-cases, the view can be attached to a different container while keeping the
7580 * data-binding and injection context from the original location.
7581 *
7582 */
7583 abstract readonly elementRef: ElementRef;
7584 /**
7585 * Instantiates an unattached embedded view based on this template.
7586 * @param context The data-binding context of the embedded view, as declared
7587 * in the `<ng-template>` usage.
7588 * @param injector Injector to be used within the embedded view.
7589 * @returns The new embedded view object.
7590 */
7591 abstract createEmbeddedView(context: C, injector?: Injector): EmbeddedViewRef<C>;
7592}
7593
7594/**
7595 * The Testability service provides testing hooks that can be accessed from
7596 * the browser.
7597 *
7598 * Angular applications bootstrapped using an NgModule (via `@NgModule.bootstrap` field) will also
7599 * instantiate Testability by default (in both development and production modes).
7600 *
7601 * For applications bootstrapped using the `bootstrapApplication` function, Testability is not
7602 * included by default. You can include it into your applications by getting the list of necessary
7603 * providers using the `provideProtractorTestingSupport()` function and adding them into the
7604 * `options.providers` array. Example:
7605 *
7606 * ```typescript
7607 * import {provideProtractorTestingSupport} from '@angular/platform-browser';
7608 *
7609 * await bootstrapApplication(RootComponent, providers: [provideProtractorTestingSupport()]);
7610 * ```
7611 *
7612 * @publicApi
7613 */
7614export declare class Testability implements PublicTestability {
7615 private _ngZone;
7616 private registry;
7617 private _pendingCount;
7618 private _isZoneStable;
7619 private _callbacks;
7620 private taskTrackingZone;
7621 constructor(_ngZone: NgZone, registry: TestabilityRegistry, testabilityGetter: GetTestability);
7622 private _watchAngularEvents;
7623 /**
7624 * Increases the number of pending request
7625 * @deprecated pending requests are now tracked with zones.
7626 */
7627 increasePendingRequestCount(): number;
7628 /**
7629 * Decreases the number of pending request
7630 * @deprecated pending requests are now tracked with zones
7631 */
7632 decreasePendingRequestCount(): number;
7633 /**
7634 * Whether an associated application is stable
7635 */
7636 isStable(): boolean;
7637 private _runCallbacksIfReady;
7638 private getPendingTasks;
7639 private addCallback;
7640 /**
7641 * Wait for the application to be stable with a timeout. If the timeout is reached before that
7642 * happens, the callback receives a list of the macro tasks that were pending, otherwise null.
7643 *
7644 * @param doneCb The callback to invoke when Angular is stable or the timeout expires
7645 * whichever comes first.
7646 * @param timeout Optional. The maximum time to wait for Angular to become stable. If not
7647 * specified, whenStable() will wait forever.
7648 * @param updateCb Optional. If specified, this callback will be invoked whenever the set of
7649 * pending macrotasks changes. If this callback returns true doneCb will not be invoked
7650 * and no further updates will be issued.
7651 */
7652 whenStable(doneCb: Function, timeout?: number, updateCb?: Function): void;
7653 /**
7654 * Get the number of pending requests
7655 * @deprecated pending requests are now tracked with zones
7656 */
7657 getPendingRequestCount(): number;
7658 /**
7659 * Find providers by name
7660 * @param using The root element to search from
7661 * @param provider The name of binding variable
7662 * @param exactMatch Whether using exactMatch
7663 */
7664 findProviders(using: any, provider: string, exactMatch: boolean): any[];
7665 static ɵfac: i0.ɵɵFactoryDeclaration<Testability, never>;
7666 static ɵprov: i0.ɵɵInjectableDeclaration<Testability>;
7667}
7668
7669/**
7670 * A global registry of {@link Testability} instances for specific elements.
7671 * @publicApi
7672 */
7673export declare class TestabilityRegistry {
7674 /**
7675 * Registers an application with a testability hook so that it can be tracked
7676 * @param token token of application, root element
7677 * @param testability Testability hook
7678 */
7679 registerApplication(token: any, testability: Testability): void;
7680 /**
7681 * Unregisters an application.
7682 * @param token token of application, root element
7683 */
7684 unregisterApplication(token: any): void;
7685 /**
7686 * Unregisters all applications
7687 */
7688 unregisterAllApplications(): void;
7689 /**
7690 * Get a testability hook associated with the application
7691 * @param elem root element
7692 */
7693 getTestability(elem: any): Testability | null;
7694 /**
7695 * Get all registered testabilities
7696 */
7697 getAllTestabilities(): Testability[];
7698 /**
7699 * Get all registered applications(root elements)
7700 */
7701 getAllRootElements(): any[];
7702 /**
7703 * Find testability of a node in the Tree
7704 * @param elem node
7705 * @param findInAncestors whether finding testability in ancestors if testability was not found in
7706 * current node
7707 */
7708 findTestabilityInTree(elem: Node, findInAncestors?: boolean): Testability | null;
7709 static ɵfac: i0.ɵɵFactoryDeclaration<TestabilityRegistry, never>;
7710 static ɵprov: i0.ɵɵInjectableDeclaration<TestabilityRegistry>;
7711}
7712
7713/**
7714 * Store information for the i18n translation block.
7715 */
7716declare interface TI18n {
7717 /**
7718 * A set of OpCodes which will create the Text Nodes and ICU anchors for the translation blocks.
7719 *
7720 * NOTE: The ICU anchors are filled in with ICU Update OpCode.
7721 */
7722 create: I18nCreateOpCodes;
7723 /**
7724 * A set of OpCodes which will be executed on each change detection to determine if any changes to
7725 * DOM are required.
7726 */
7727 update: I18nUpdateOpCodes;
7728}
7729
7730declare interface TIcu {
7731 /**
7732 * Defines the ICU type of `select` or `plural`
7733 */
7734 type: IcuType;
7735 /**
7736 * Index in `LView` where the anchor node is stored. `<!-- ICU 0:0 -->`
7737 */
7738 anchorIdx: number;
7739 /**
7740 * Currently selected ICU case pointer.
7741 *
7742 * `lView[currentCaseLViewIndex]` stores the currently selected case. This is needed to know how
7743 * to clean up the current case when transitioning no the new case.
7744 *
7745 * If the value stored is:
7746 * `null`: No current case selected.
7747 * `<0`: A flag which means that the ICU just switched and that `icuUpdate` must be executed
7748 * regardless of the `mask`. (After the execution the flag is cleared)
7749 * `>=0` A currently selected case index.
7750 */
7751 currentCaseLViewIndex: number;
7752 /**
7753 * A list of case values which the current ICU will try to match.
7754 *
7755 * The last value is `other`
7756 */
7757 cases: any[];
7758 /**
7759 * A set of OpCodes to apply in order to build up the DOM render tree for the ICU
7760 */
7761 create: IcuCreateOpCodes[];
7762 /**
7763 * A set of OpCodes to apply in order to destroy the DOM render tree for the ICU.
7764 */
7765 remove: I18nRemoveOpCodes[];
7766 /**
7767 * A set of OpCodes to apply in order to update the DOM render tree for the ICU bindings.
7768 */
7769 update: I18nUpdateOpCodes[];
7770}
7771
7772/**
7773 * Binding data (flyweight) for a particular node that is shared between all templates
7774 * of a specific type.
7775 *
7776 * If a property is:
7777 * - PropertyAliases: that property's data was generated and this is it
7778 * - Null: that property's data was already generated and nothing was found.
7779 * - Undefined: that property's data has not yet been generated
7780 *
7781 * see: https://en.wikipedia.org/wiki/Flyweight_pattern for more on the Flyweight pattern
7782 */
7783declare interface TNode {
7784 /** The type of the TNode. See TNodeType. */
7785 type: TNodeType;
7786 /**
7787 * Index of the TNode in TView.data and corresponding native element in LView.
7788 *
7789 * This is necessary to get from any TNode to its corresponding native element when
7790 * traversing the node tree.
7791 *
7792 * If index is -1, this is a dynamically created container node or embedded view node.
7793 */
7794 index: number;
7795 /**
7796 * Insert before existing DOM node index.
7797 *
7798 * When DOM nodes are being inserted, normally they are being appended as they are created.
7799 * Under i18n case, the translated text nodes are created ahead of time as part of the
7800 * `ɵɵi18nStart` instruction which means that this `TNode` can't just be appended and instead
7801 * needs to be inserted using `insertBeforeIndex` semantics.
7802 *
7803 * Additionally sometimes it is necessary to insert new text nodes as a child of this `TNode`. In
7804 * such a case the value stores an array of text nodes to insert.
7805 *
7806 * Example:
7807 * ```
7808 * <div i18n>
7809 * Hello <span>World</span>!
7810 * </div>
7811 * ```
7812 * In the above example the `ɵɵi18nStart` instruction can create `Hello `, `World` and `!` text
7813 * nodes. It can also insert `Hello ` and `!` text node as a child of `<div>`, but it can't
7814 * insert `World` because the `<span>` node has not yet been created. In such a case the
7815 * `<span>` `TNode` will have an array which will direct the `<span>` to not only insert
7816 * itself in front of `!` but also to insert the `World` (created by `ɵɵi18nStart`) into
7817 * `<span>` itself.
7818 *
7819 * Pseudo code:
7820 * ```
7821 * if (insertBeforeIndex === null) {
7822 * // append as normal
7823 * } else if (Array.isArray(insertBeforeIndex)) {
7824 * // First insert current `TNode` at correct location
7825 * const currentNode = lView[this.index];
7826 * parentNode.insertBefore(currentNode, lView[this.insertBeforeIndex[0]]);
7827 * // Now append all of the children
7828 * for(let i=1; i<this.insertBeforeIndex; i++) {
7829 * currentNode.appendChild(lView[this.insertBeforeIndex[i]]);
7830 * }
7831 * } else {
7832 * parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])
7833 * }
7834 * ```
7835 * - null: Append as normal using `parentNode.appendChild`
7836 * - `number`: Append using
7837 * `parentNode.insertBefore(lView[this.index], lView[this.insertBeforeIndex])`
7838 *
7839 * *Initialization*
7840 *
7841 * Because `ɵɵi18nStart` executes before nodes are created, on `TView.firstCreatePass` it is not
7842 * possible for `ɵɵi18nStart` to set the `insertBeforeIndex` value as the corresponding `TNode`
7843 * has not yet been created. For this reason the `ɵɵi18nStart` creates a `TNodeType.Placeholder`
7844 * `TNode` at that location. See `TNodeType.Placeholder` for more information.
7845 */
7846 insertBeforeIndex: InsertBeforeIndex;
7847 /**
7848 * The index of the closest injector in this node's LView.
7849 *
7850 * If the index === -1, there is no injector on this node or any ancestor node in this view.
7851 *
7852 * If the index !== -1, it is the index of this node's injector OR the index of a parent
7853 * injector in the same view. We pass the parent injector index down the node tree of a view so
7854 * it's possible to find the parent injector without walking a potentially deep node tree.
7855 * Injector indices are not set across view boundaries because there could be multiple component
7856 * hosts.
7857 *
7858 * If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent
7859 * injector.
7860 */
7861 injectorIndex: number;
7862 /** Stores starting index of the directives. */
7863 directiveStart: number;
7864 /**
7865 * Stores final exclusive index of the directives.
7866 *
7867 * The area right behind the `directiveStart-directiveEnd` range is used to allocate the
7868 * `HostBindingFunction` `vars` (or null if no bindings.) Therefore `directiveEnd` is used to set
7869 * `LFrame.bindingRootIndex` before `HostBindingFunction` is executed.
7870 */
7871 directiveEnd: number;
7872 /**
7873 * Offset from the `directiveStart` at which the component (one at most) of the node is stored.
7874 * Set to -1 if no components have been applied to the node. Component index can be found using
7875 * `directiveStart + componentOffset`.
7876 */
7877 componentOffset: number;
7878 /**
7879 * Stores the last directive which had a styling instruction.
7880 *
7881 * Initial value of this is `-1` which means that no `hostBindings` styling instruction has
7882 * executed. As `hostBindings` instructions execute they set the value to the index of the
7883 * `DirectiveDef` which contained the last `hostBindings` styling instruction.
7884 *
7885 * Valid values are:
7886 * - `-1` No `hostBindings` instruction has executed.
7887 * - `directiveStart <= directiveStylingLast < directiveEnd`: Points to the `DirectiveDef` of
7888 * the last styling instruction which executed in the `hostBindings`.
7889 *
7890 * This data is needed so that styling instructions know which static styling data needs to be
7891 * collected from the `DirectiveDef.hostAttrs`. A styling instruction needs to collect all data
7892 * since last styling instruction.
7893 */
7894 directiveStylingLast: number;
7895 /**
7896 * Stores indexes of property bindings. This field is only set in the ngDevMode and holds
7897 * indexes of property bindings so TestBed can get bound property metadata for a given node.
7898 */
7899 propertyBindings: number[] | null;
7900 /**
7901 * Stores if Node isComponent, isProjected, hasContentQuery, hasClassInput and hasStyleInput
7902 * etc.
7903 */
7904 flags: TNodeFlags;
7905 /**
7906 * This number stores two values using its bits:
7907 *
7908 * - the index of the first provider on that node (first 16 bits)
7909 * - the count of view providers from the component on this node (last 16 bits)
7910 */
7911 providerIndexes: TNodeProviderIndexes;
7912 /**
7913 * The value name associated with this node.
7914 * if type:
7915 * `TNodeType.Text`: text value
7916 * `TNodeType.Element`: tag name
7917 * `TNodeType.ICUContainer`: `TIcu`
7918 */
7919 value: any;
7920 /**
7921 * Attributes associated with an element. We need to store attributes to support various
7922 * use-cases (attribute injection, content projection with selectors, directives matching).
7923 * Attributes are stored statically because reading them from the DOM would be way too slow for
7924 * content projection and queries.
7925 *
7926 * Since attrs will always be calculated first, they will never need to be marked undefined by
7927 * other instructions.
7928 *
7929 * For regular attributes a name of an attribute and its value alternate in the array.
7930 * e.g. ['role', 'checkbox']
7931 * This array can contain flags that will indicate "special attributes" (attributes with
7932 * namespaces, attributes extracted from bindings and outputs).
7933 */
7934 attrs: TAttributes | null;
7935 /**
7936 * Same as `TNode.attrs` but contains merged data across all directive host bindings.
7937 *
7938 * We need to keep `attrs` as unmerged so that it can be used for attribute selectors.
7939 * We merge attrs here so that it can be used in a performant way for initial rendering.
7940 *
7941 * The `attrs` are merged in first pass in following order:
7942 * - Component's `hostAttrs`
7943 * - Directives' `hostAttrs`
7944 * - Template `TNode.attrs` associated with the current `TNode`.
7945 */
7946 mergedAttrs: TAttributes | null;
7947 /**
7948 * A set of local names under which a given element is exported in a template and
7949 * visible to queries. An entry in this array can be created for different reasons:
7950 * - an element itself is referenced, ex.: `<div #foo>`
7951 * - a component is referenced, ex.: `<my-cmpt #foo>`
7952 * - a directive is referenced, ex.: `<my-cmpt #foo="directiveExportAs">`.
7953 *
7954 * A given element might have different local names and those names can be associated
7955 * with a directive. We store local names at even indexes while odd indexes are reserved
7956 * for directive index in a view (or `-1` if there is no associated directive).
7957 *
7958 * Some examples:
7959 * - `<div #foo>` => `["foo", -1]`
7960 * - `<my-cmpt #foo>` => `["foo", myCmptIdx]`
7961 * - `<my-cmpt #foo #bar="directiveExportAs">` => `["foo", myCmptIdx, "bar", directiveIdx]`
7962 * - `<div #foo #bar="directiveExportAs">` => `["foo", -1, "bar", directiveIdx]`
7963 */
7964 localNames: (string | number)[] | null;
7965 /** Information about input properties that need to be set once from attribute data. */
7966 initialInputs: InitialInputData | null | undefined;
7967 /**
7968 * Input data for all directives on this node. `null` means that there are no directives with
7969 * inputs on this node.
7970 */
7971 inputs: PropertyAliases | null;
7972 /**
7973 * Output data for all directives on this node. `null` means that there are no directives with
7974 * outputs on this node.
7975 */
7976 outputs: PropertyAliases | null;
7977 /**
7978 * The TView or TViews attached to this node.
7979 *
7980 * If this TNode corresponds to an LContainer with inline views, the container will
7981 * need to store separate static data for each of its view blocks (TView[]). Otherwise,
7982 * nodes in inline views with the same index as nodes in their parent views will overwrite
7983 * each other, as they are in the same template.
7984 *
7985 * Each index in this array corresponds to the static data for a certain
7986 * view. So if you had V(0) and V(1) in a container, you might have:
7987 *
7988 * [
7989 * [{tagName: 'div', attrs: ...}, null], // V(0) TView
7990 * [{tagName: 'button', attrs ...}, null] // V(1) TView
7991 *
7992 * If this TNode corresponds to an LContainer with a template (e.g. structural
7993 * directive), the template's TView will be stored here.
7994 *
7995 * If this TNode corresponds to an element, tViews will be null .
7996 */
7997 tViews: TView | TView[] | null;
7998 /**
7999 * The next sibling node. Necessary so we can propagate through the root nodes of a view
8000 * to insert them or remove them from the DOM.
8001 */
8002 next: TNode | null;
8003 /**
8004 * The next projected sibling. Since in Angular content projection works on the node-by-node
8005 * basis the act of projecting nodes might change nodes relationship at the insertion point
8006 * (target view). At the same time we need to keep initial relationship between nodes as
8007 * expressed in content view.
8008 */
8009 projectionNext: TNode | null;
8010 /**
8011 * First child of the current node.
8012 *
8013 * For component nodes, the child will always be a ContentChild (in same view).
8014 * For embedded view nodes, the child will be in their child view.
8015 */
8016 child: TNode | null;
8017 /**
8018 * Parent node (in the same view only).
8019 *
8020 * We need a reference to a node's parent so we can append the node to its parent's native
8021 * element at the appropriate time.
8022 *
8023 * If the parent would be in a different view (e.g. component host), this property will be null.
8024 * It's important that we don't try to cross component boundaries when retrieving the parent
8025 * because the parent will change (e.g. index, attrs) depending on where the component was
8026 * used (and thus shouldn't be stored on TNode). In these cases, we retrieve the parent through
8027 * LView.node instead (which will be instance-specific).
8028 *
8029 * If this is an inline view node (V), the parent will be its container.
8030 */
8031 parent: TElementNode | TContainerNode | null;
8032 /**
8033 * List of projected TNodes for a given component host element OR index into the said nodes.
8034 *
8035 * For easier discussion assume this example:
8036 * `<parent>`'s view definition:
8037 * ```
8038 * <child id="c1">content1</child>
8039 * <child id="c2"><span>content2</span></child>
8040 * ```
8041 * `<child>`'s view definition:
8042 * ```
8043 * <ng-content id="cont1"></ng-content>
8044 * ```
8045 *
8046 * If `Array.isArray(projection)` then `TNode` is a host element:
8047 * - `projection` stores the content nodes which are to be projected.
8048 * - The nodes represent categories defined by the selector: For example:
8049 * `<ng-content/><ng-content select="abc"/>` would represent the heads for `<ng-content/>`
8050 * and `<ng-content select="abc"/>` respectively.
8051 * - The nodes we store in `projection` are heads only, we used `.next` to get their
8052 * siblings.
8053 * - The nodes `.next` is sorted/rewritten as part of the projection setup.
8054 * - `projection` size is equal to the number of projections `<ng-content>`. The size of
8055 * `c1` will be `1` because `<child>` has only one `<ng-content>`.
8056 * - we store `projection` with the host (`c1`, `c2`) rather than the `<ng-content>` (`cont1`)
8057 * because the same component (`<child>`) can be used in multiple locations (`c1`, `c2`) and
8058 * as a result have different set of nodes to project.
8059 * - without `projection` it would be difficult to efficiently traverse nodes to be projected.
8060 *
8061 * If `typeof projection == 'number'` then `TNode` is a `<ng-content>` element:
8062 * - `projection` is an index of the host's `projection`Nodes.
8063 * - This would return the first head node to project:
8064 * `getHost(currentTNode).projection[currentTNode.projection]`.
8065 * - When projecting nodes the parent node retrieved may be a `<ng-content>` node, in which case
8066 * the process is recursive in nature.
8067 *
8068 * If `projection` is of type `RNode[][]` than we have a collection of native nodes passed as
8069 * projectable nodes during dynamic component creation.
8070 */
8071 projection: (TNode | RNode[])[] | number | null;
8072 /**
8073 * A collection of all `style` static values for an element (including from host).
8074 *
8075 * This field will be populated if and when:
8076 *
8077 * - There are one or more initial `style`s on an element (e.g. `<div style="width:200px;">`)
8078 * - There are one or more initial `style`s on a directive/component host
8079 * (e.g. `@Directive({host: {style: "width:200px;" } }`)
8080 */
8081 styles: string | null;
8082 /**
8083 * A collection of all `style` static values for an element excluding host sources.
8084 *
8085 * Populated when there are one or more initial `style`s on an element
8086 * (e.g. `<div style="width:200px;">`)
8087 * Must be stored separately from `tNode.styles` to facilitate setting directive
8088 * inputs that shadow the `style` property. If we used `tNode.styles` as is for shadowed inputs,
8089 * we would feed host styles back into directives as "inputs". If we used `tNode.attrs`, we
8090 * would have to concatenate the attributes on every template pass. Instead, we process once on
8091 * first create pass and store here.
8092 */
8093 stylesWithoutHost: string | null;
8094 /**
8095 * A `KeyValueArray` version of residual `styles`.
8096 *
8097 * When there are styling instructions than each instruction stores the static styling
8098 * which is of lower priority than itself. This means that there may be a higher priority
8099 * styling than the instruction.
8100 *
8101 * Imagine:
8102 * ```
8103 * <div style="color: highest;" my-dir>
8104 *
8105 * @Directive({
8106 * host: {
8107 * style: 'color: lowest; ',
8108 * '[styles.color]': 'exp' // ɵɵstyleProp('color', ctx.exp);
8109 * }
8110 * })
8111 * ```
8112 *
8113 * In the above case:
8114 * - `color: lowest` is stored with `ɵɵstyleProp('color', ctx.exp);` instruction
8115 * - `color: highest` is the residual and is stored here.
8116 *
8117 * - `undefined': not initialized.
8118 * - `null`: initialized but `styles` is `null`
8119 * - `KeyValueArray`: parsed version of `styles`.
8120 */
8121 residualStyles: KeyValueArray<any> | undefined | null;
8122 /**
8123 * A collection of all class static values for an element (including from host).
8124 *
8125 * This field will be populated if and when:
8126 *
8127 * - There are one or more initial classes on an element (e.g. `<div class="one two three">`)
8128 * - There are one or more initial classes on an directive/component host
8129 * (e.g. `@Directive({host: {class: "SOME_CLASS" } }`)
8130 */
8131 classes: string | null;
8132 /**
8133 * A collection of all class static values for an element excluding host sources.
8134 *
8135 * Populated when there are one or more initial classes on an element
8136 * (e.g. `<div class="SOME_CLASS">`)
8137 * Must be stored separately from `tNode.classes` to facilitate setting directive
8138 * inputs that shadow the `class` property. If we used `tNode.classes` as is for shadowed
8139 * inputs, we would feed host classes back into directives as "inputs". If we used
8140 * `tNode.attrs`, we would have to concatenate the attributes on every template pass. Instead,
8141 * we process once on first create pass and store here.
8142 */
8143 classesWithoutHost: string | null;
8144 /**
8145 * A `KeyValueArray` version of residual `classes`.
8146 *
8147 * Same as `TNode.residualStyles` but for classes.
8148 *
8149 * - `undefined': not initialized.
8150 * - `null`: initialized but `classes` is `null`
8151 * - `KeyValueArray`: parsed version of `classes`.
8152 */
8153 residualClasses: KeyValueArray<any> | undefined | null;
8154 /**
8155 * Stores the head/tail index of the class bindings.
8156 *
8157 * - If no bindings, the head and tail will both be 0.
8158 * - If there are template bindings, stores the head/tail of the class bindings in the template.
8159 * - If no template bindings but there are host bindings, the head value will point to the last
8160 * host binding for "class" (not the head of the linked list), tail will be 0.
8161 *
8162 * See: `style_binding_list.ts` for details.
8163 *
8164 * This is used by `insertTStylingBinding` to know where the next styling binding should be
8165 * inserted so that they can be sorted in priority order.
8166 */
8167 classBindings: TStylingRange;
8168 /**
8169 * Stores the head/tail index of the class bindings.
8170 *
8171 * - If no bindings, the head and tail will both be 0.
8172 * - If there are template bindings, stores the head/tail of the style bindings in the template.
8173 * - If no template bindings but there are host bindings, the head value will point to the last
8174 * host binding for "style" (not the head of the linked list), tail will be 0.
8175 *
8176 * See: `style_binding_list.ts` for details.
8177 *
8178 * This is used by `insertTStylingBinding` to know where the next styling binding should be
8179 * inserted so that they can be sorted in priority order.
8180 */
8181 styleBindings: TStylingRange;
8182}
8183
8184/**
8185 * Corresponds to the TNode.flags property.
8186 */
8187declare const enum TNodeFlags {
8188 /** Bit #1 - This bit is set if the node is a host for any directive (including a component) */
8189 isDirectiveHost = 1,
8190 /** Bit #2 - This bit is set if the node has been projected */
8191 isProjected = 2,
8192 /** Bit #3 - This bit is set if any directive on this node has content queries */
8193 hasContentQuery = 4,
8194 /** Bit #4 - This bit is set if the node has any "class" inputs */
8195 hasClassInput = 8,
8196 /** Bit #5 - This bit is set if the node has any "style" inputs */
8197 hasStyleInput = 16,
8198 /** Bit #6 This bit is set if the node has been detached by i18n */
8199 isDetached = 32,
8200 /**
8201 * Bit #7 - This bit is set if the node has directives with host bindings.
8202 *
8203 * This flags allows us to guard host-binding logic and invoke it only on nodes
8204 * that actually have directives with host bindings.
8205 */
8206 hasHostBindings = 64
8207}
8208
8209/**
8210 * Corresponds to the TNode.providerIndexes property.
8211 */
8212declare const enum TNodeProviderIndexes {
8213 /** The index of the first provider on this node is encoded on the least significant bits. */
8214 ProvidersStartIndexMask = 1048575,
8215 /**
8216 * The count of view providers from the component on this node is
8217 * encoded on the 20 most significant bits.
8218 */
8219 CptViewProvidersCountShift = 20,
8220 CptViewProvidersCountShifter = 1048576
8221}
8222
8223/**
8224 * TNodeType corresponds to the {@link TNode} `type` property.
8225 *
8226 * NOTE: type IDs are such that we use each bit to denote a type. This is done so that we can easily
8227 * check if the `TNode` is of more than one type.
8228 *
8229 * `if (tNode.type === TNodeType.Text || tNode.type === TNode.Element)`
8230 * can be written as:
8231 * `if (tNode.type & (TNodeType.Text | TNodeType.Element))`
8232 *
8233 * However any given `TNode` can only be of one type.
8234 */
8235declare const enum TNodeType {
8236 /**
8237 * The TNode contains information about a DOM element aka {@link RText}.
8238 */
8239 Text = 1,
8240 /**
8241 * The TNode contains information about a DOM element aka {@link RElement}.
8242 */
8243 Element = 2,
8244 /**
8245 * The TNode contains information about an {@link LContainer} for embedded views.
8246 */
8247 Container = 4,
8248 /**
8249 * The TNode contains information about an `<ng-container>` element {@link RNode}.
8250 */
8251 ElementContainer = 8,
8252 /**
8253 * The TNode contains information about an `<ng-content>` projection
8254 */
8255 Projection = 16,
8256 /**
8257 * The TNode contains information about an ICU comment used in `i18n`.
8258 */
8259 Icu = 32,
8260 /**
8261 * Special node type representing a placeholder for future `TNode` at this location.
8262 *
8263 * I18n translation blocks are created before the element nodes which they contain. (I18n blocks
8264 * can span over many elements.) Because i18n `TNode`s (representing text) are created first they
8265 * often may need to point to element `TNode`s which are not yet created. In such a case we create
8266 * a `Placeholder` `TNode`. This allows the i18n to structurally link the `TNode`s together
8267 * without knowing any information about the future nodes which will be at that location.
8268 *
8269 * On `firstCreatePass` When element instruction executes it will try to create a `TNode` at that
8270 * location. Seeing a `Placeholder` `TNode` already there tells the system that it should reuse
8271 * existing `TNode` (rather than create a new one) and just update the missing information.
8272 */
8273 Placeholder = 64,
8274 AnyRNode = 3,
8275 AnyContainer = 12
8276}
8277
8278/**
8279 * Type representing a set of TNodes that can have local refs (`#foo`) placed on them.
8280 */
8281declare type TNodeWithLocalRefs = TContainerNode | TElementNode | TElementContainerNode;
8282
8283/** Static data for an LProjectionNode */
8284declare interface TProjectionNode extends TNode {
8285 /** Index in the data[] array */
8286 child: null;
8287 /**
8288 * Projection nodes will have parents unless they are the first node of a component
8289 * or embedded view (which means their parent is in a different view and must be
8290 * retrieved using LView.node).
8291 */
8292 parent: TElementNode | TElementContainerNode | null;
8293 tViews: null;
8294 /** Index of the projection node. (See TNode.projection for more info.) */
8295 projection: number;
8296 value: null;
8297}
8298
8299/**
8300 * TQueries represent a collection of individual TQuery objects tracked in a given view. Most of the
8301 * methods on this interface are simple proxy methods to the corresponding functionality on TQuery.
8302 */
8303declare interface TQueries {
8304 /**
8305 * Adds a new TQuery to a collection of queries tracked in a given view.
8306 * @param tQuery
8307 */
8308 track(tQuery: TQuery): void;
8309 /**
8310 * Returns a TQuery instance for at the given index in the queries array.
8311 * @param index
8312 */
8313 getByIndex(index: number): TQuery;
8314 /**
8315 * Returns the number of queries tracked in a given view.
8316 */
8317 length: number;
8318 /**
8319 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8320 * `elementStart` on each and every TQuery.
8321 * @param tView
8322 * @param tNode
8323 */
8324 elementStart(tView: TView, tNode: TNode): void;
8325 /**
8326 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8327 * `elementEnd` on each and every TQuery.
8328 * @param tNode
8329 */
8330 elementEnd(tNode: TNode): void;
8331 /**
8332 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8333 * `template` on each and every TQuery.
8334 * @param tView
8335 * @param tNode
8336 */
8337 template(tView: TView, tNode: TNode): void;
8338 /**
8339 * A proxy method that iterates over all the TQueries in a given TView and calls the corresponding
8340 * `embeddedTView` on each and every TQuery.
8341 * @param tNode
8342 */
8343 embeddedTView(tNode: TNode): TQueries | null;
8344}
8345
8346/**
8347 * TQuery objects represent all the query-related data that remain the same from one view instance
8348 * to another and can be determined on the very first template pass. Most notably TQuery holds all
8349 * the matches for a given view.
8350 */
8351declare interface TQuery {
8352 /**
8353 * Query metadata extracted from query annotations.
8354 */
8355 metadata: TQueryMetadata;
8356 /**
8357 * Index of a query in a declaration view in case of queries propagated to en embedded view, -1
8358 * for queries declared in a given view. We are storing this index so we can find a parent query
8359 * to clone for an embedded view (when an embedded view is created).
8360 */
8361 indexInDeclarationView: number;
8362 /**
8363 * Matches collected on the first template pass. Each match is a pair of:
8364 * - TNode index;
8365 * - match index;
8366 *
8367 * A TNode index can be either:
8368 * - a positive number (the most common case) to indicate a matching TNode;
8369 * - a negative number to indicate that a given query is crossing a <ng-template> element and
8370 * results from views created based on TemplateRef should be inserted at this place.
8371 *
8372 * A match index is a number used to find an actual value (for a given node) when query results
8373 * are materialized. This index can have one of the following values:
8374 * - -2 - indicates that we need to read a special token (TemplateRef, ViewContainerRef etc.);
8375 * - -1 - indicates that we need to read a default value based on the node type (TemplateRef for
8376 * ng-template and ElementRef for other elements);
8377 * - a positive number - index of an injectable to be read from the element injector.
8378 */
8379 matches: number[] | null;
8380 /**
8381 * A flag indicating if a given query crosses an <ng-template> element. This flag exists for
8382 * performance reasons: we can notice that queries not crossing any <ng-template> elements will
8383 * have matches from a given view only (and adapt processing accordingly).
8384 */
8385 crossesNgTemplate: boolean;
8386 /**
8387 * A method call when a given query is crossing an element (or element container). This is where a
8388 * given TNode is matched against a query predicate.
8389 * @param tView
8390 * @param tNode
8391 */
8392 elementStart(tView: TView, tNode: TNode): void;
8393 /**
8394 * A method called when processing the elementEnd instruction - this is mostly useful to determine
8395 * if a given content query should match any nodes past this point.
8396 * @param tNode
8397 */
8398 elementEnd(tNode: TNode): void;
8399 /**
8400 * A method called when processing the template instruction. This is where a
8401 * given TContainerNode is matched against a query predicate.
8402 * @param tView
8403 * @param tNode
8404 */
8405 template(tView: TView, tNode: TNode): void;
8406 /**
8407 * A query-related method called when an embedded TView is created based on the content of a
8408 * <ng-template> element. We call this method to determine if a given query should be propagated
8409 * to the embedded view and if so - return a cloned TQuery for this embedded view.
8410 * @param tNode
8411 * @param childQueryIndex
8412 */
8413 embeddedTView(tNode: TNode, childQueryIndex: number): TQuery | null;
8414}
8415
8416/**
8417 * An object representing query metadata extracted from query annotations.
8418 */
8419declare interface TQueryMetadata {
8420 predicate: ProviderToken<unknown> | string[];
8421 read: any;
8422 flags: QueryFlags;
8423}
8424
8425/**
8426 * A function optionally passed into the `NgForOf` directive to customize how `NgForOf` uniquely
8427 * identifies items in an iterable.
8428 *
8429 * `NgForOf` needs to uniquely identify items in the iterable to correctly perform DOM updates
8430 * when items in the iterable are reordered, new items are added, or existing items are removed.
8431 *
8432 *
8433 * In all of these scenarios it is usually desirable to only update the DOM elements associated
8434 * with the items affected by the change. This behavior is important to:
8435 *
8436 * - preserve any DOM-specific UI state (like cursor position, focus, text selection) when the
8437 * iterable is modified
8438 * - enable animation of item addition, removal, and iterable reordering
8439 * - preserve the value of the `<select>` element when nested `<option>` elements are dynamically
8440 * populated using `NgForOf` and the bound iterable is updated
8441 *
8442 * A common use for custom `trackBy` functions is when the model that `NgForOf` iterates over
8443 * contains a property with a unique identifier. For example, given a model:
8444 *
8445 * ```ts
8446 * class User {
8447 * id: number;
8448 * name: string;
8449 * ...
8450 * }
8451 * ```
8452 * a custom `trackBy` function could look like the following:
8453 * ```ts
8454 * function userTrackBy(index, user) {
8455 * return user.id;
8456 * }
8457 * ```
8458 *
8459 * A custom `trackBy` function must have several properties:
8460 *
8461 * - be [idempotent](https://en.wikipedia.org/wiki/Idempotence) (be without side effects, and always
8462 * return the same value for a given input)
8463 * - return unique value for all unique inputs
8464 * - be fast
8465 *
8466 * @see [`NgForOf#ngForTrackBy`](api/common/NgForOf#ngForTrackBy)
8467 * @publicApi
8468 */
8469export declare interface TrackByFunction<T> {
8470 /**
8471 * @param index The index of the item within the iterable.
8472 * @param item The item in the iterable.
8473 */
8474 <U extends T>(index: number, item: T & U): any;
8475}
8476
8477/**
8478 * Use this token at bootstrap to provide the content of your translation file (`xtb`,
8479 * `xlf` or `xlf2`) when you want to translate your application in another language.
8480 *
8481 * See the [i18n guide](guide/i18n-common-merge) for more information.
8482 *
8483 * @usageNotes
8484 * ### Example
8485 *
8486 * ```typescript
8487 * import { TRANSLATIONS } from '@angular/core';
8488 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
8489 * import { AppModule } from './app/app.module';
8490 *
8491 * // content of your translation file
8492 * const translations = '....';
8493 *
8494 * platformBrowserDynamic().bootstrapModule(AppModule, {
8495 * providers: [{provide: TRANSLATIONS, useValue: translations }]
8496 * });
8497 * ```
8498 *
8499 * @publicApi
8500 */
8501export declare const TRANSLATIONS: InjectionToken<string>;
8502
8503/**
8504 * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,
8505 * `xlf` or `xlf2`.
8506 *
8507 * See the [i18n guide](guide/i18n-common-merge) for more information.
8508 *
8509 * @usageNotes
8510 * ### Example
8511 *
8512 * ```typescript
8513 * import { TRANSLATIONS_FORMAT } from '@angular/core';
8514 * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
8515 * import { AppModule } from './app/app.module';
8516 *
8517 * platformBrowserDynamic().bootstrapModule(AppModule, {
8518 * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]
8519 * });
8520 * ```
8521 *
8522 * @publicApi
8523 */
8524export declare const TRANSLATIONS_FORMAT: InjectionToken<string>;
8525
8526declare const TRANSPLANTED_VIEWS_TO_REFRESH = 5;
8527
8528
8529/**
8530 * @fileoverview
8531 * While Angular only uses Trusted Types internally for the time being,
8532 * references to Trusted Types could leak into our core.d.ts, which would force
8533 * anyone compiling against @angular/core to provide the @types/trusted-types
8534 * package in their compilation unit.
8535 *
8536 * Until https://github.com/microsoft/TypeScript/issues/30024 is resolved, we
8537 * will keep Angular's public API surface free of references to Trusted Types.
8538 * For internal and semi-private APIs that need to reference Trusted Types, the
8539 * minimal type definitions for the Trusted Types API provided by this module
8540 * should be used instead. They are marked as "declare" to prevent them from
8541 * being renamed by compiler optimization.
8542 *
8543 * Adapted from
8544 * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/trusted-types/index.d.ts
8545 * but restricted to the API surface used within Angular.
8546 */
8547declare interface TrustedHTML {
8548 __brand__: 'TrustedHTML';
8549}
8550
8551declare interface TrustedScript {
8552 __brand__: 'TrustedScript';
8553}
8554
8555declare interface TrustedScriptURL {
8556 __brand__: 'TrustedScriptURL';
8557}
8558
8559/**
8560 * Value stored in the `TData` which is needed to re-concatenate the styling.
8561 *
8562 * See: `TStylingKeyPrimitive` and `TStylingStatic`
8563 */
8564declare type TStylingKey = TStylingKeyPrimitive | TStylingStatic;
8565
8566/**
8567 * The primitive portion (`TStylingStatic` removed) of the value stored in the `TData` which is
8568 * needed to re-concatenate the styling.
8569 *
8570 * - `string`: Stores the property name. Used with `ɵɵstyleProp`/`ɵɵclassProp` instruction.
8571 * - `null`: Represents map, so there is no name. Used with `ɵɵstyleMap`/`ɵɵclassMap`.
8572 * - `false`: Represents an ignore case. This happens when `ɵɵstyleProp`/`ɵɵclassProp` instruction
8573 * is combined with directive which shadows its input `@Input('class')`. That way the binding
8574 * should not participate in the styling resolution.
8575 */
8576declare type TStylingKeyPrimitive = string | null | false;
8577
8578/**
8579 * This is a branded number which contains previous and next index.
8580 *
8581 * When we come across styling instructions we need to store the `TStylingKey` in the correct
8582 * order so that we can re-concatenate the styling value in the desired priority.
8583 *
8584 * The insertion can happen either at the:
8585 * - end of template as in the case of coming across additional styling instruction in the template
8586 * - in front of the template in the case of coming across additional instruction in the
8587 * `hostBindings`.
8588 *
8589 * We use `TStylingRange` to store the previous and next index into the `TData` where the template
8590 * bindings can be found.
8591 *
8592 * - bit 0 is used to mark that the previous index has a duplicate for current value.
8593 * - bit 1 is used to mark that the next index has a duplicate for the current value.
8594 * - bits 2-16 are used to encode the next/tail of the template.
8595 * - bits 17-32 are used to encode the previous/head of template.
8596 *
8597 * NODE: *duplicate* false implies that it is statically known that this binding will not collide
8598 * with other bindings and therefore there is no need to check other bindings. For example the
8599 * bindings in `<div [style.color]="exp" [style.width]="exp">` will never collide and will have
8600 * their bits set accordingly. Previous duplicate means that we may need to check previous if the
8601 * current binding is `null`. Next duplicate means that we may need to check next bindings if the
8602 * current binding is not `null`.
8603 *
8604 * NOTE: `0` has special significance and represents `null` as in no additional pointer.
8605 */
8606declare interface TStylingRange {
8607 __brand__: 'TStylingRange';
8608}
8609
8610/**
8611 * Store the static values for the styling binding.
8612 *
8613 * The `TStylingStatic` is just `KeyValueArray` where key `""` (stored at location 0) contains the
8614 * `TStylingKey` (stored at location 1). In other words this wraps the `TStylingKey` such that the
8615 * `""` contains the wrapped value.
8616 *
8617 * When instructions are resolving styling they may need to look forward or backwards in the linked
8618 * list to resolve the value. For this reason we have to make sure that he linked list also contains
8619 * the static values. However the list only has space for one item per styling instruction. For this
8620 * reason we store the static values here as part of the `TStylingKey`. This means that the
8621 * resolution function when looking for a value needs to first look at the binding value, and than
8622 * at `TStylingKey` (if it exists).
8623 *
8624 * Imagine we have:
8625 *
8626 * ```
8627 * <div class="TEMPLATE" my-dir>
8628 *
8629 * @Directive({
8630 * host: {
8631 * class: 'DIR',
8632 * '[class.dynamic]': 'exp' // ɵɵclassProp('dynamic', ctx.exp);
8633 * }
8634 * })
8635 * ```
8636 *
8637 * In the above case the linked list will contain one item:
8638 *
8639 * ```
8640 * // assume binding location: 10 for `ɵɵclassProp('dynamic', ctx.exp);`
8641 * tData[10] = <TStylingStatic>[
8642 * '': 'dynamic', // This is the wrapped value of `TStylingKey`
8643 * 'DIR': true, // This is the default static value of directive binding.
8644 * ];
8645 * tData[10 + 1] = 0; // We don't have prev/next.
8646 *
8647 * lView[10] = undefined; // assume `ctx.exp` is `undefined`
8648 * lView[10 + 1] = undefined; // Just normalized `lView[10]`
8649 * ```
8650 *
8651 * So when the function is resolving styling value, it first needs to look into the linked list
8652 * (there is none) and than into the static `TStylingStatic` too see if there is a default value for
8653 * `dynamic` (there is not). Therefore it is safe to remove it.
8654 *
8655 * If setting `true` case:
8656 * ```
8657 * lView[10] = true; // assume `ctx.exp` is `true`
8658 * lView[10 + 1] = true; // Just normalized `lView[10]`
8659 * ```
8660 * So when the function is resolving styling value, it first needs to look into the linked list
8661 * (there is none) and than into `TNode.residualClass` (TNode.residualStyle) which contains
8662 * ```
8663 * tNode.residualClass = [
8664 * 'TEMPLATE': true,
8665 * ];
8666 * ```
8667 *
8668 * This means that it is safe to add class.
8669 */
8670declare interface TStylingStatic extends KeyValueArray<any> {
8671}
8672
8673/** Static data for a text node */
8674declare interface TTextNode extends TNode {
8675 /** Index in the data[] array */
8676 index: number;
8677 child: null;
8678 /**
8679 * Text nodes will have parents unless they are the first node of a component or
8680 * embedded view (which means their parent is in a different view and must be
8681 * retrieved using LView.node).
8682 */
8683 parent: TElementNode | TElementContainerNode | null;
8684 tViews: null;
8685 projection: null;
8686}
8687
8688declare const TVIEW = 1;
8689
8690/**
8691 * The static data for an LView (shared between all templates of a
8692 * given type).
8693 *
8694 * Stored on the `ComponentDef.tView`.
8695 */
8696declare interface TView {
8697 /**
8698 * Type of `TView` (`Root`|`Component`|`Embedded`).
8699 */
8700 type: TViewType;
8701 /**
8702 * This is a blueprint used to generate LView instances for this TView. Copying this
8703 * blueprint is faster than creating a new LView from scratch.
8704 */
8705 blueprint: LView;
8706 /**
8707 * The template function used to refresh the view of dynamically created views
8708 * and components. Will be null for inline views.
8709 */
8710 template: ComponentTemplate<{}> | null;
8711 /**
8712 * A function containing query-related instructions.
8713 */
8714 viewQuery: ViewQueriesFunction<{}> | null;
8715 /**
8716 * A `TNode` representing the declaration location of this `TView` (not part of this TView).
8717 */
8718 declTNode: TNode | null;
8719 /** Whether or not this template has been processed in creation mode. */
8720 firstCreatePass: boolean;
8721 /**
8722 * Whether or not this template has been processed in update mode (e.g. change detected)
8723 *
8724 * `firstUpdatePass` is used by styling to set up `TData` to contain metadata about the styling
8725 * instructions. (Mainly to build up a linked list of styling priority order.)
8726 *
8727 * Typically this function gets cleared after first execution. If exception is thrown then this
8728 * flag can remain turned un until there is first successful (no exception) pass. This means that
8729 * individual styling instructions keep track of if they have already been added to the linked
8730 * list to prevent double adding.
8731 */
8732 firstUpdatePass: boolean;
8733 /** Static data equivalent of LView.data[]. Contains TNodes, PipeDefInternal or TI18n. */
8734 data: TData;
8735 /**
8736 * The binding start index is the index at which the data array
8737 * starts to store bindings only. Saving this value ensures that we
8738 * will begin reading bindings at the correct point in the array when
8739 * we are in update mode.
8740 *
8741 * -1 means that it has not been initialized.
8742 */
8743 bindingStartIndex: number;
8744 /**
8745 * The index where the "expando" section of `LView` begins. The expando
8746 * section contains injectors, directive instances, and host binding values.
8747 * Unlike the "decls" and "vars" sections of `LView`, the length of this
8748 * section cannot be calculated at compile-time because directives are matched
8749 * at runtime to preserve locality.
8750 *
8751 * We store this start index so we know where to start checking host bindings
8752 * in `setHostBindings`.
8753 */
8754 expandoStartIndex: number;
8755 /**
8756 * Whether or not there are any static view queries tracked on this view.
8757 *
8758 * We store this so we know whether or not we should do a view query
8759 * refresh after creation mode to collect static query results.
8760 */
8761 staticViewQueries: boolean;
8762 /**
8763 * Whether or not there are any static content queries tracked on this view.
8764 *
8765 * We store this so we know whether or not we should do a content query
8766 * refresh after creation mode to collect static query results.
8767 */
8768 staticContentQueries: boolean;
8769 /**
8770 * A reference to the first child node located in the view.
8771 */
8772 firstChild: TNode | null;
8773 /**
8774 * Stores the OpCodes to be replayed during change-detection to process the `HostBindings`
8775 *
8776 * See `HostBindingOpCodes` for encoding details.
8777 */
8778 hostBindingOpCodes: HostBindingOpCodes | null;
8779 /**
8780 * Full registry of directives and components that may be found in this view.
8781 *
8782 * It's necessary to keep a copy of the full def list on the TView so it's possible
8783 * to render template functions without a host component.
8784 */
8785 directiveRegistry: DirectiveDefList | null;
8786 /**
8787 * Full registry of pipes that may be found in this view.
8788 *
8789 * The property is either an array of `PipeDefs`s or a function which returns the array of
8790 * `PipeDefs`s. The function is necessary to be able to support forward declarations.
8791 *
8792 * It's necessary to keep a copy of the full def list on the TView so it's possible
8793 * to render template functions without a host component.
8794 */
8795 pipeRegistry: PipeDefList | null;
8796 /**
8797 * Array of ngOnInit, ngOnChanges and ngDoCheck hooks that should be executed for this view in
8798 * creation mode.
8799 *
8800 * This array has a flat structure and contains TNode indices, directive indices (where an
8801 * instance can be found in `LView`) and hook functions. TNode index is followed by the directive
8802 * index and a hook function. If there are multiple hooks for a given TNode, the TNode index is
8803 * not repeated and the next lifecycle hook information is stored right after the previous hook
8804 * function. This is done so that at runtime the system can efficiently iterate over all of the
8805 * functions to invoke without having to make any decisions/lookups.
8806 */
8807 preOrderHooks: HookData | null;
8808 /**
8809 * Array of ngOnChanges and ngDoCheck hooks that should be executed for this view in update mode.
8810 *
8811 * This array has the same structure as the `preOrderHooks` one.
8812 */
8813 preOrderCheckHooks: HookData | null;
8814 /**
8815 * Array of ngAfterContentInit and ngAfterContentChecked hooks that should be executed
8816 * for this view in creation mode.
8817 *
8818 * Even indices: Directive index
8819 * Odd indices: Hook function
8820 */
8821 contentHooks: HookData | null;
8822 /**
8823 * Array of ngAfterContentChecked hooks that should be executed for this view in update
8824 * mode.
8825 *
8826 * Even indices: Directive index
8827 * Odd indices: Hook function
8828 */
8829 contentCheckHooks: HookData | null;
8830 /**
8831 * Array of ngAfterViewInit and ngAfterViewChecked hooks that should be executed for
8832 * this view in creation mode.
8833 *
8834 * Even indices: Directive index
8835 * Odd indices: Hook function
8836 */
8837 viewHooks: HookData | null;
8838 /**
8839 * Array of ngAfterViewChecked hooks that should be executed for this view in
8840 * update mode.
8841 *
8842 * Even indices: Directive index
8843 * Odd indices: Hook function
8844 */
8845 viewCheckHooks: HookData | null;
8846 /**
8847 * Array of ngOnDestroy hooks that should be executed when this view is destroyed.
8848 *
8849 * Even indices: Directive index
8850 * Odd indices: Hook function
8851 */
8852 destroyHooks: DestroyHookData | null;
8853 /**
8854 * When a view is destroyed, listeners need to be released and outputs need to be
8855 * unsubscribed. This cleanup array stores both listener data (in chunks of 4)
8856 * and output data (in chunks of 2) for a particular view. Combining the arrays
8857 * saves on memory (70 bytes per array) and on a few bytes of code size (for two
8858 * separate for loops).
8859 *
8860 * If it's a native DOM listener or output subscription being stored:
8861 * 1st index is: event name `name = tView.cleanup[i+0]`
8862 * 2nd index is: index of native element or a function that retrieves global target (window,
8863 * document or body) reference based on the native element:
8864 * `typeof idxOrTargetGetter === 'function'`: global target getter function
8865 * `typeof idxOrTargetGetter === 'number'`: index of native element
8866 *
8867 * 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`
8868 * 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`
8869 * `typeof useCaptureOrIndx == 'boolean' : useCapture boolean
8870 * `typeof useCaptureOrIndx == 'number':
8871 * `useCaptureOrIndx >= 0` `removeListener = LView[CLEANUP][useCaptureOrIndx]`
8872 * `useCaptureOrIndx < 0` `subscription = LView[CLEANUP][-useCaptureOrIndx]`
8873 *
8874 * If it's an output subscription or query list destroy hook:
8875 * 1st index is: output unsubscribe function / query list destroy function
8876 * 2nd index is: index of function context in LView.cleanupInstances[]
8877 * `tView.cleanup[i+0].call(lView[CLEANUP][tView.cleanup[i+1]])`
8878 */
8879 cleanup: any[] | null;
8880 /**
8881 * A list of element indices for child components that will need to be
8882 * refreshed when the current view has finished its check. These indices have
8883 * already been adjusted for the HEADER_OFFSET.
8884 *
8885 */
8886 components: number[] | null;
8887 /**
8888 * A collection of queries tracked in a given view.
8889 */
8890 queries: TQueries | null;
8891 /**
8892 * An array of indices pointing to directives with content queries alongside with the
8893 * corresponding query index. Each entry in this array is a tuple of:
8894 * - index of the first content query index declared by a given directive;
8895 * - index of a directive.
8896 *
8897 * We are storing those indexes so we can refresh content queries as part of a view refresh
8898 * process.
8899 */
8900 contentQueries: number[] | null;
8901 /**
8902 * Set of schemas that declare elements to be allowed inside the view.
8903 */
8904 schemas: SchemaMetadata[] | null;
8905 /**
8906 * Array of constants for the view. Includes attribute arrays, local definition arrays etc.
8907 * Used for directive matching, attribute bindings, local definitions and more.
8908 */
8909 consts: TConstants | null;
8910 /**
8911 * Indicates that there was an error before we managed to complete the first create pass of the
8912 * view. This means that the view is likely corrupted and we should try to recover it.
8913 */
8914 incompleteFirstPass: boolean;
8915}
8916
8917/**
8918 * Explicitly marks `TView` as a specific type in `ngDevMode`
8919 *
8920 * It is useful to know conceptually what time of `TView` we are dealing with when
8921 * debugging an application (even if the runtime does not need it.) For this reason
8922 * we store this information in the `ngDevMode` `TView` and than use it for
8923 * better debugging experience.
8924 */
8925declare const enum TViewType {
8926 /**
8927 * Root `TView` is the used to bootstrap components into. It is used in conjunction with
8928 * `LView` which takes an existing DOM node not owned by Angular and wraps it in `TView`/`LView`
8929 * so that other components can be loaded into it.
8930 */
8931 Root = 0,
8932 /**
8933 * `TView` associated with a Component. This would be the `TView` directly associated with the
8934 * component view (as opposed an `Embedded` `TView` which would be a child of `Component` `TView`)
8935 */
8936 Component = 1,
8937 /**
8938 * `TView` associated with a template. Such as `*ngIf`, `<ng-template>` etc... A `Component`
8939 * can have zero or more `Embedded` `TView`s.
8940 */
8941 Embedded = 2
8942}
8943
8944/**
8945 * Special location which allows easy identification of type. If we have an array which was
8946 * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is
8947 * `LContainer`.
8948 */
8949declare const TYPE = 1;
8950
8951/**
8952 * @description
8953 *
8954 * Represents a type that a Component or other object is instances of.
8955 *
8956 * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by
8957 * the `MyCustomComponent` constructor function.
8958 *
8959 * @publicApi
8960 */
8961export declare const Type: FunctionConstructor;
8962
8963export declare interface Type<T> extends Function {
8964 new (...args: any[]): T;
8965}
8966
8967declare type Type_2 = Function;
8968
8969/**
8970 * An interface implemented by all Angular type decorators, which allows them to be used as
8971 * decorators as well as Angular syntax.
8972 *
8973 * ```
8974 * @ng.Component({...})
8975 * class MyClass {...}
8976 * ```
8977 *
8978 * @publicApi
8979 */
8980export declare interface TypeDecorator {
8981 /**
8982 * Invoke as decorator.
8983 */
8984 <T extends Type<any>>(type: T): T;
8985 (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;
8986}
8987
8988declare type TypeOrFactory<T> = T | (() => T);
8989
8990/**
8991 * Configures the `Injector` to return an instance of `Type` when `Type' is used as the token.
8992 *
8993 * Create an instance by invoking the `new` operator and supplying additional arguments.
8994 * This form is a short form of `TypeProvider`;
8995 *
8996 * For more details, see the ["Dependency Injection Guide"](guide/dependency-injection).
8997 *
8998 * @usageNotes
8999 *
9000 * {@example core/di/ts/provider_spec.ts region='TypeProvider'}
9001 *
9002 * @publicApi
9003 */
9004export declare interface TypeProvider extends Type<any> {
9005}
9006
9007/**
9008 * Configures the `Injector` to return a value for a token.
9009 * @see ["Dependency Injection Guide"](guide/dependency-injection).
9010 *
9011 * @usageNotes
9012 *
9013 * ### Example
9014 *
9015 * {@example core/di/ts/provider_spec.ts region='ValueProvider'}
9016 *
9017 * ### Multi-value example
9018 *
9019 * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
9020 *
9021 * @publicApi
9022 */
9023export declare interface ValueProvider extends ValueSansProvider {
9024 /**
9025 * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
9026 */
9027 provide: any;
9028 /**
9029 * When true, injector returns an array of instances. This is useful to allow multiple
9030 * providers spread across many files to provide configuration information to a common token.
9031 */
9032 multi?: boolean;
9033}
9034
9035/**
9036 * Configures the `Injector` to return a value for a token.
9037 * Base for `ValueProvider` decorator.
9038 *
9039 * @publicApi
9040 */
9041export declare interface ValueSansProvider {
9042 /**
9043 * The value to inject.
9044 */
9045 useValue: any;
9046}
9047
9048/**
9049 * @publicApi
9050 */
9051export declare const VERSION: Version;
9052
9053
9054/**
9055 * @description Represents the version of Angular
9056 *
9057 * @publicApi
9058 */
9059export declare class Version {
9060 full: string;
9061 readonly major: string;
9062 readonly minor: string;
9063 readonly patch: string;
9064 constructor(full: string);
9065}
9066
9067declare const VIEW_REFS = 8;
9068
9069/**
9070 * Type of the ViewChild metadata.
9071 *
9072 * @publicApi
9073 */
9074export declare type ViewChild = Query;
9075
9076/**
9077 * ViewChild decorator and metadata.
9078 *
9079 * @Annotation
9080 * @publicApi
9081 */
9082export declare const ViewChild: ViewChildDecorator;
9083
9084/**
9085 * Type of the ViewChild decorator / constructor function.
9086 *
9087 * @see `ViewChild`.
9088 * @publicApi
9089 */
9090export declare interface ViewChildDecorator {
9091 /**
9092 * @description
9093 * Property decorator that configures a view query.
9094 * The change detector looks for the first element or the directive matching the selector
9095 * in the view DOM. If the view DOM changes, and a new child matches the selector,
9096 * the property is updated.
9097 *
9098 * View queries are set before the `ngAfterViewInit` callback is called.
9099 *
9100 * **Metadata Properties**:
9101 *
9102 * * **selector** - The directive type or the name used for querying.
9103 * * **read** - Used to read a different token from the queried elements.
9104 * * **static** - True to resolve query results before change detection runs,
9105 * false to resolve after change detection. Defaults to false.
9106 *
9107 *
9108 * The following selectors are supported.
9109 * * Any class with the `@Component` or `@Directive` decorator
9110 * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
9111 * with `@ViewChild('cmp')`)
9112 * * Any provider defined in the child component tree of the current component (e.g.
9113 * `@ViewChild(SomeService) someService: SomeService`)
9114 * * Any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal:
9115 * any`)
9116 * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChild(TemplateRef)
9117 * template;`)
9118 *
9119 * The following values are supported by `read`:
9120 * * Any class with the `@Component` or `@Directive` decorator
9121 * * Any provider defined on the injector of the component that is matched by the `selector` of
9122 * this query
9123 * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
9124 * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
9125 *
9126 * @usageNotes
9127 *
9128 * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}
9129 *
9130 * ### Example 2
9131 *
9132 * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}
9133 *
9134 * @Annotation
9135 */
9136 (selector: ProviderToken<unknown> | Function | string, opts?: {
9137 read?: any;
9138 static?: boolean;
9139 }): any;
9140 new (selector: ProviderToken<unknown> | Function | string, opts?: {
9141 read?: any;
9142 static?: boolean;
9143 }): ViewChild;
9144}
9145
9146/**
9147 * Type of the ViewChildren metadata.
9148 *
9149 * @publicApi
9150 */
9151export declare type ViewChildren = Query;
9152
9153/**
9154 * ViewChildren decorator and metadata.
9155 *
9156 * @Annotation
9157 * @publicApi
9158 */
9159export declare const ViewChildren: ViewChildrenDecorator;
9160
9161/**
9162 * Type of the ViewChildren decorator / constructor function.
9163 *
9164 * @see `ViewChildren`.
9165 *
9166 * @publicApi
9167 */
9168export declare interface ViewChildrenDecorator {
9169 /**
9170 * @description
9171 * Property decorator that configures a view query.
9172 *
9173 * Use to get the `QueryList` of elements or directives from the view DOM.
9174 * Any time a child element is added, removed, or moved, the query list will be updated,
9175 * and the changes observable of the query list will emit a new value.
9176 *
9177 * View queries are set before the `ngAfterViewInit` callback is called.
9178 *
9179 * **Metadata Properties**:
9180 *
9181 * * **selector** - The directive type or the name used for querying.
9182 * * **read** - Used to read a different token from the queried elements.
9183 * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only
9184 * if the QueryList result has changed. When `false` the `changes` observable might emit even
9185 * if the QueryList has not changed.
9186 * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and
9187 * removed in future versions of Angular.
9188 *
9189 * The following selectors are supported.
9190 * * Any class with the `@Component` or `@Directive` decorator
9191 * * A template reference variable as a string (e.g. query `<my-component #cmp></my-component>`
9192 * with `@ViewChildren('cmp')`)
9193 * * Any provider defined in the child component tree of the current component (e.g.
9194 * `@ViewChildren(SomeService) someService!: SomeService`)
9195 * * Any provider defined through a string token (e.g. `@ViewChildren('someToken')
9196 * someTokenVal!: any`)
9197 * * A `TemplateRef` (e.g. query `<ng-template></ng-template>` with `@ViewChildren(TemplateRef)
9198 * template;`)
9199 *
9200 * In addition, multiple string selectors can be separated with a comma (e.g.
9201 * `@ViewChildren('cmp1,cmp2')`)
9202 *
9203 * The following values are supported by `read`:
9204 * * Any class with the `@Component` or `@Directive` decorator
9205 * * Any provider defined on the injector of the component that is matched by the `selector` of
9206 * this query
9207 * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`)
9208 * * `TemplateRef`, `ElementRef`, and `ViewContainerRef`
9209 *
9210 * @usageNotes
9211 *
9212 * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}
9213 *
9214 * ### Another example
9215 *
9216 * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'}
9217 *
9218 * @Annotation
9219 */
9220 (selector: ProviderToken<unknown> | Function | string, opts?: {
9221 read?: any;
9222 emitDistinctChangesOnly?: boolean;
9223 }): any;
9224 new (selector: ProviderToken<unknown> | Function | string, opts?: {
9225 read?: any;
9226 emitDistinctChangesOnly?: boolean;
9227 }): ViewChildren;
9228}
9229
9230/**
9231 * Represents a container where one or more views can be attached to a component.
9232 *
9233 * Can contain *host views* (created by instantiating a
9234 * component with the `createComponent()` method), and *embedded views*
9235 * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
9236 *
9237 * A view container instance can contain other view containers,
9238 * creating a [view hierarchy](guide/glossary#view-tree).
9239 *
9240 * @see `ComponentRef`
9241 * @see `EmbeddedViewRef`
9242 *
9243 * @publicApi
9244 */
9245export declare abstract class ViewContainerRef {
9246 /**
9247 * Anchor element that specifies the location of this container in the containing view.
9248 * Each view container can have only one anchor element, and each anchor element
9249 * can have only a single view container.
9250 *
9251 * Root elements of views attached to this container become siblings of the anchor element in
9252 * the rendered view.
9253 *
9254 * Access the `ViewContainerRef` of an element by placing a `Directive` injected
9255 * with `ViewContainerRef` on the element, or use a `ViewChild` query.
9256 *
9257 * <!-- TODO: rename to anchorElement -->
9258 */
9259 abstract get element(): ElementRef;
9260 /**
9261 * The [dependency injector](guide/glossary#injector) for this view container.
9262 */
9263 abstract get injector(): Injector;
9264 /** @deprecated No replacement */
9265 abstract get parentInjector(): Injector;
9266 /**
9267 * Destroys all views in this container.
9268 */
9269 abstract clear(): void;
9270 /**
9271 * Retrieves a view from this container.
9272 * @param index The 0-based index of the view to retrieve.
9273 * @returns The `ViewRef` instance, or null if the index is out of range.
9274 */
9275 abstract get(index: number): ViewRef | null;
9276 /**
9277 * Reports how many views are currently attached to this container.
9278 * @returns The number of views.
9279 */
9280 abstract get length(): number;
9281 /**
9282 * Instantiates an embedded view and inserts it
9283 * into this container.
9284 * @param templateRef The HTML template that defines the view.
9285 * @param context The data-binding context of the embedded view, as declared
9286 * in the `<ng-template>` usage.
9287 * @param options Extra configuration for the created view. Includes:
9288 * * index: The 0-based index at which to insert the new view into this container.
9289 * If not specified, appends the new view as the last entry.
9290 * * injector: Injector to be used within the embedded view.
9291 *
9292 * @returns The `ViewRef` instance for the newly created view.
9293 */
9294 abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, options?: {
9295 index?: number;
9296 injector?: Injector;
9297 }): EmbeddedViewRef<C>;
9298 /**
9299 * Instantiates an embedded view and inserts it
9300 * into this container.
9301 * @param templateRef The HTML template that defines the view.
9302 * @param context The data-binding context of the embedded view, as declared
9303 * in the `<ng-template>` usage.
9304 * @param index The 0-based index at which to insert the new view into this container.
9305 * If not specified, appends the new view as the last entry.
9306 *
9307 * @returns The `ViewRef` instance for the newly created view.
9308 */
9309 abstract createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number): EmbeddedViewRef<C>;
9310 /**
9311 * Instantiates a single component and inserts its host view into this container.
9312 *
9313 * @param componentType Component Type to use.
9314 * @param options An object that contains extra parameters:
9315 * * index: the index at which to insert the new component's host view into this container.
9316 * If not specified, appends the new view as the last entry.
9317 * * injector: the injector to use as the parent for the new component.
9318 * * ngModuleRef: an NgModuleRef of the component's NgModule, you should almost always provide
9319 * this to ensure that all expected providers are available for the component
9320 * instantiation.
9321 * * environmentInjector: an EnvironmentInjector which will provide the component's environment.
9322 * you should almost always provide this to ensure that all expected providers
9323 * are available for the component instantiation. This option is intended to
9324 * replace the `ngModuleRef` parameter.
9325 * * projectableNodes: list of DOM nodes that should be projected through
9326 * [`<ng-content>`](api/core/ng-content) of the new component instance.
9327 *
9328 * @returns The new `ComponentRef` which contains the component instance and the host view.
9329 */
9330 abstract createComponent<C>(componentType: Type<C>, options?: {
9331 index?: number;
9332 injector?: Injector;
9333 ngModuleRef?: NgModuleRef<unknown>;
9334 environmentInjector?: EnvironmentInjector | NgModuleRef<unknown>;
9335 projectableNodes?: Node[][];
9336 }): ComponentRef<C>;
9337 /**
9338 * Instantiates a single component and inserts its host view into this container.
9339 *
9340 * @param componentFactory Component factory to use.
9341 * @param index The index at which to insert the new component's host view into this container.
9342 * If not specified, appends the new view as the last entry.
9343 * @param injector The injector to use as the parent for the new component.
9344 * @param projectableNodes List of DOM nodes that should be projected through
9345 * [`<ng-content>`](api/core/ng-content) of the new component instance.
9346 * @param ngModuleRef An instance of the NgModuleRef that represent an NgModule.
9347 * This information is used to retrieve corresponding NgModule injector.
9348 *
9349 * @returns The new `ComponentRef` which contains the component instance and the host view.
9350 *
9351 * @deprecated Angular no longer requires component factories to dynamically create components.
9352 * Use different signature of the `createComponent` method, which allows passing
9353 * Component class directly.
9354 */
9355 abstract createComponent<C>(componentFactory: ComponentFactory<C>, index?: number, injector?: Injector, projectableNodes?: any[][], environmentInjector?: EnvironmentInjector | NgModuleRef<any>): ComponentRef<C>;
9356 /**
9357 * Inserts a view into this container.
9358 * @param viewRef The view to insert.
9359 * @param index The 0-based index at which to insert the view.
9360 * If not specified, appends the new view as the last entry.
9361 * @returns The inserted `ViewRef` instance.
9362 *
9363 */
9364 abstract insert(viewRef: ViewRef, index?: number): ViewRef;
9365 /**
9366 * Moves a view to a new location in this container.
9367 * @param viewRef The view to move.
9368 * @param index The 0-based index of the new location.
9369 * @returns The moved `ViewRef` instance.
9370 */
9371 abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;
9372 /**
9373 * Returns the index of a view within the current container.
9374 * @param viewRef The view to query.
9375 * @returns The 0-based index of the view's position in this container,
9376 * or `-1` if this container doesn't contain the view.
9377 */
9378 abstract indexOf(viewRef: ViewRef): number;
9379 /**
9380 * Destroys a view attached to this container
9381 * @param index The 0-based index of the view to destroy.
9382 * If not specified, the last view in the container is removed.
9383 */
9384 abstract remove(index?: number): void;
9385 /**
9386 * Detaches a view from this container without destroying it.
9387 * Use along with `insert()` to move a view within the current container.
9388 * @param index The 0-based index of the view to detach.
9389 * If not specified, the last view in the container is detached.
9390 */
9391 abstract detach(index?: number): ViewRef | null;
9392}
9393
9394
9395/**
9396 * Defines the CSS styles encapsulation policies for the {@link Component} decorator's
9397 * `encapsulation` option.
9398 *
9399 * See {@link Component#encapsulation encapsulation}.
9400 *
9401 * @usageNotes
9402 * ### Example
9403 *
9404 * {@example core/ts/metadata/encapsulation.ts region='longform'}
9405 *
9406 * @publicApi
9407 */
9408export declare enum ViewEncapsulation {
9409 /**
9410 * Emulates a native Shadow DOM encapsulation behavior by adding a specific attribute to the
9411 * component's host element and applying the same attribute to all the CSS selectors provided
9412 * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls}.
9413 *
9414 * This is the default option.
9415 */
9416 Emulated = 0,
9417 /**
9418 * Doesn't provide any sort of CSS style encapsulation, meaning that all the styles provided
9419 * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls} are applicable
9420 * to any HTML element of the application regardless of their host Component.
9421 */
9422 None = 2,
9423 /**
9424 * Uses the browser's native Shadow DOM API to encapsulate CSS styles, meaning that it creates
9425 * a ShadowRoot for the component's host element which is then used to encapsulate
9426 * all the Component's styling.
9427 */
9428 ShadowDom = 3
9429}
9430
9431declare enum ViewEncapsulation_2 {
9432 Emulated = 0,
9433 None = 2,
9434 ShadowDom = 3
9435}
9436
9437declare interface viewEngine_ChangeDetectorRef_interface extends ChangeDetectorRef {
9438}
9439
9440/**
9441 * Definition of what a view queries function should look like.
9442 */
9443declare type ViewQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U) => void;
9444
9445/**
9446 * Represents an Angular [view](guide/glossary#view "Definition").
9447 *
9448 * @see {@link ChangeDetectorRef#usage-notes Change detection usage}
9449 *
9450 * @publicApi
9451 */
9452export declare abstract class ViewRef extends ChangeDetectorRef {
9453 /**
9454 * Destroys this view and all of the data structures associated with it.
9455 */
9456 abstract destroy(): void;
9457 /**
9458 * Reports whether this view has been destroyed.
9459 * @returns True after the `destroy()` method has been called, false otherwise.
9460 */
9461 abstract get destroyed(): boolean;
9462 /**
9463 * A lifecycle hook that provides additional developer-defined cleanup
9464 * functionality for views.
9465 * @param callback A handler function that cleans up developer-defined data
9466 * associated with a view. Called when the `destroy()` method is invoked.
9467 */
9468 abstract onDestroy(callback: Function): any /** TODO #9100, replace by void in a major release*/;
9469}
9470
9471/**
9472 * Interface for tracking root `ViewRef`s in `ApplicationRef`.
9473 *
9474 * NOTE: Importing `ApplicationRef` here directly creates circular dependency, which is why we have
9475 * a subset of the `ApplicationRef` interface `ViewRefTracker` here.
9476 */
9477declare interface ViewRefTracker {
9478 detachView(viewRef: ViewRef): void;
9479}
9480
9481/**
9482 * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to
9483 * the DOM in a browser environment.
9484 */
9485export declare function ɵ_sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): TrustedHTML | string;
9486
9487
9488export declare function ɵ_sanitizeUrl(url: string): string;
9489
9490/**
9491 * Internal token to indicate whether having multiple bootstrapped platform should be allowed (only
9492 * one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.
9493 */
9494export declare const ɵALLOW_MULTIPLE_PLATFORMS: InjectionToken<boolean>;
9495
9496export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Html): value is ɵSafeHtml;
9497
9498export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.ResourceUrl): value is ɵSafeResourceUrl;
9499
9500export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Script): value is ɵSafeScript;
9501
9502export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Style): value is ɵSafeStyle;
9503
9504export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType.Url): value is ɵSafeUrl;
9505
9506export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType): boolean;
9507
9508/**
9509 * Providers that generate a random `APP_ID_TOKEN`.
9510 * @publicApi
9511 */
9512export declare const ɵAPP_ID_RANDOM_PROVIDER: {
9513 provide: InjectionToken<string>;
9514 useFactory: typeof _appIdRandomProviderFactory;
9515 deps: any[];
9516};
9517
9518/**
9519 * A set of marker values to be used in the attributes arrays. These markers indicate that some
9520 * items are not regular attributes and the processing should be adapted accordingly.
9521 */
9522export declare const enum ɵAttributeMarker {
9523 /**
9524 * An implicit marker which indicates that the value in the array are of `attributeKey`,
9525 * `attributeValue` format.
9526 *
9527 * NOTE: This is implicit as it is the type when no marker is present in array. We indicate that
9528 * it should not be present at runtime by the negative number.
9529 */
9530 ImplicitAttributes = -1,
9531 /**
9532 * Marker indicates that the following 3 values in the attributes array are:
9533 * namespaceUri, attributeName, attributeValue
9534 * in that order.
9535 */
9536 NamespaceURI = 0,
9537 /**
9538 * Signals class declaration.
9539 *
9540 * Each value following `Classes` designates a class name to include on the element.
9541 * ## Example:
9542 *
9543 * Given:
9544 * ```
9545 * <div class="foo bar baz">...<d/vi>
9546 * ```
9547 *
9548 * the generated code is:
9549 * ```
9550 * var _c1 = [AttributeMarker.Classes, 'foo', 'bar', 'baz'];
9551 * ```
9552 */
9553 Classes = 1,
9554 /**
9555 * Signals style declaration.
9556 *
9557 * Each pair of values following `Styles` designates a style name and value to include on the
9558 * element.
9559 * ## Example:
9560 *
9561 * Given:
9562 * ```
9563 * <div style="width:100px; height:200px; color:red">...</div>
9564 * ```
9565 *
9566 * the generated code is:
9567 * ```
9568 * var _c1 = [AttributeMarker.Styles, 'width', '100px', 'height'. '200px', 'color', 'red'];
9569 * ```
9570 */
9571 Styles = 2,
9572 /**
9573 * Signals that the following attribute names were extracted from input or output bindings.
9574 *
9575 * For example, given the following HTML:
9576 *
9577 * ```
9578 * <div moo="car" [foo]="exp" (bar)="doSth()">
9579 * ```
9580 *
9581 * the generated code is:
9582 *
9583 * ```
9584 * var _c1 = ['moo', 'car', AttributeMarker.Bindings, 'foo', 'bar'];
9585 * ```
9586 */
9587 Bindings = 3,
9588 /**
9589 * Signals that the following attribute names were hoisted from an inline-template declaration.
9590 *
9591 * For example, given the following HTML:
9592 *
9593 * ```
9594 * <div *ngFor="let value of values; trackBy:trackBy" dirA [dirB]="value">
9595 * ```
9596 *
9597 * the generated code for the `template()` instruction would include:
9598 *
9599 * ```
9600 * ['dirA', '', AttributeMarker.Bindings, 'dirB', AttributeMarker.Template, 'ngFor', 'ngForOf',
9601 * 'ngForTrackBy', 'let-value']
9602 * ```
9603 *
9604 * while the generated code for the `element()` instruction inside the template function would
9605 * include:
9606 *
9607 * ```
9608 * ['dirA', '', AttributeMarker.Bindings, 'dirB']
9609 * ```
9610 */
9611 Template = 4,
9612 /**
9613 * Signals that the following attribute is `ngProjectAs` and its value is a parsed
9614 * `CssSelector`.
9615 *
9616 * For example, given the following HTML:
9617 *
9618 * ```
9619 * <h1 attr="value" ngProjectAs="[title]">
9620 * ```
9621 *
9622 * the generated code for the `element()` instruction would include:
9623 *
9624 * ```
9625 * ['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]
9626 * ```
9627 */
9628 ProjectAs = 5,
9629 /**
9630 * Signals that the following attribute will be translated by runtime i18n
9631 *
9632 * For example, given the following HTML:
9633 *
9634 * ```
9635 * <div moo="car" foo="value" i18n-foo [bar]="binding" i18n-bar>
9636 * ```
9637 *
9638 * the generated code is:
9639 *
9640 * ```
9641 * var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];
9642 */
9643 I18n = 6
9644}
9645
9646/**
9647 * Mark `html` string as trusted.
9648 *
9649 * This function wraps the trusted string in `String` and brands it in a way which makes it
9650 * recognizable to {@link htmlSanitizer} to be trusted implicitly.
9651 *
9652 * @param trustedHtml `html` string which needs to be implicitly trusted.
9653 * @returns a `html` which has been branded to be implicitly trusted.
9654 */
9655export declare function ɵbypassSanitizationTrustHtml(trustedHtml: string): ɵSafeHtml;
9656
9657/**
9658 * Mark `url` string as trusted.
9659 *
9660 * This function wraps the trusted string in `String` and brands it in a way which makes it
9661 * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.
9662 *
9663 * @param trustedResourceUrl `url` string which needs to be implicitly trusted.
9664 * @returns a `url` which has been branded to be implicitly trusted.
9665 */
9666export declare function ɵbypassSanitizationTrustResourceUrl(trustedResourceUrl: string): ɵSafeResourceUrl;
9667
9668/**
9669 * Mark `script` string as trusted.
9670 *
9671 * This function wraps the trusted string in `String` and brands it in a way which makes it
9672 * recognizable to {@link scriptSanitizer} to be trusted implicitly.
9673 *
9674 * @param trustedScript `script` string which needs to be implicitly trusted.
9675 * @returns a `script` which has been branded to be implicitly trusted.
9676 */
9677export declare function ɵbypassSanitizationTrustScript(trustedScript: string): ɵSafeScript;
9678
9679/**
9680 * Mark `style` string as trusted.
9681 *
9682 * This function wraps the trusted string in `String` and brands it in a way which makes it
9683 * recognizable to {@link styleSanitizer} to be trusted implicitly.
9684 *
9685 * @param trustedStyle `style` string which needs to be implicitly trusted.
9686 * @returns a `style` hich has been branded to be implicitly trusted.
9687 */
9688export declare function ɵbypassSanitizationTrustStyle(trustedStyle: string): ɵSafeStyle;
9689
9690/**
9691 * Mark `url` string as trusted.
9692 *
9693 * This function wraps the trusted string in `String` and brands it in a way which makes it
9694 * recognizable to {@link urlSanitizer} to be trusted implicitly.
9695 *
9696 * @param trustedUrl `url` string which needs to be implicitly trusted.
9697 * @returns a `url` which has been branded to be implicitly trusted.
9698 */
9699export declare function ɵbypassSanitizationTrustUrl(trustedUrl: string): ɵSafeUrl;
9700
9701
9702export declare const enum ɵBypassType {
9703 Url = "URL",
9704 Html = "HTML",
9705 ResourceUrl = "ResourceURL",
9706 Script = "Script",
9707 Style = "Style"
9708}
9709
9710/**
9711 * Defines the possible states of the default change detector.
9712 * @see `ChangeDetectorRef`
9713 */
9714export declare enum ɵChangeDetectorStatus {
9715 /**
9716 * A state in which, after calling `detectChanges()`, the change detector
9717 * state becomes `Checked`, and must be explicitly invoked or reactivated.
9718 */
9719 CheckOnce = 0,
9720 /**
9721 * A state in which change detection is skipped until the change detector mode
9722 * becomes `CheckOnce`.
9723 */
9724 Checked = 1,
9725 /**
9726 * A state in which change detection continues automatically until explicitly
9727 * deactivated.
9728 */
9729 CheckAlways = 2,
9730 /**
9731 * A state in which a change detector sub tree is not a part of the main tree and
9732 * should be skipped.
9733 */
9734 Detached = 3,
9735 /**
9736 * Indicates that the change detector encountered an error checking a binding
9737 * or calling a directive lifecycle method and is now in an inconsistent state. Change
9738 * detectors in this state do not detect changes.
9739 */
9740 Errored = 4,
9741 /**
9742 * Indicates that the change detector has been destroyed.
9743 */
9744 Destroyed = 5
9745}
9746
9747export declare function ɵclearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component>;
9748
9749
9750/** Coerces a value (typically a string) to a boolean. */
9751export declare function ɵcoerceToBoolean(value: unknown): boolean;
9752
9753/**
9754 * Compile an Angular component according to its decorator metadata, and patch the resulting
9755 * component def (ɵcmp) onto the component type.
9756 *
9757 * Compilation may be asynchronous (due to the need to resolve URLs for the component template or
9758 * other resources, for example). In the event that compilation is not immediate, `compileComponent`
9759 * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`
9760 * until the global queue has been resolved with a call to `resolveComponentResources`.
9761 */
9762export declare function ɵcompileComponent(type: Type<any>, metadata: Component): void;
9763
9764/**
9765 * Compile an Angular directive according to its decorator metadata, and patch the resulting
9766 * directive def onto the component type.
9767 *
9768 * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which
9769 * will resolve when compilation completes and the directive becomes usable.
9770 */
9771export declare function ɵcompileDirective(type: Type<any>, directive: Directive | null): void;
9772
9773/**
9774 * Compiles a module in JIT mode.
9775 *
9776 * This function automatically gets called when a class has a `@NgModule` decorator.
9777 */
9778export declare function ɵcompileNgModule(moduleType: Type<any>, ngModule?: NgModule): void;
9779
9780/**
9781 * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.
9782 *
9783 * It's possible to compile a module via this API which will allow duplicate declarations in its
9784 * root.
9785 */
9786export declare function ɵcompileNgModuleDefs(moduleType: ɵNgModuleType, ngModule: NgModule, allowDuplicateDeclarationsInRoot?: boolean): void;
9787
9788export declare function ɵcompileNgModuleFactory<M>(injector: Injector, options: CompilerOptions, moduleType: Type<M>): Promise<NgModuleFactory<M>>;
9789
9790export declare function ɵcompilePipe(type: Type<any>, meta: Pipe): void;
9791
9792/**
9793 * Runtime link information for Components.
9794 *
9795 * This is an internal data structure used by the render to link
9796 * components into templates.
9797 *
9798 * NOTE: Always use `defineComponent` function to create this object,
9799 * never create the object directly since the shape of this object
9800 * can change between versions.
9801 *
9802 * See: {@link defineComponent}
9803 */
9804export declare interface ɵComponentDef<T> extends ɵDirectiveDef<T> {
9805 /**
9806 * Unique ID for the component. Used in view encapsulation and
9807 * to keep track of the injector in standalone components.
9808 */
9809 readonly id: string;
9810 /**
9811 * The View template of the component.
9812 */
9813 readonly template: ComponentTemplate<T>;
9814 /** Constants associated with the component's view. */
9815 readonly consts: TConstantsOrFactory | null;
9816 /**
9817 * An array of `ngContent[selector]` values that were found in the template.
9818 */
9819 readonly ngContentSelectors?: string[];
9820 /**
9821 * A set of styles that the component needs to be present for component to render correctly.
9822 */
9823 readonly styles: string[];
9824 /**
9825 * The number of nodes, local refs, and pipes in this component template.
9826 *
9827 * Used to calculate the length of the component's LView array, so we
9828 * can pre-fill the array and set the binding start index.
9829 */
9830 readonly decls: number;
9831 /**
9832 * The number of bindings in this component template (including pure fn bindings).
9833 *
9834 * Used to calculate the length of the component's LView array, so we
9835 * can pre-fill the array and set the host binding start index.
9836 */
9837 readonly vars: number;
9838 /**
9839 * Query-related instructions for a component.
9840 */
9841 viewQuery: ViewQueriesFunction<T> | null;
9842 /**
9843 * The view encapsulation type, which determines how styles are applied to
9844 * DOM elements. One of
9845 * - `Emulated` (default): Emulate native scoping of styles.
9846 * - `Native`: Use the native encapsulation mechanism of the renderer.
9847 * - `ShadowDom`: Use modern [ShadowDOM](https://w3c.github.io/webcomponents/spec/shadow/) and
9848 * create a ShadowRoot for component's host element.
9849 * - `None`: Do not provide any template or style encapsulation.
9850 */
9851 readonly encapsulation: ViewEncapsulation;
9852 /**
9853 * Defines arbitrary developer-defined data to be stored on a renderer instance.
9854 * This is useful for renderers that delegate to other renderers.
9855 */
9856 readonly data: {
9857 [kind: string]: any;
9858 };
9859 /** Whether or not this component's ChangeDetectionStrategy is OnPush */
9860 readonly onPush: boolean;
9861 /**
9862 * Registry of directives and components that may be found in this view.
9863 *
9864 * The property is either an array of `DirectiveDef`s or a function which returns the array of
9865 * `DirectiveDef`s. The function is necessary to be able to support forward declarations.
9866 */
9867 directiveDefs: DirectiveDefListOrFactory | null;
9868 /**
9869 * Registry of pipes that may be found in this view.
9870 *
9871 * The property is either an array of `PipeDefs`s or a function which returns the array of
9872 * `PipeDefs`s. The function is necessary to be able to support forward declarations.
9873 */
9874 pipeDefs: PipeDefListOrFactory | null;
9875 /**
9876 * Unfiltered list of all dependencies of a component, or `null` if none.
9877 */
9878 dependencies: TypeOrFactory<DependencyTypeList> | null;
9879 /**
9880 * The set of schemas that declare elements to be allowed in the component's template.
9881 */
9882 schemas: SchemaMetadata[] | null;
9883 /**
9884 * Ivy runtime uses this place to store the computed tView for the component. This gets filled on
9885 * the first run of component.
9886 */
9887 tView: TView | null;
9888 /**
9889 * A function added by the {@link ɵɵStandaloneFeature} and used by the framework to create
9890 * standalone injectors.
9891 */
9892 getStandaloneInjector: ((parentInjector: EnvironmentInjector) => EnvironmentInjector | null) | null;
9893 /**
9894 * Used to store the result of `noSideEffects` function so that it is not removed by closure
9895 * compiler. The property should never be read.
9896 */
9897 readonly _?: unknown;
9898}
9899
9900/**
9901 * A subclass of `Type` which has a static `ɵcmp`:`ComponentDef` field making it
9902 * consumable for rendering.
9903 */
9904export declare interface ɵComponentType<T> extends Type<T> {
9905 ɵcmp: unknown;
9906}
9907
9908export declare class ɵConsole {
9909 log(message: string): void;
9910 warn(message: string): void;
9911 static ɵfac: i0.ɵɵFactoryDeclaration<ɵConsole, never>;
9912 static ɵprov: i0.ɵɵInjectableDeclaration<ɵConsole>;
9913}
9914
9915export declare function ɵconvertToBitFlags(flags: InjectOptions | InjectFlags | undefined): InjectFlags | undefined;
9916
9917/**
9918 * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
9919 *
9920 * @publicApi
9921 */
9922export declare function ɵcreateInjector(defType: any, parent?: Injector | null, additionalProviders?: StaticProvider[] | null, name?: string): Injector;
9923
9924/**
9925 * A list of CssSelectors.
9926 *
9927 * A directive or component can have multiple selectors. This type is used for
9928 * directive defs so any of the selectors in the list will match that directive.
9929 *
9930 * Original: 'form, [ngForm]'
9931 * Parsed: [['form'], ['', 'ngForm', '']]
9932 */
9933export declare type ɵCssSelectorList = CssSelector[];
9934
9935/**
9936 * Index of each value in currency data (used to describe CURRENCIES_EN in currencies.ts)
9937 */
9938export declare const enum ɵCurrencyIndex {
9939 Symbol = 0,
9940 SymbolNarrow = 1,
9941 NbOfDigits = 2
9942}
9943
9944/**
9945 * The locale id that the application is using by default (for translations and ICU expressions).
9946 */
9947export declare const ɵDEFAULT_LOCALE_ID = "en-US";
9948
9949export declare const ɵdefaultIterableDiffers: IterableDiffers;
9950
9951export declare const ɵdefaultKeyValueDiffers: KeyValueDiffers;
9952
9953
9954/**
9955 * Synchronously perform change detection on a component (and possibly its sub-components).
9956 *
9957 * This function triggers change detection in a synchronous way on a component.
9958 *
9959 * @param component The component which the change detection should be performed on.
9960 */
9961export declare function ɵdetectChanges(component: {}): void;
9962
9963
9964export declare function ɵdevModeEqual(a: any, b: any): boolean;
9965
9966/**
9967 * Runtime link information for Directives.
9968 *
9969 * This is an internal data structure used by the render to link
9970 * directives into templates.
9971 *
9972 * NOTE: Always use `defineDirective` function to create this object,
9973 * never create the object directly since the shape of this object
9974 * can change between versions.
9975 *
9976 * @param Selector type metadata specifying the selector of the directive or component
9977 *
9978 * See: {@link defineDirective}
9979 */
9980export declare interface ɵDirectiveDef<T> {
9981 /**
9982 * A dictionary mapping the inputs' minified property names to their public API names, which
9983 * are their aliases if any, or their original unminified property names
9984 * (as in `@Input('alias') propertyName: any;`).
9985 */
9986 readonly inputs: {
9987 [P in keyof T]: string;
9988 };
9989 /**
9990 * @deprecated This is only here because `NgOnChanges` incorrectly uses declared name instead of
9991 * public or minified name.
9992 */
9993 readonly declaredInputs: {
9994 [P in keyof T]: string;
9995 };
9996 /**
9997 * A dictionary mapping the outputs' minified property names to their public API names, which
9998 * are their aliases if any, or their original unminified property names
9999 * (as in `@Output('alias') propertyName: any;`).
10000 */
10001 readonly outputs: {
10002 [P in keyof T]: string;
10003 };
10004 /**
10005 * Function to create and refresh content queries associated with a given directive.
10006 */
10007 contentQueries: ContentQueriesFunction<T> | null;
10008 /**
10009 * Query-related instructions for a directive. Note that while directives don't have a
10010 * view and as such view queries won't necessarily do anything, there might be
10011 * components that extend the directive.
10012 */
10013 viewQuery: ViewQueriesFunction<T> | null;
10014 /**
10015 * Refreshes host bindings on the associated directive.
10016 */
10017 readonly hostBindings: HostBindingsFunction<T> | null;
10018 /**
10019 * The number of bindings in this directive `hostBindings` (including pure fn bindings).
10020 *
10021 * Used to calculate the length of the component's LView array, so we
10022 * can pre-fill the array and set the host binding start index.
10023 */
10024 readonly hostVars: number;
10025 /**
10026 * Assign static attribute values to a host element.
10027 *
10028 * This property will assign static attribute values as well as class and style
10029 * values to a host element. Since attribute values can consist of different types of values, the
10030 * `hostAttrs` array must include the values in the following format:
10031 *
10032 * attrs = [
10033 * // static attributes (like `title`, `name`, `id`...)
10034 * attr1, value1, attr2, value,
10035 *
10036 * // a single namespace value (like `x:id`)
10037 * NAMESPACE_MARKER, namespaceUri1, name1, value1,
10038 *
10039 * // another single namespace value (like `x:name`)
10040 * NAMESPACE_MARKER, namespaceUri2, name2, value2,
10041 *
10042 * // a series of CSS classes that will be applied to the element (no spaces)
10043 * CLASSES_MARKER, class1, class2, class3,
10044 *
10045 * // a series of CSS styles (property + value) that will be applied to the element
10046 * STYLES_MARKER, prop1, value1, prop2, value2
10047 * ]
10048 *
10049 * All non-class and non-style attributes must be defined at the start of the list
10050 * first before all class and style values are set. When there is a change in value
10051 * type (like when classes and styles are introduced) a marker must be used to separate
10052 * the entries. The marker values themselves are set via entries found in the
10053 * [AttributeMarker] enum.
10054 */
10055 readonly hostAttrs: TAttributes | null;
10056 /** Token representing the directive. Used by DI. */
10057 readonly type: Type<T>;
10058 /** Function that resolves providers and publishes them into the DI system. */
10059 providersResolver: (<U extends T>(def: ɵDirectiveDef<U>, processProvidersFn?: ProcessProvidersFunction) => void) | null;
10060 /** The selectors that will be used to match nodes to this directive. */
10061 readonly selectors: ɵCssSelectorList;
10062 /**
10063 * Name under which the directive is exported (for use with local references in template)
10064 */
10065 readonly exportAs: string[] | null;
10066 /**
10067 * Whether this directive (or component) is standalone.
10068 */
10069 readonly standalone: boolean;
10070 /**
10071 * Factory function used to create a new directive instance. Will be null initially.
10072 * Populated when the factory is first requested by directive instantiation logic.
10073 */
10074 readonly factory: FactoryFn<T> | null;
10075 /**
10076 * The features applied to this directive
10077 */
10078 readonly features: DirectiveDefFeature[] | null;
10079 /**
10080 * Function that will add the host directives to the list of matches during directive matching.
10081 * Patched onto the definition by the `HostDirectivesFeature`.
10082 * @param currentDef Definition that has been matched.
10083 * @param matchedDefs List of all matches for a specified node. Will be mutated to include the
10084 * host directives.
10085 * @param hostDirectiveDefs Mapping of directive definitions to their host directive
10086 * configuration. Host directives will be added to the map as they're being matched to the node.
10087 */
10088 findHostDirectiveDefs: ((currentDef: ɵDirectiveDef<unknown>, matchedDefs: ɵDirectiveDef<unknown>[], hostDirectiveDefs: HostDirectiveDefs) => void) | null;
10089 /** Additional directives to be applied whenever the directive has been matched. */
10090 hostDirectives: HostDirectiveDef[] | null;
10091 setInput: (<U extends T>(this: ɵDirectiveDef<U>, instance: U, value: any, publicName: string, privateName: string) => void) | null;
10092}
10093
10094/**
10095 * A subclass of `Type` which has a static `ɵdir`:`DirectiveDef` field making it
10096 * consumable for rendering.
10097 */
10098export declare interface ɵDirectiveType<T> extends Type<T> {
10099 ɵdir: unknown;
10100 ɵfac: unknown;
10101}
10102
10103/**
10104 * Index of each type of locale data from the extra locale data array
10105 */
10106export declare const enum ɵExtraLocaleDataIndex {
10107 ExtraDayPeriodFormats = 0,
10108 ExtraDayPeriodStandalone = 1,
10109 ExtraDayPeriodsRules = 2
10110}
10111
10112/**
10113 * Finds the locale data for a given locale.
10114 *
10115 * @param locale The locale code.
10116 * @returns The locale data.
10117 * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
10118 */
10119export declare function ɵfindLocaleData(locale: string): any;
10120
10121/**
10122 * Loops over queued module definitions, if a given module definition has all of its
10123 * declarations resolved, it dequeues that module definition and sets the scope on
10124 * its declarations.
10125 */
10126export declare function ɵflushModuleScopingQueueAsMuchAsPossible(): void;
10127
10128/**
10129 * Called to format a runtime error.
10130 * See additional info on the `message` argument type in the `RuntimeError` class description.
10131 */
10132export declare function ɵformatRuntimeError<T extends number = RuntimeErrorCode>(code: T, message: null | false | string): string;
10133
10134export declare function ɵgetDebugNodeR2(_nativeNode: any): DebugNode | null;
10135
10136/**
10137 * Retrieves directive instances associated with a given DOM node. Does not include
10138 * component instances.
10139 *
10140 * @usageNotes
10141 * Given the following DOM structure:
10142 *
10143 * ```html
10144 * <app-root>
10145 * <button my-button></button>
10146 * <my-comp></my-comp>
10147 * </app-root>
10148 * ```
10149 *
10150 * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`
10151 * directive that is associated with the DOM node.
10152 *
10153 * Calling `getDirectives` on `<my-comp>` will return an empty array.
10154 *
10155 * @param node DOM node for which to get the directives.
10156 * @returns Array of directives associated with the node.
10157 *
10158 * @publicApi
10159 * @globalApi ng
10160 */
10161export declare function ɵgetDirectives(node: Node): {}[];
10162
10163/**
10164 * Retrieves the host element of a component or directive instance.
10165 * The host element is the DOM element that matched the selector of the directive.
10166 *
10167 * @param componentOrDirective Component or directive instance for which the host
10168 * element should be retrieved.
10169 * @returns Host element of the target.
10170 *
10171 * @publicApi
10172 * @globalApi ng
10173 */
10174export declare function ɵgetHostElement(componentOrDirective: {}): Element;
10175
10176/**
10177 * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading
10178 * inherited value.
10179 *
10180 * @param type A type which may have its own (non-inherited) `ɵprov`.
10181 */
10182export declare function ɵgetInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null;
10183
10184/**
10185 * Returns the matching `LContext` data for a given DOM node, directive or component instance.
10186 *
10187 * This function will examine the provided DOM element, component, or directive instance\'s
10188 * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched
10189 * value will be that of the newly created `LContext`.
10190 *
10191 * If the monkey-patched value is the `LView` instance then the context value for that
10192 * target will be created and the monkey-patch reference will be updated. Therefore when this
10193 * function is called it may mutate the provided element\'s, component\'s or any of the associated
10194 * directive\'s monkey-patch values.
10195 *
10196 * If the monkey-patch value is not detected then the code will walk up the DOM until an element
10197 * is found which contains a monkey-patch reference. When that occurs then the provided element
10198 * will be updated with a new context (which is then returned). If the monkey-patch value is not
10199 * detected for a component/directive instance then it will throw an error (all components and
10200 * directives should be automatically monkey-patched by ivy).
10201 *
10202 * @param target Component, Directive or DOM Node.
10203 */
10204export declare function ɵgetLContext(target: any): ɵLContext | null;
10205
10206/**
10207 * Retrieves the default currency code for the given locale.
10208 *
10209 * The default is defined as the first currency which is still in use.
10210 *
10211 * @param locale The code of the locale whose currency code we want.
10212 * @returns The code of the default currency for the given locale.
10213 *
10214 */
10215export declare function ɵgetLocaleCurrencyCode(locale: string): string | null;
10216
10217/**
10218 * Retrieves the plural function used by ICU expressions to determine the plural case to use
10219 * for a given locale.
10220 * @param locale A locale code for the locale format rules to use.
10221 * @returns The plural function for the locale.
10222 * @see `NgPlural`
10223 * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
10224 */
10225export declare function ɵgetLocalePluralCase(locale: string): (value: number) => number;
10226
10227export declare function ɵgetSanitizationBypassType(value: any): ɵBypassType | null;
10228
10229/**
10230 * Gets the current value of the strict mode.
10231 */
10232export declare function ɵgetUnknownElementStrictMode(): boolean;
10233
10234/**
10235 * Gets the current value of the strict mode.
10236 */
10237export declare function ɵgetUnknownPropertyStrictMode(): boolean;
10238
10239
10240export declare const ɵglobal: any;
10241
10242/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */
10243export declare function ɵinjectChangeDetectorRef(flags: InjectFlags): ChangeDetectorRef;
10244
10245/**
10246 * An internal token whose presence in an injector indicates that the injector should treat itself
10247 * as a root scoped injector when processing requests for unknown tokens which may indicate
10248 * they are provided in the root scope.
10249 */
10250export declare const ɵINJECTOR_SCOPE: InjectionToken<InjectorScope | null>;
10251
10252/**
10253 * Internal create application API that implements the core application creation logic and optional
10254 * bootstrap logic.
10255 *
10256 * Platforms (such as `platform-browser`) may require different set of application and platform
10257 * providers for an application to function correctly. As a result, platforms may use this function
10258 * internally and supply the necessary providers during the bootstrap, while exposing
10259 * platform-specific APIs as a part of their public API.
10260 *
10261 * @returns A promise that returns an `ApplicationRef` instance once resolved.
10262 */
10263export declare function ɵinternalCreateApplication(config: {
10264 rootComponent?: Type<unknown>;
10265 appProviders?: Array<Provider | EnvironmentProviders>;
10266 platformProviders?: Provider[];
10267}): Promise<ApplicationRef>;
10268
10269export declare interface ɵInternalEnvironmentProviders extends EnvironmentProviders {
10270 ɵproviders: (Provider | EnvironmentProviders)[];
10271 /**
10272 * If present, indicates that the `EnvironmentProviders` were derived from NgModule providers.
10273 *
10274 * This is used to produce clearer error messages.
10275 */
10276 ɵfromNgModule?: true;
10277}
10278
10279export declare function ɵisBoundToModule<C>(cf: ComponentFactory<C>): boolean;
10280
10281/**
10282 * Reports whether a given strategy is currently the default for change detection.
10283 * @param changeDetectionStrategy The strategy to check.
10284 * @returns True if the given strategy is the current default, false otherwise.
10285 * @see `ChangeDetectorStatus`
10286 * @see `ChangeDetectorRef`
10287 */
10288export declare function ɵisDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy): boolean;
10289
10290export declare function ɵisEnvironmentProviders(value: Provider | EnvironmentProviders | ɵInternalEnvironmentProviders): value is ɵInternalEnvironmentProviders;
10291
10292export declare function ɵisInjectable(type: any): boolean;
10293
10294export declare function ɵisListLikeIterable(obj: any): boolean;
10295
10296/**
10297 * Determine if the argument is an Observable
10298 *
10299 * Strictly this tests that the `obj` is `Subscribable`, since `Observable`
10300 * types need additional methods, such as `lift()`. But it is adequate for our
10301 * needs since within the Angular framework code we only ever need to use the
10302 * `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects
10303 * into `Observable` as needed.
10304 */
10305export declare const ɵisObservable: (obj: any | Observable<any>) => obj is Observable<any>;
10306
10307/**
10308 * Determine if the argument is shaped like a Promise
10309 */
10310export declare function ɵisPromise<T = any>(obj: any): obj is Promise<T>;
10311
10312/**
10313 * Determine if the argument is a Subscribable
10314 */
10315export declare function ɵisSubscribable(obj: any | Subscribable<any>): obj is Subscribable<any>;
10316
10317export declare const ɵivyEnabled = true;
10318
10319/**
10320 * The internal view context which is specific to a given DOM element, directive or
10321 * component instance. Each value in here (besides the LView and element node details)
10322 * can be present, null or undefined. If undefined then it implies the value has not been
10323 * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
10324 *
10325 * Each value will get filled when the respective value is examined within the getContext
10326 * function. The component, element and each directive instance will share the same instance
10327 * of the context.
10328 */
10329export declare class ɵLContext {
10330 /**
10331 * ID of the component's parent view data.
10332 */
10333 private lViewId;
10334 /**
10335 * The index instance of the node.
10336 */
10337 nodeIndex: number;
10338 /**
10339 * The instance of the DOM node that is attached to the lNode.
10340 */
10341 native: RNode;
10342 /**
10343 * The instance of the Component node.
10344 */
10345 component: {} | null | undefined;
10346 /**
10347 * The list of active directives that exist on this element.
10348 */
10349 directives: any[] | null | undefined;
10350 /**
10351 * The map of local references (local reference name => element or directive instance) that
10352 * exist on this element.
10353 */
10354 localRefs: {
10355 [key: string]: any;
10356 } | null | undefined;
10357 /** Component's parent view data. */
10358 get lView(): LView | null;
10359 constructor(
10360 /**
10361 * ID of the component's parent view data.
10362 */
10363 lViewId: number,
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
10374/**
10375 * Used to enable lifecycle hooks on the root component.
10376 *
10377 * Include this feature when calling `renderComponent` if the root component
10378 * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't
10379 * be called properly.
10380 *
10381 * Example:
10382 *
10383 * ```
10384 * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});
10385 * ```
10386 */
10387export declare function ɵLifecycleHooksFeature(): void;
10388
10389/**
10390 * Index of each type of locale data from the locale data array
10391 */
10392export declare enum ɵLocaleDataIndex {
10393 LocaleId = 0,
10394 DayPeriodsFormat = 1,
10395 DayPeriodsStandalone = 2,
10396 DaysFormat = 3,
10397 DaysStandalone = 4,
10398 MonthsFormat = 5,
10399 MonthsStandalone = 6,
10400 Eras = 7,
10401 FirstDayOfWeek = 8,
10402 WeekendRange = 9,
10403 DateFormat = 10,
10404 TimeFormat = 11,
10405 DateTimeFormat = 12,
10406 NumberSymbols = 13,
10407 NumberFormats = 14,
10408 CurrencyCode = 15,
10409 CurrencySymbol = 16,
10410 CurrencyName = 17,
10411 Currencies = 18,
10412 Directionality = 19,
10413 PluralCase = 20,
10414 ExtraData = 21
10415}
10416
10417/**
10418 * @suppress {globalThis}
10419 */
10420export declare function ɵmakeDecorator<T>(name: string, props?: (...args: any[]) => any, parentClass?: any, additionalProcessing?: (type: Type<T>) => void, typeFn?: (type: Type<T>, ...args: any[]) => void): {
10421 new (...args: any[]): any;
10422 (...args: any[]): any;
10423 (...args: any[]): (cls: any) => any;
10424};
10425
10426
10427export declare const ɵNG_COMP_DEF: string;
10428
10429export declare const ɵNG_DIR_DEF: string;
10430
10431/**
10432 * If a directive is diPublic, bloomAdd sets a property on the type with this constant as
10433 * the key and the directive's unique ID as the value. This allows us to map directives to their
10434 * bloom filter bit for DI.
10435 */
10436export declare const ɵNG_ELEMENT_ID: string;
10437
10438export declare const ɵNG_INJ_DEF: string;
10439
10440export declare const ɵNG_MOD_DEF: string;
10441
10442export declare const ɵNG_PIPE_DEF: string;
10443
10444export declare const ɵNG_PROV_DEF: string;
10445
10446/**
10447 * Runtime link information for NgModules.
10448 *
10449 * This is the internal data structure used by the runtime to assemble components, directives,
10450 * pipes, and injectors.
10451 *
10452 * NOTE: Always use `ɵɵdefineNgModule` function to create this object,
10453 * never create the object directly since the shape of this object
10454 * can change between versions.
10455 */
10456export declare interface ɵNgModuleDef<T> {
10457 /** Token representing the module. Used by DI. */
10458 type: T;
10459 /** List of components to bootstrap. */
10460 bootstrap: Type<any>[] | (() => Type<any>[]);
10461 /** List of components, directives, and pipes declared by this module. */
10462 declarations: Type<any>[] | (() => Type<any>[]);
10463 /** List of modules or `ModuleWithProviders` imported by this module. */
10464 imports: Type<any>[] | (() => Type<any>[]);
10465 /**
10466 * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
10467 * module.
10468 */
10469 exports: Type<any>[] | (() => Type<any>[]);
10470 /**
10471 * Cached value of computed `transitiveCompileScopes` for this module.
10472 *
10473 * This should never be read directly, but accessed via `transitiveScopesFor`.
10474 */
10475 transitiveCompileScopes: ɵNgModuleTransitiveScopes | null;
10476 /** The set of schemas that declare elements to be allowed in the NgModule. */
10477 schemas: SchemaMetadata[] | null;
10478 /** Unique ID for the module with which it should be registered. */
10479 id: string | null;
10480}
10481
10482export declare class ɵNgModuleFactory<T> extends NgModuleFactory<T> {
10483 moduleType: Type<T>;
10484 constructor(moduleType: Type<T>);
10485 create(parentInjector: Injector | null): NgModuleRef<T>;
10486}
10487
10488/**
10489 * Represents the expansion of an `NgModule` into its scopes.
10490 *
10491 * A scope is a set of directives and pipes that are visible in a particular context. Each
10492 * `NgModule` has two scopes. The `compilation` scope is the set of directives and pipes that will
10493 * be recognized in the templates of components declared by the module. The `exported` scope is the
10494 * set of directives and pipes exported by a module (that is, module B's exported scope gets added
10495 * to module A's compilation scope when module A imports B).
10496 */
10497export declare interface ɵNgModuleTransitiveScopes {
10498 compilation: {
10499 directives: Set<any>;
10500 pipes: Set<any>;
10501 };
10502 exported: {
10503 directives: Set<any>;
10504 pipes: Set<any>;
10505 };
10506 schemas: SchemaMetadata[] | null;
10507}
10508
10509export declare interface ɵNgModuleType<T = any> extends Type<T> {
10510 ɵmod: ɵNgModuleDef<T>;
10511}
10512
10513
10514export declare interface ɵNO_CHANGE {
10515 __brand__: 'NO_CHANGE';
10516}
10517
10518/** A special value which designates that a value has not changed. */
10519export declare const ɵNO_CHANGE: ɵNO_CHANGE;
10520
10521/**
10522 * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls
10523 * to framework to perform rendering.
10524 */
10525export declare class ɵNoopNgZone implements NgZone {
10526 readonly hasPendingMicrotasks: boolean;
10527 readonly hasPendingMacrotasks: boolean;
10528 readonly isStable: boolean;
10529 readonly onUnstable: EventEmitter<any>;
10530 readonly onMicrotaskEmpty: EventEmitter<any>;
10531 readonly onStable: EventEmitter<any>;
10532 readonly onError: EventEmitter<any>;
10533 run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any): T;
10534 runGuarded<T>(fn: (...args: any[]) => any, applyThis?: any, applyArgs?: any): T;
10535 runOutsideAngular<T>(fn: (...args: any[]) => T): T;
10536 runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any, name?: string): T;
10537}
10538
10539
10540/**
10541 * Convince closure compiler that the wrapped function has no side-effects.
10542 *
10543 * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to
10544 * allow us to execute a function but have closure compiler mark the call as no-side-effects.
10545 * It is important that the return value for the `noSideEffects` function be assigned
10546 * to something which is retained otherwise the call to `noSideEffects` will be removed by closure
10547 * compiler.
10548 */
10549export declare function ɵnoSideEffects<T>(fn: () => T): T;
10550
10551
10552export declare const ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR: {};
10553
10554/**
10555 * Patch the definition of a component with directives and pipes from the compilation scope of
10556 * a given module.
10557 */
10558export declare function ɵpatchComponentDefWithScope<C>(componentDef: ɵComponentDef<C>, transitiveScopes: ɵNgModuleTransitiveScopes): void;
10559
10560/**
10561 * Runtime link information for Pipes.
10562 *
10563 * This is an internal data structure used by the renderer to link
10564 * pipes into templates.
10565 *
10566 * NOTE: Always use `definePipe` function to create this object,
10567 * never create the object directly since the shape of this object
10568 * can change between versions.
10569 *
10570 * See: {@link definePipe}
10571 */
10572export declare interface ɵPipeDef<T> {
10573 /** Token representing the pipe. */
10574 type: Type<T>;
10575 /**
10576 * Pipe name.
10577 *
10578 * Used to resolve pipe in templates.
10579 */
10580 readonly name: string;
10581 /**
10582 * Factory function used to create a new pipe instance. Will be null initially.
10583 * Populated when the factory is first requested by pipe instantiation logic.
10584 */
10585 factory: FactoryFn<T> | null;
10586 /**
10587 * Whether or not the pipe is pure.
10588 *
10589 * Pure pipes result only depends on the pipe input and not on internal
10590 * state of the pipe.
10591 */
10592 readonly pure: boolean;
10593 /**
10594 * Whether this pipe is standalone.
10595 */
10596 readonly standalone: boolean;
10597 onDestroy: (() => void) | null;
10598}
10599
10600/**
10601 * Profiler function which the runtime will invoke before and after user code.
10602 */
10603export declare interface ɵProfiler {
10604 (event: ɵProfilerEvent, instance: {} | null, hookOrListener?: (e?: any) => any): void;
10605}
10606
10607
10608/**
10609 * Profiler events is an enum used by the profiler to distinguish between different calls of user
10610 * code invoked throughout the application lifecycle.
10611 */
10612export declare const enum ɵProfilerEvent {
10613 /**
10614 * Corresponds to the point in time before the runtime has called the template function of a
10615 * component with `RenderFlags.Create`.
10616 */
10617 TemplateCreateStart = 0,
10618 /**
10619 * Corresponds to the point in time after the runtime has called the template function of a
10620 * component with `RenderFlags.Create`.
10621 */
10622 TemplateCreateEnd = 1,
10623 /**
10624 * Corresponds to the point in time before the runtime has called the template function of a
10625 * component with `RenderFlags.Update`.
10626 */
10627 TemplateUpdateStart = 2,
10628 /**
10629 * Corresponds to the point in time after the runtime has called the template function of a
10630 * component with `RenderFlags.Update`.
10631 */
10632 TemplateUpdateEnd = 3,
10633 /**
10634 * Corresponds to the point in time before the runtime has called a lifecycle hook of a component
10635 * or directive.
10636 */
10637 LifecycleHookStart = 4,
10638 /**
10639 * Corresponds to the point in time after the runtime has called a lifecycle hook of a component
10640 * or directive.
10641 */
10642 LifecycleHookEnd = 5,
10643 /**
10644 * Corresponds to the point in time before the runtime has evaluated an expression associated with
10645 * an event or an output.
10646 */
10647 OutputStart = 6,
10648 /**
10649 * Corresponds to the point in time after the runtime has evaluated an expression associated with
10650 * an event or an output.
10651 */
10652 OutputEnd = 7
10653}
10654
10655/**
10656 * Publishes a collection of default debug tools onto`window.ng`.
10657 *
10658 * These functions are available globally when Angular is in development
10659 * mode and are automatically stripped away from prod mode is on.
10660 */
10661export declare function ɵpublishDefaultGlobalUtils(): void;
10662
10663/**
10664 * Publishes the given function to `window.ng` so that it can be
10665 * used from the browser console when an application is not in production.
10666 */
10667export declare function ɵpublishGlobalUtil(name: string, fn: Function): void;
10668
10669export declare class ɵReflectionCapabilities implements PlatformReflectionCapabilities {
10670 private _reflect;
10671 constructor(reflect?: any);
10672 factory<T>(t: Type<T>): (args: any[]) => T;
10673 private _ownParameters;
10674 parameters(type: Type<any>): any[][];
10675 private _ownAnnotations;
10676 annotations(typeOrFunc: Type<any>): any[];
10677 private _ownPropMetadata;
10678 propMetadata(typeOrFunc: any): {
10679 [key: string]: any[];
10680 };
10681 ownPropMetadata(typeOrFunc: any): {
10682 [key: string]: any[];
10683 };
10684 hasLifecycleHook(type: any, lcProperty: string): boolean;
10685}
10686
10687/**
10688 * Register locale data to be used internally by Angular. See the
10689 * ["I18n guide"](guide/i18n-common-format-data-locale) to know how to import additional locale
10690 * data.
10691 *
10692 * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1
10693 */
10694export declare function ɵregisterLocaleData(data: any, localeId?: string | any, extraData?: any): void;
10695
10696/**
10697 * ComponentFactory interface implementation.
10698 */
10699export declare class ɵRender3ComponentFactory<T> extends ComponentFactory<T> {
10700 private componentDef;
10701 private ngModule?;
10702 selector: string;
10703 componentType: Type<any>;
10704 ngContentSelectors: string[];
10705 isBoundToModule: boolean;
10706 get inputs(): {
10707 propName: string;
10708 templateName: string;
10709 }[];
10710 get outputs(): {
10711 propName: string;
10712 templateName: string;
10713 }[];
10714 /**
10715 * @param componentDef The component definition.
10716 * @param ngModule The NgModuleRef to which the factory is bound.
10717 */
10718 constructor(componentDef: ɵComponentDef<any>, ngModule?: NgModuleRef<any> | undefined);
10719 create(injector: Injector, projectableNodes?: any[][] | undefined, rootSelectorOrNode?: any, environmentInjector?: NgModuleRef<any> | EnvironmentInjector | undefined): ComponentRef<T>;
10720}
10721
10722/**
10723 * Represents an instance of a Component created via a {@link ComponentFactory}.
10724 *
10725 * `ComponentRef` provides access to the Component Instance as well other objects related to this
10726 * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}
10727 * method.
10728 *
10729 */
10730export declare class ɵRender3ComponentRef<T> extends ComponentRef<T> {
10731 location: ElementRef;
10732 private _rootLView;
10733 private _tNode;
10734 instance: T;
10735 hostView: ɵViewRef<T>;
10736 changeDetectorRef: ChangeDetectorRef;
10737 componentType: Type<T>;
10738 constructor(componentType: Type<T>, instance: T, location: ElementRef, _rootLView: LView, _tNode: TElementNode | TContainerNode | TElementContainerNode);
10739 setInput(name: string, value: unknown): void;
10740 get injector(): Injector;
10741 destroy(): void;
10742 onDestroy(callback: () => void): void;
10743}
10744
10745export declare class ɵRender3NgModuleRef<T> extends NgModuleRef<T> implements InternalNgModuleRef<T> {
10746 _parent: Injector | null;
10747 _bootstrapComponents: Type<any>[];
10748 _r3Injector: R3Injector;
10749 instance: T;
10750 destroyCbs: (() => void)[] | null;
10751 readonly componentFactoryResolver: ComponentFactoryResolver_2;
10752 constructor(ngModuleType: Type<T>, _parent: Injector | null);
10753 get injector(): EnvironmentInjector;
10754 destroy(): void;
10755 onDestroy(callback: () => void): void;
10756}
10757
10758/**
10759 * Flags passed into template functions to determine which blocks (i.e. creation, update)
10760 * should be executed.
10761 *
10762 * Typically, a template runs both the creation block and the update block on initialization and
10763 * subsequent runs only execute the update block. However, dynamically created views require that
10764 * the creation block be executed separately from the update block (for backwards compat).
10765 */
10766export declare const enum ɵRenderFlags {
10767 Create = 1,
10768 Update = 2
10769}
10770
10771export declare function ɵresetCompiledComponents(): void;
10772
10773export declare function ɵresetJitOptions(): void;
10774
10775/**
10776 * Used to resolve resource URLs on `@Component` when used with JIT compilation.
10777 *
10778 * Example:
10779 * ```
10780 * @Component({
10781 * selector: 'my-comp',
10782 * templateUrl: 'my-comp.html', // This requires asynchronous resolution
10783 * })
10784 * class MyComponent{
10785 * }
10786 *
10787 * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process
10788 * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.
10789 *
10790 * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into
10791 * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.
10792 *
10793 * // Use browser's `fetch()` function as the default resource resolution strategy.
10794 * resolveComponentResources(fetch).then(() => {
10795 * // After resolution all URLs have been converted into `template` strings.
10796 * renderComponent(MyComponent);
10797 * });
10798 *
10799 * ```
10800 *
10801 * NOTE: In AOT the resolution happens during compilation, and so there should be no need
10802 * to call this method outside JIT mode.
10803 *
10804 * @param resourceResolver a function which is responsible for returning a `Promise` to the
10805 * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.
10806 */
10807export declare function ɵresolveComponentResources(resourceResolver: (url: string) => (Promise<string | {
10808 text(): Promise<string>;
10809}>)): Promise<void>;
10810
10811/**
10812 * Class that represents a runtime error.
10813 * Formats and outputs the error message in a consistent way.
10814 *
10815 * Example:
10816 * ```
10817 * throw new RuntimeError(
10818 * RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,
10819 * ngDevMode && 'Injector has already been destroyed.');
10820 * ```
10821 *
10822 * Note: the `message` argument contains a descriptive error message as a string in development
10823 * mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the
10824 * `message` argument becomes `false`, thus we account for it in the typings and the runtime logic.
10825 */
10826export declare class ɵRuntimeError<T extends number = RuntimeErrorCode> extends Error {
10827 code: T;
10828 constructor(code: T, message: null | false | string);
10829}
10830
10831/**
10832 * Marker interface for a value that's safe to use as HTML.
10833 *
10834 * @publicApi
10835 */
10836export declare interface ɵSafeHtml extends ɵSafeValue {
10837}
10838
10839/**
10840 * Marker interface for a value that's safe to use as a URL to load executable code from.
10841 *
10842 * @publicApi
10843 */
10844export declare interface ɵSafeResourceUrl extends ɵSafeValue {
10845}
10846
10847/**
10848 * Marker interface for a value that's safe to use as JavaScript.
10849 *
10850 * @publicApi
10851 */
10852export declare interface ɵSafeScript extends ɵSafeValue {
10853}
10854
10855/**
10856 * Marker interface for a value that's safe to use as style (CSS).
10857 *
10858 * @publicApi
10859 */
10860export declare interface ɵSafeStyle extends ɵSafeValue {
10861}
10862
10863/**
10864 * Marker interface for a value that's safe to use as a URL linking to a document.
10865 *
10866 * @publicApi
10867 */
10868export declare interface ɵSafeUrl extends ɵSafeValue {
10869}
10870
10871/**
10872 * Marker interface for a value that's safe to use in a particular context.
10873 *
10874 * @publicApi
10875 */
10876export declare interface ɵSafeValue {
10877}
10878
10879/**
10880 * Control whether the NgModule registration system enforces that each NgModule type registered has
10881 * a unique id.
10882 *
10883 * This is useful for testing as the NgModule registry cannot be properly reset between tests with
10884 * Angular's current API.
10885 */
10886export declare function ɵsetAllowDuplicateNgModuleIdsForTest(allowDuplicates: boolean): void;
10887
10888/**
10889 * Adds decorator, constructor, and property metadata to a given type via static metadata fields
10890 * on the type.
10891 *
10892 * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.
10893 *
10894 * Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments
10895 * being tree-shaken away during production builds.
10896 */
10897export declare function ɵsetClassMetadata(type: Type<any>, decorators: any[] | null, ctorParameters: (() => any[]) | null, propDecorators: {
10898 [field: string]: any;
10899} | null): void;
10900
10901export declare function ɵsetCurrentInjector(injector: Injector | null | undefined): Injector | undefined | null;
10902
10903
10904/**
10905 * Tell ivy what the `document` is for this platform.
10906 *
10907 * It is only necessary to call this if the current platform is not a browser.
10908 *
10909 * @param document The object representing the global `document` in this environment.
10910 */
10911export declare function ɵsetDocument(document: Document | undefined): void;
10912
10913
10914/**
10915 * Sets the locale id that will be used for translations and ICU expressions.
10916 * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
10917 * but is now defined as a global value.
10918 *
10919 * @param localeId
10920 */
10921export declare function ɵsetLocaleId(localeId: string): void;
10922
10923/**
10924 * Sets a strict mode for JIT-compiled components to throw an error on unknown elements,
10925 * instead of just logging the error.
10926 * (for AOT-compiled ones this check happens at build time).
10927 */
10928export declare function ɵsetUnknownElementStrictMode(shouldThrow: boolean): void;
10929
10930/**
10931 * Sets a strict mode for JIT-compiled components to throw an error on unknown properties,
10932 * instead of just logging the error.
10933 * (for AOT-compiled ones this check happens at build time).
10934 */
10935export declare function ɵsetUnknownPropertyStrictMode(shouldThrow: boolean): void;
10936
10937/** Store a value in the `data` at a given `index`. */
10938export declare function ɵstore<T>(tView: TView, lView: LView, index: number, value: T): void;
10939
10940
10941export declare function ɵstringify(token: any): string;
10942
10943/**
10944 * Internal injection token that can used to access an instance of a Testability class.
10945 *
10946 * This token acts as a bridge between the core bootstrap code and the `Testability` class. This is
10947 * needed to ensure that there are no direct references to the `Testability` class, so it can be
10948 * tree-shaken away (if not referenced). For the environments/setups when the `Testability` class
10949 * should be available, this token is used to add a provider that references the `Testability`
10950 * class. Otherwise, only this token is retained in a bundle, but the `Testability` class is not.
10951 */
10952export declare const ɵTESTABILITY: InjectionToken<Testability>;
10953
10954/**
10955 * Internal injection token to retrieve Testability getter class instance.
10956 */
10957export declare const ɵTESTABILITY_GETTER: InjectionToken<GetTestability>;
10958
10959/**
10960 * Compute the pair of transitive scopes (compilation scope and exported scope) for a given type
10961 * (either a NgModule or a standalone component / directive / pipe).
10962 */
10963export declare function ɵtransitiveScopesFor<T>(type: Type<T>): ɵNgModuleTransitiveScopes;
10964
10965/**
10966 * Helper function to remove all the locale data from `LOCALE_DATA`.
10967 */
10968export declare function ɵunregisterLocaleData(): void;
10969
10970export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
10971
10972export declare function ɵunwrapSafeValue<T>(value: T): T;
10973
10974export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, InternalViewRef, viewEngine_ChangeDetectorRef_interface {
10975 /**
10976 * This represents the `LView` associated with the point where `ChangeDetectorRef` was
10977 * requested.
10978 *
10979 * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
10980 */
10981 private _cdRefInjectingView?;
10982 private _appRef;
10983 private _attachedToViewContainer;
10984 get rootNodes(): any[];
10985 constructor(
10986 /**
10987 * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.
10988 *
10989 * When ViewRef is created for a dynamic component, this also represents the `LView` for the
10990 * component.
10991 *
10992 * For a "regular" ViewRef created for an embedded view, this is the `LView` for the embedded
10993 * view.
10994 *
10995 * @internal
10996 */
10997 _lView: LView,
10998 /**
10999 * This represents the `LView` associated with the point where `ChangeDetectorRef` was
11000 * requested.
11001 *
11002 * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.
11003 */
11004 _cdRefInjectingView?: LView<unknown> | undefined);
11005 get context(): T;
11006 set context(value: T);
11007 get destroyed(): boolean;
11008 destroy(): void;
11009 onDestroy(callback: Function): void;
11010 /**
11011 * Marks a view and all of its ancestors dirty.
11012 *
11013 * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is
11014 * checked when it needs to be re-rendered but the two normal triggers haven't marked it
11015 * dirty (i.e. inputs haven't changed and events haven't fired in the view).
11016 *
11017 * <!-- TODO: Add a link to a chapter on OnPush components -->
11018 *
11019 * @usageNotes
11020 * ### Example
11021 *
11022 * ```typescript
11023 * @Component({
11024 * selector: 'app-root',
11025 * template: `Number of ticks: {{numberOfTicks}}`
11026 * changeDetection: ChangeDetectionStrategy.OnPush,
11027 * })
11028 * class AppComponent {
11029 * numberOfTicks = 0;
11030 *
11031 * constructor(private ref: ChangeDetectorRef) {
11032 * setInterval(() => {
11033 * this.numberOfTicks++;
11034 * // the following is required, otherwise the view will not be updated
11035 * this.ref.markForCheck();
11036 * }, 1000);
11037 * }
11038 * }
11039 * ```
11040 */
11041 markForCheck(): void;
11042 /**
11043 * Detaches the view from the change detection tree.
11044 *
11045 * Detached views will not be checked during change detection runs until they are
11046 * re-attached, even if they are dirty. `detach` can be used in combination with
11047 * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change
11048 * detection checks.
11049 *
11050 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
11051 * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
11052 *
11053 * @usageNotes
11054 * ### Example
11055 *
11056 * The following example defines a component with a large list of readonly data.
11057 * Imagine the data changes constantly, many times per second. For performance reasons,
11058 * we want to check and update the list every five seconds. We can do that by detaching
11059 * the component's change detector and doing a local check every five seconds.
11060 *
11061 * ```typescript
11062 * class DataProvider {
11063 * // in a real application the returned data will be different every time
11064 * get data() {
11065 * return [1,2,3,4,5];
11066 * }
11067 * }
11068 *
11069 * @Component({
11070 * selector: 'giant-list',
11071 * template: `
11072 * <li *ngFor="let d of dataProvider.data">Data {{d}}</li>
11073 * `,
11074 * })
11075 * class GiantList {
11076 * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {
11077 * ref.detach();
11078 * setInterval(() => {
11079 * this.ref.detectChanges();
11080 * }, 5000);
11081 * }
11082 * }
11083 *
11084 * @Component({
11085 * selector: 'app',
11086 * providers: [DataProvider],
11087 * template: `
11088 * <giant-list><giant-list>
11089 * `,
11090 * })
11091 * class App {
11092 * }
11093 * ```
11094 */
11095 detach(): void;
11096 /**
11097 * Re-attaches a view to the change detection tree.
11098 *
11099 * This can be used to re-attach views that were previously detached from the tree
11100 * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.
11101 *
11102 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
11103 *
11104 * @usageNotes
11105 * ### Example
11106 *
11107 * The following example creates a component displaying `live` data. The component will detach
11108 * its change detector from the main change detector tree when the component's live property
11109 * is set to false.
11110 *
11111 * ```typescript
11112 * class DataProvider {
11113 * data = 1;
11114 *
11115 * constructor() {
11116 * setInterval(() => {
11117 * this.data = this.data * 2;
11118 * }, 500);
11119 * }
11120 * }
11121 *
11122 * @Component({
11123 * selector: 'live-data',
11124 * inputs: ['live'],
11125 * template: 'Data: {{dataProvider.data}}'
11126 * })
11127 * class LiveData {
11128 * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
11129 *
11130 * set live(value) {
11131 * if (value) {
11132 * this.ref.reattach();
11133 * } else {
11134 * this.ref.detach();
11135 * }
11136 * }
11137 * }
11138 *
11139 * @Component({
11140 * selector: 'app-root',
11141 * providers: [DataProvider],
11142 * template: `
11143 * Live Update: <input type="checkbox" [(ngModel)]="live">
11144 * <live-data [live]="live"><live-data>
11145 * `,
11146 * })
11147 * class AppComponent {
11148 * live = true;
11149 * }
11150 * ```
11151 */
11152 reattach(): void;
11153 /**
11154 * Checks the view and its children.
11155 *
11156 * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement
11157 * local change detection checks.
11158 *
11159 * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
11160 * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
11161 *
11162 * @usageNotes
11163 * ### Example
11164 *
11165 * The following example defines a component with a large list of readonly data.
11166 * Imagine, the data changes constantly, many times per second. For performance reasons,
11167 * we want to check and update the list every five seconds.
11168 *
11169 * We can do that by detaching the component's change detector and doing a local change detection
11170 * check every five seconds.
11171 *
11172 * See {@link ChangeDetectorRef#detach detach} for more information.
11173 */
11174 detectChanges(): void;
11175 /**
11176 * Checks the change detector and its children, and throws if any changes are detected.
11177 *
11178 * This is used in development mode to verify that running change detection doesn't
11179 * introduce other changes.
11180 */
11181 checkNoChanges(): void;
11182 attachToViewContainerRef(): void;
11183 detachFromAppRef(): void;
11184 attachToAppRef(appRef: ViewRefTracker): void;
11185}
11186
11187/**
11188 * URL for the XSS security documentation.
11189 */
11190export declare const ɵXSS_SECURITY_URL = "https://g.co/ng/security#xss";
11191
11192/**
11193 * Advances to an element for later binding instructions.
11194 *
11195 * Used in conjunction with instructions like {@link property} to act on elements with specified
11196 * indices, for example those created with {@link element} or {@link elementStart}.
11197 *
11198 * ```ts
11199 * (rf: RenderFlags, ctx: any) => {
11200 * if (rf & 1) {
11201 * text(0, 'Hello');
11202 * text(1, 'Goodbye')
11203 * element(2, 'div');
11204 * }
11205 * if (rf & 2) {
11206 * advance(2); // Advance twice to the <div>.
11207 * property('title', 'test');
11208 * }
11209 * }
11210 * ```
11211 * @param delta Number of elements to advance forwards by.
11212 *
11213 * @codeGenApi
11214 */
11215export declare function ɵɵadvance(delta: number): void;
11216
11217/**
11218 * Updates the value of or removes a bound attribute on an Element.
11219 *
11220 * Used in the case of `[attr.title]="value"`
11221 *
11222 * @param name name The name of the attribute.
11223 * @param value value The attribute is removed when value is `null` or `undefined`.
11224 * Otherwise the attribute value is set to the stringified value.
11225 * @param sanitizer An optional function used to sanitize the value.
11226 * @param namespace Optional namespace to use when setting the attribute.
11227 *
11228 * @codeGenApi
11229 */
11230export declare function ɵɵattribute(name: string, value: any, sanitizer?: SanitizerFn | null, namespace?: string): typeof ɵɵattribute;
11231
11232/**
11233 *
11234 * Update an interpolated attribute on an element with single bound value surrounded by text.
11235 *
11236 * Used when the value passed to a property has 1 interpolated value in it:
11237 *
11238 * ```html
11239 * <div attr.title="prefix{{v0}}suffix"></div>
11240 * ```
11241 *
11242 * Its compiled representation is::
11243 *
11244 * ```ts
11245 * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');
11246 * ```
11247 *
11248 * @param attrName The name of the attribute to update
11249 * @param prefix Static value used for concatenation only.
11250 * @param v0 Value checked for change.
11251 * @param suffix Static value used for concatenation only.
11252 * @param sanitizer An optional sanitizer function
11253 * @returns itself, so that it may be chained.
11254 * @codeGenApi
11255 */
11256export declare function ɵɵattributeInterpolate1(attrName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate1;
11257
11258/**
11259 *
11260 * Update an interpolated attribute on an element with 2 bound values surrounded by text.
11261 *
11262 * Used when the value passed to a property has 2 interpolated values in it:
11263 *
11264 * ```html
11265 * <div attr.title="prefix{{v0}}-{{v1}}suffix"></div>
11266 * ```
11267 *
11268 * Its compiled representation is::
11269 *
11270 * ```ts
11271 * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
11272 * ```
11273 *
11274 * @param attrName The name of the attribute to update
11275 * @param prefix Static value used for concatenation only.
11276 * @param v0 Value checked for change.
11277 * @param i0 Static value used for concatenation only.
11278 * @param v1 Value checked for change.
11279 * @param suffix Static value used for concatenation only.
11280 * @param sanitizer An optional sanitizer function
11281 * @returns itself, so that it may be chained.
11282 * @codeGenApi
11283 */
11284export declare function ɵɵattributeInterpolate2(attrName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolate2;
11285
11286/**
11287 *
11288 * Update an interpolated attribute on an element with 3 bound values surrounded by text.
11289 *
11290 * Used when the value passed to a property has 3 interpolated values in it:
11291 *
11292 * ```html
11293 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
11294 * ```
11295 *
11296 * Its compiled representation is::
11297 *
11298 * ```ts
11299 * ɵɵattributeInterpolate3(
11300 * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
11301 * ```
11302 *
11303 * @param attrName The name of the attribute to update
11304 * @param prefix Static value used for concatenation only.
11305 * @param v0 Value checked for change.
11306 * @param i0 Static value used for concatenation only.
11307 * @param v1 Value checked for change.
11308 * @param i1 Static value used for concatenation only.
11309 * @param v2 Value checked for change.
11310 * @param suffix Static value used for concatenation only.
11311 * @param sanitizer An optional sanitizer function
11312 * @returns itself, so that it may be chained.
11313 * @codeGenApi
11314 */
11315export 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;
11316
11317/**
11318 *
11319 * Update an interpolated attribute on an element with 4 bound values surrounded by text.
11320 *
11321 * Used when the value passed to a property has 4 interpolated values in it:
11322 *
11323 * ```html
11324 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
11325 * ```
11326 *
11327 * Its compiled representation is::
11328 *
11329 * ```ts
11330 * ɵɵattributeInterpolate4(
11331 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
11332 * ```
11333 *
11334 * @param attrName The name of the attribute to update
11335 * @param prefix Static value used for concatenation only.
11336 * @param v0 Value checked for change.
11337 * @param i0 Static value used for concatenation only.
11338 * @param v1 Value checked for change.
11339 * @param i1 Static value used for concatenation only.
11340 * @param v2 Value checked for change.
11341 * @param i2 Static value used for concatenation only.
11342 * @param v3 Value checked for change.
11343 * @param suffix Static value used for concatenation only.
11344 * @param sanitizer An optional sanitizer function
11345 * @returns itself, so that it may be chained.
11346 * @codeGenApi
11347 */
11348export 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;
11349
11350/**
11351 *
11352 * Update an interpolated attribute on an element with 5 bound values surrounded by text.
11353 *
11354 * Used when the value passed to a property has 5 interpolated values in it:
11355 *
11356 * ```html
11357 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
11358 * ```
11359 *
11360 * Its compiled representation is::
11361 *
11362 * ```ts
11363 * ɵɵattributeInterpolate5(
11364 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
11365 * ```
11366 *
11367 * @param attrName The name of the attribute to update
11368 * @param prefix Static value used for concatenation only.
11369 * @param v0 Value checked for change.
11370 * @param i0 Static value used for concatenation only.
11371 * @param v1 Value checked for change.
11372 * @param i1 Static value used for concatenation only.
11373 * @param v2 Value checked for change.
11374 * @param i2 Static value used for concatenation only.
11375 * @param v3 Value checked for change.
11376 * @param i3 Static value used for concatenation only.
11377 * @param v4 Value checked for change.
11378 * @param suffix Static value used for concatenation only.
11379 * @param sanitizer An optional sanitizer function
11380 * @returns itself, so that it may be chained.
11381 * @codeGenApi
11382 */
11383export 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;
11384
11385/**
11386 *
11387 * Update an interpolated attribute on an element with 6 bound values surrounded by text.
11388 *
11389 * Used when the value passed to a property has 6 interpolated values in it:
11390 *
11391 * ```html
11392 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
11393 * ```
11394 *
11395 * Its compiled representation is::
11396 *
11397 * ```ts
11398 * ɵɵattributeInterpolate6(
11399 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
11400 * ```
11401 *
11402 * @param attrName The name of the attribute to update
11403 * @param prefix Static value used for concatenation only.
11404 * @param v0 Value checked for change.
11405 * @param i0 Static value used for concatenation only.
11406 * @param v1 Value checked for change.
11407 * @param i1 Static value used for concatenation only.
11408 * @param v2 Value checked for change.
11409 * @param i2 Static value used for concatenation only.
11410 * @param v3 Value checked for change.
11411 * @param i3 Static value used for concatenation only.
11412 * @param v4 Value checked for change.
11413 * @param i4 Static value used for concatenation only.
11414 * @param v5 Value checked for change.
11415 * @param suffix Static value used for concatenation only.
11416 * @param sanitizer An optional sanitizer function
11417 * @returns itself, so that it may be chained.
11418 * @codeGenApi
11419 */
11420export 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;
11421
11422/**
11423 *
11424 * Update an interpolated attribute on an element with 7 bound values surrounded by text.
11425 *
11426 * Used when the value passed to a property has 7 interpolated values in it:
11427 *
11428 * ```html
11429 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
11430 * ```
11431 *
11432 * Its compiled representation is::
11433 *
11434 * ```ts
11435 * ɵɵattributeInterpolate7(
11436 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
11437 * ```
11438 *
11439 * @param attrName The name of the attribute to update
11440 * @param prefix Static value used for concatenation only.
11441 * @param v0 Value checked for change.
11442 * @param i0 Static value used for concatenation only.
11443 * @param v1 Value checked for change.
11444 * @param i1 Static value used for concatenation only.
11445 * @param v2 Value checked for change.
11446 * @param i2 Static value used for concatenation only.
11447 * @param v3 Value checked for change.
11448 * @param i3 Static value used for concatenation only.
11449 * @param v4 Value checked for change.
11450 * @param i4 Static value used for concatenation only.
11451 * @param v5 Value checked for change.
11452 * @param i5 Static value used for concatenation only.
11453 * @param v6 Value checked for change.
11454 * @param suffix Static value used for concatenation only.
11455 * @param sanitizer An optional sanitizer function
11456 * @returns itself, so that it may be chained.
11457 * @codeGenApi
11458 */
11459export 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;
11460
11461/**
11462 *
11463 * Update an interpolated attribute on an element with 8 bound values surrounded by text.
11464 *
11465 * Used when the value passed to a property has 8 interpolated values in it:
11466 *
11467 * ```html
11468 * <div attr.title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
11469 * ```
11470 *
11471 * Its compiled representation is::
11472 *
11473 * ```ts
11474 * ɵɵattributeInterpolate8(
11475 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
11476 * ```
11477 *
11478 * @param attrName The name of the attribute to update
11479 * @param prefix Static value used for concatenation only.
11480 * @param v0 Value checked for change.
11481 * @param i0 Static value used for concatenation only.
11482 * @param v1 Value checked for change.
11483 * @param i1 Static value used for concatenation only.
11484 * @param v2 Value checked for change.
11485 * @param i2 Static value used for concatenation only.
11486 * @param v3 Value checked for change.
11487 * @param i3 Static value used for concatenation only.
11488 * @param v4 Value checked for change.
11489 * @param i4 Static value used for concatenation only.
11490 * @param v5 Value checked for change.
11491 * @param i5 Static value used for concatenation only.
11492 * @param v6 Value checked for change.
11493 * @param i6 Static value used for concatenation only.
11494 * @param v7 Value checked for change.
11495 * @param suffix Static value used for concatenation only.
11496 * @param sanitizer An optional sanitizer function
11497 * @returns itself, so that it may be chained.
11498 * @codeGenApi
11499 */
11500export 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;
11501
11502/**
11503 * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.
11504 *
11505 * Used when the number of interpolated values exceeds 8.
11506 *
11507 * ```html
11508 * <div
11509 * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
11510 * ```
11511 *
11512 * Its compiled representation is::
11513 *
11514 * ```ts
11515 * ɵɵattributeInterpolateV(
11516 * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
11517 * 'suffix']);
11518 * ```
11519 *
11520 * @param attrName The name of the attribute to update.
11521 * @param values The collection of values and the strings in-between those values, beginning with
11522 * a string prefix and ending with a string suffix.
11523 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
11524 * @param sanitizer An optional sanitizer function
11525 * @returns itself, so that it may be chained.
11526 * @codeGenApi
11527 */
11528export declare function ɵɵattributeInterpolateV(attrName: string, values: any[], sanitizer?: SanitizerFn, namespace?: string): typeof ɵɵattributeInterpolateV;
11529
11530/**
11531 * Update class bindings using an object literal or class-string on an element.
11532 *
11533 * This instruction is meant to apply styling via the `[class]="exp"` template bindings.
11534 * When classes are applied to the element they will then be updated with
11535 * respect to any styles/classes set via `classProp`. If any
11536 * classes are set to falsy then they will be removed from the element.
11537 *
11538 * Note that the styling instruction will not be applied until `stylingApply` is called.
11539 * Note that this will the provided classMap value to the host element if this function is called
11540 * within a host binding.
11541 *
11542 * @param classes A key/value map or string of CSS classes that will be added to the
11543 * given element. Any missing classes (that have already been applied to the element
11544 * beforehand) will be removed (unset) from the element's list of CSS classes.
11545 *
11546 * @codeGenApi
11547 */
11548export declare function ɵɵclassMap(classes: {
11549 [className: string]: boolean | undefined | null;
11550} | string | undefined | null): void;
11551
11552
11553/**
11554 *
11555 * Update an interpolated class on an element with single bound value surrounded by text.
11556 *
11557 * Used when the value passed to a property has 1 interpolated value in it:
11558 *
11559 * ```html
11560 * <div class="prefix{{v0}}suffix"></div>
11561 * ```
11562 *
11563 * Its compiled representation is:
11564 *
11565 * ```ts
11566 * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');
11567 * ```
11568 *
11569 * @param prefix Static value used for concatenation only.
11570 * @param v0 Value checked for change.
11571 * @param suffix Static value used for concatenation only.
11572 * @codeGenApi
11573 */
11574export declare function ɵɵclassMapInterpolate1(prefix: string, v0: any, suffix: string): void;
11575
11576/**
11577 *
11578 * Update an interpolated class on an element with 2 bound values surrounded by text.
11579 *
11580 * Used when the value passed to a property has 2 interpolated values in it:
11581 *
11582 * ```html
11583 * <div class="prefix{{v0}}-{{v1}}suffix"></div>
11584 * ```
11585 *
11586 * Its compiled representation is:
11587 *
11588 * ```ts
11589 * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');
11590 * ```
11591 *
11592 * @param prefix Static value used for concatenation only.
11593 * @param v0 Value checked for change.
11594 * @param i0 Static value used for concatenation only.
11595 * @param v1 Value checked for change.
11596 * @param suffix Static value used for concatenation only.
11597 * @codeGenApi
11598 */
11599export declare function ɵɵclassMapInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): void;
11600
11601/**
11602 *
11603 * Update an interpolated class on an element with 3 bound values surrounded by text.
11604 *
11605 * Used when the value passed to a property has 3 interpolated values in it:
11606 *
11607 * ```html
11608 * <div class="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
11609 * ```
11610 *
11611 * Its compiled representation is:
11612 *
11613 * ```ts
11614 * ɵɵclassMapInterpolate3(
11615 * 'prefix', v0, '-', v1, '-', v2, 'suffix');
11616 * ```
11617 *
11618 * @param prefix Static value used for concatenation only.
11619 * @param v0 Value checked for change.
11620 * @param i0 Static value used for concatenation only.
11621 * @param v1 Value checked for change.
11622 * @param i1 Static value used for concatenation only.
11623 * @param v2 Value checked for change.
11624 * @param suffix Static value used for concatenation only.
11625 * @codeGenApi
11626 */
11627export declare function ɵɵclassMapInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void;
11628
11629/**
11630 *
11631 * Update an interpolated class on an element with 4 bound values surrounded by text.
11632 *
11633 * Used when the value passed to a property has 4 interpolated values in it:
11634 *
11635 * ```html
11636 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
11637 * ```
11638 *
11639 * Its compiled representation is:
11640 *
11641 * ```ts
11642 * ɵɵclassMapInterpolate4(
11643 * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
11644 * ```
11645 *
11646 * @param prefix Static value used for concatenation only.
11647 * @param v0 Value checked for change.
11648 * @param i0 Static value used for concatenation only.
11649 * @param v1 Value checked for change.
11650 * @param i1 Static value used for concatenation only.
11651 * @param v2 Value checked for change.
11652 * @param i2 Static value used for concatenation only.
11653 * @param v3 Value checked for change.
11654 * @param suffix Static value used for concatenation only.
11655 * @codeGenApi
11656 */
11657export declare function ɵɵclassMapInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): void;
11658
11659/**
11660 *
11661 * Update an interpolated class on an element with 5 bound values surrounded by text.
11662 *
11663 * Used when the value passed to a property has 5 interpolated values in it:
11664 *
11665 * ```html
11666 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
11667 * ```
11668 *
11669 * Its compiled representation is:
11670 *
11671 * ```ts
11672 * ɵɵclassMapInterpolate5(
11673 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
11674 * ```
11675 *
11676 * @param prefix Static value used for concatenation only.
11677 * @param v0 Value checked for change.
11678 * @param i0 Static value used for concatenation only.
11679 * @param v1 Value checked for change.
11680 * @param i1 Static value used for concatenation only.
11681 * @param v2 Value checked for change.
11682 * @param i2 Static value used for concatenation only.
11683 * @param v3 Value checked for change.
11684 * @param i3 Static value used for concatenation only.
11685 * @param v4 Value checked for change.
11686 * @param suffix Static value used for concatenation only.
11687 * @codeGenApi
11688 */
11689export 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;
11690
11691/**
11692 *
11693 * Update an interpolated class on an element with 6 bound values surrounded by text.
11694 *
11695 * Used when the value passed to a property has 6 interpolated values in it:
11696 *
11697 * ```html
11698 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
11699 * ```
11700 *
11701 * Its compiled representation is:
11702 *
11703 * ```ts
11704 * ɵɵclassMapInterpolate6(
11705 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
11706 * ```
11707 *
11708 * @param prefix Static value used for concatenation only.
11709 * @param v0 Value checked for change.
11710 * @param i0 Static value used for concatenation only.
11711 * @param v1 Value checked for change.
11712 * @param i1 Static value used for concatenation only.
11713 * @param v2 Value checked for change.
11714 * @param i2 Static value used for concatenation only.
11715 * @param v3 Value checked for change.
11716 * @param i3 Static value used for concatenation only.
11717 * @param v4 Value checked for change.
11718 * @param i4 Static value used for concatenation only.
11719 * @param v5 Value checked for change.
11720 * @param suffix Static value used for concatenation only.
11721 * @codeGenApi
11722 */
11723export 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;
11724
11725/**
11726 *
11727 * Update an interpolated class on an element with 7 bound values surrounded by text.
11728 *
11729 * Used when the value passed to a property has 7 interpolated values in it:
11730 *
11731 * ```html
11732 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
11733 * ```
11734 *
11735 * Its compiled representation is:
11736 *
11737 * ```ts
11738 * ɵɵclassMapInterpolate7(
11739 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
11740 * ```
11741 *
11742 * @param prefix Static value used for concatenation only.
11743 * @param v0 Value checked for change.
11744 * @param i0 Static value used for concatenation only.
11745 * @param v1 Value checked for change.
11746 * @param i1 Static value used for concatenation only.
11747 * @param v2 Value checked for change.
11748 * @param i2 Static value used for concatenation only.
11749 * @param v3 Value checked for change.
11750 * @param i3 Static value used for concatenation only.
11751 * @param v4 Value checked for change.
11752 * @param i4 Static value used for concatenation only.
11753 * @param v5 Value checked for change.
11754 * @param i5 Static value used for concatenation only.
11755 * @param v6 Value checked for change.
11756 * @param suffix Static value used for concatenation only.
11757 * @codeGenApi
11758 */
11759export 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;
11760
11761/**
11762 *
11763 * Update an interpolated class on an element with 8 bound values surrounded by text.
11764 *
11765 * Used when the value passed to a property has 8 interpolated values in it:
11766 *
11767 * ```html
11768 * <div class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
11769 * ```
11770 *
11771 * Its compiled representation is:
11772 *
11773 * ```ts
11774 * ɵɵclassMapInterpolate8(
11775 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
11776 * ```
11777 *
11778 * @param prefix Static value used for concatenation only.
11779 * @param v0 Value checked for change.
11780 * @param i0 Static value used for concatenation only.
11781 * @param v1 Value checked for change.
11782 * @param i1 Static value used for concatenation only.
11783 * @param v2 Value checked for change.
11784 * @param i2 Static value used for concatenation only.
11785 * @param v3 Value checked for change.
11786 * @param i3 Static value used for concatenation only.
11787 * @param v4 Value checked for change.
11788 * @param i4 Static value used for concatenation only.
11789 * @param v5 Value checked for change.
11790 * @param i5 Static value used for concatenation only.
11791 * @param v6 Value checked for change.
11792 * @param i6 Static value used for concatenation only.
11793 * @param v7 Value checked for change.
11794 * @param suffix Static value used for concatenation only.
11795 * @codeGenApi
11796 */
11797export 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;
11798
11799/**
11800 * Update an interpolated class on an element with 9 or more bound values surrounded by text.
11801 *
11802 * Used when the number of interpolated values exceeds 8.
11803 *
11804 * ```html
11805 * <div
11806 * class="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
11807 * ```
11808 *
11809 * Its compiled representation is:
11810 *
11811 * ```ts
11812 * ɵɵclassMapInterpolateV(
11813 * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
11814 * 'suffix']);
11815 * ```
11816 *.
11817 * @param values The collection of values and the strings in-between those values, beginning with
11818 * a string prefix and ending with a string suffix.
11819 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
11820 * @codeGenApi
11821 */
11822export declare function ɵɵclassMapInterpolateV(values: any[]): void;
11823
11824/**
11825 * Update a class binding on an element with the provided value.
11826 *
11827 * This instruction is meant to handle the `[class.foo]="exp"` case and,
11828 * therefore, the class binding itself must already be allocated using
11829 * `styling` within the creation block.
11830 *
11831 * @param prop A valid CSS class (only one).
11832 * @param value A true/false value which will turn the class on or off.
11833 *
11834 * Note that this will apply the provided class value to the host element if this function
11835 * is called within a host binding function.
11836 *
11837 * @codeGenApi
11838 */
11839export declare function ɵɵclassProp(className: string, value: boolean | undefined | null): typeof ɵɵclassProp;
11840
11841/**
11842 * @publicApi
11843 */
11844export declare type ɵɵComponentDeclaration<T, Selector extends String, ExportAs extends string[], InputMap extends {
11845 [key: string]: string;
11846}, OutputMap extends {
11847 [key: string]: string;
11848}, QueryFields extends string[], NgContentSelectors extends string[], IsStandalone extends boolean = false, HostDirectives = never> = unknown;
11849
11850/**
11851 * Registers a QueryList, associated with a content query, for later refresh (part of a view
11852 * refresh).
11853 *
11854 * @param directiveIndex Current directive index
11855 * @param predicate The type for which the query will search
11856 * @param flags Flags associated with the query
11857 * @param read What to save in the query
11858 * @returns QueryList<T>
11859 *
11860 * @codeGenApi
11861 */
11862export declare function ɵɵcontentQuery<T>(directiveIndex: number, predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): void;
11863
11864/**
11865 * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a
11866 * definition.
11867 *
11868 * This exists primarily to support ngcc migration of an existing View Engine pattern, where an
11869 * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it
11870 * generates a skeleton definition on the child class, and applies this feature.
11871 *
11872 * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,
11873 * including things like the component template function.
11874 *
11875 * @param definition The definition of a child class which inherits from a parent class with its
11876 * own definition.
11877 *
11878 * @codeGenApi
11879 */
11880export declare function ɵɵCopyDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
11881
11882/**
11883 * Create a component definition object.
11884 *
11885 *
11886 * # Example
11887 * ```
11888 * class MyDirective {
11889 * // Generated by Angular Template Compiler
11890 * // [Symbol] syntax will not be supported by TypeScript until v2.7
11891 * static ɵcmp = defineComponent({
11892 * ...
11893 * });
11894 * }
11895 * ```
11896 * @codeGenApi
11897 */
11898export declare function ɵɵdefineComponent<T>(componentDefinition: {
11899 /**
11900 * Directive type, needed to configure the injector.
11901 */
11902 type: Type<T>;
11903 /** The selectors that will be used to match nodes to this component. */
11904 selectors?: ɵCssSelectorList;
11905 /**
11906 * The number of nodes, local refs, and pipes in this component template.
11907 *
11908 * Used to calculate the length of this component's LView array, so we
11909 * can pre-fill the array and set the binding start index.
11910 */
11911 decls: number;
11912 /**
11913 * The number of bindings in this component template (including pure fn bindings).
11914 *
11915 * Used to calculate the length of this component's LView array, so we
11916 * can pre-fill the array and set the host binding start index.
11917 */
11918 vars: number;
11919 /**
11920 * A map of input names.
11921 *
11922 * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
11923 *
11924 * Given:
11925 * ```
11926 * class MyComponent {
11927 * @Input()
11928 * publicInput1: string;
11929 *
11930 * @Input('publicInput2')
11931 * declaredInput2: string;
11932 * }
11933 * ```
11934 *
11935 * is described as:
11936 * ```
11937 * {
11938 * publicInput1: 'publicInput1',
11939 * declaredInput2: ['publicInput2', 'declaredInput2'],
11940 * }
11941 * ```
11942 *
11943 * Which the minifier may translate to:
11944 * ```
11945 * {
11946 * minifiedPublicInput1: 'publicInput1',
11947 * minifiedDeclaredInput2: ['publicInput2', 'declaredInput2'],
11948 * }
11949 * ```
11950 *
11951 * This allows the render to re-construct the minified, public, and declared names
11952 * of properties.
11953 *
11954 * NOTE:
11955 * - Because declared and public name are usually same we only generate the array
11956 * `['public', 'declared']` format when they differ.
11957 * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
11958 * inconsistent behavior in that it uses declared names rather than minified or public. For
11959 * this reason `NgOnChanges` will be deprecated and removed in future version and this
11960 * API will be simplified to be consistent with `output`.
11961 */
11962 inputs?: {
11963 [P in keyof T]?: string | [string, string];
11964 };
11965 /**
11966 * A map of output names.
11967 *
11968 * The format is in: `{[actualPropertyName: string]:string}`.
11969 *
11970 * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
11971 *
11972 * This allows the render to re-construct the minified and non-minified names
11973 * of properties.
11974 */
11975 outputs?: {
11976 [P in keyof T]?: string;
11977 };
11978 /**
11979 * Function executed by the parent template to allow child directive to apply host bindings.
11980 */
11981 hostBindings?: HostBindingsFunction<T>;
11982 /**
11983 * The number of bindings in this directive `hostBindings` (including pure fn bindings).
11984 *
11985 * Used to calculate the length of the component's LView array, so we
11986 * can pre-fill the array and set the host binding start index.
11987 */
11988 hostVars?: number;
11989 /**
11990 * Assign static attribute values to a host element.
11991 *
11992 * This property will assign static attribute values as well as class and style
11993 * values to a host element. Since attribute values can consist of different types of values, the
11994 * `hostAttrs` array must include the values in the following format:
11995 *
11996 * attrs = [
11997 * // static attributes (like `title`, `name`, `id`...)
11998 * attr1, value1, attr2, value,
11999 *
12000 * // a single namespace value (like `x:id`)
12001 * NAMESPACE_MARKER, namespaceUri1, name1, value1,
12002 *
12003 * // another single namespace value (like `x:name`)
12004 * NAMESPACE_MARKER, namespaceUri2, name2, value2,
12005 *
12006 * // a series of CSS classes that will be applied to the element (no spaces)
12007 * CLASSES_MARKER, class1, class2, class3,
12008 *
12009 * // a series of CSS styles (property + value) that will be applied to the element
12010 * STYLES_MARKER, prop1, value1, prop2, value2
12011 * ]
12012 *
12013 * All non-class and non-style attributes must be defined at the start of the list
12014 * first before all class and style values are set. When there is a change in value
12015 * type (like when classes and styles are introduced) a marker must be used to separate
12016 * the entries. The marker values themselves are set via entries found in the
12017 * [AttributeMarker] enum.
12018 */
12019 hostAttrs?: TAttributes;
12020 /**
12021 * Function to create instances of content queries associated with a given directive.
12022 */
12023 contentQueries?: ContentQueriesFunction<T>;
12024 /**
12025 * Defines the name that can be used in the template to assign this directive to a variable.
12026 *
12027 * See: {@link Directive.exportAs}
12028 */
12029 exportAs?: string[];
12030 /**
12031 * Template function use for rendering DOM.
12032 *
12033 * This function has following structure.
12034 *
12035 * ```
12036 * function Template<T>(ctx:T, creationMode: boolean) {
12037 * if (creationMode) {
12038 * // Contains creation mode instructions.
12039 * }
12040 * // Contains binding update instructions
12041 * }
12042 * ```
12043 *
12044 * Common instructions are:
12045 * Creation mode instructions:
12046 * - `elementStart`, `elementEnd`
12047 * - `text`
12048 * - `container`
12049 * - `listener`
12050 *
12051 * Binding update instructions:
12052 * - `bind`
12053 * - `elementAttribute`
12054 * - `elementProperty`
12055 * - `elementClass`
12056 * - `elementStyle`
12057 *
12058 */
12059 template: ComponentTemplate<T>;
12060 /**
12061 * Constants for the nodes in the component's view.
12062 * Includes attribute arrays, local definition arrays etc.
12063 */
12064 consts?: TConstantsOrFactory;
12065 /**
12066 * An array of `ngContent[selector]` values that were found in the template.
12067 */
12068 ngContentSelectors?: string[];
12069 /**
12070 * Additional set of instructions specific to view query processing. This could be seen as a
12071 * set of instruction to be inserted into the template function.
12072 *
12073 * Query-related instructions need to be pulled out to a specific function as a timing of
12074 * execution is different as compared to all other instructions (after change detection hooks but
12075 * before view hooks).
12076 */
12077 viewQuery?: ViewQueriesFunction<T> | null;
12078 /**
12079 * A list of optional features to apply.
12080 *
12081 * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}
12082 */
12083 features?: ComponentDefFeature[];
12084 /**
12085 * Defines template and style encapsulation options available for Component's {@link Component}.
12086 */
12087 encapsulation?: ViewEncapsulation;
12088 /**
12089 * Defines arbitrary developer-defined data to be stored on a renderer instance.
12090 * This is useful for renderers that delegate to other renderers.
12091 *
12092 * see: animation
12093 */
12094 data?: {
12095 [kind: string]: any;
12096 };
12097 /**
12098 * A set of styles that the component needs to be present for component to render correctly.
12099 */
12100 styles?: string[];
12101 /**
12102 * The strategy that the default change detector uses to detect changes.
12103 * When set, takes effect the next time change detection is triggered.
12104 */
12105 changeDetection?: ChangeDetectionStrategy;
12106 /**
12107 * Registry of directives, components, and pipes that may be found in this component's view.
12108 *
12109 * This property is either an array of types or a function that returns the array of types. This
12110 * function may be necessary to support forward declarations.
12111 */
12112 dependencies?: TypeOrFactory<DependencyTypeList>;
12113 /**
12114 * The set of schemas that declare elements to be allowed in the component's template.
12115 */
12116 schemas?: SchemaMetadata[] | null;
12117 /**
12118 * Whether this directive/component is standalone.
12119 */
12120 standalone?: boolean;
12121}): unknown;
12122
12123/**
12124 * Create a directive definition object.
12125 *
12126 * # Example
12127 * ```ts
12128 * class MyDirective {
12129 * // Generated by Angular Template Compiler
12130 * // [Symbol] syntax will not be supported by TypeScript until v2.7
12131 * static ɵdir = ɵɵdefineDirective({
12132 * ...
12133 * });
12134 * }
12135 * ```
12136 *
12137 * @codeGenApi
12138 */
12139export declare const ɵɵdefineDirective: <T>(directiveDefinition: {
12140 /**
12141 * Directive type, needed to configure the injector.
12142 */
12143 type: Type<T>;
12144 /** The selectors that will be used to match nodes to this directive. */
12145 selectors?: ɵCssSelectorList | undefined;
12146 /**
12147 * A map of input names.
12148 *
12149 * The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
12150 *
12151 * Given:
12152 * ```
12153 * class MyComponent {
12154 * @Input()
12155 * publicInput1: string;
12156 *
12157 * @Input('publicInput2')
12158 * declaredInput2: string;
12159 * }
12160 * ```
12161 *
12162 * is described as:
12163 * ```
12164 * {
12165 * publicInput1: 'publicInput1',
12166 * declaredInput2: ['declaredInput2', 'publicInput2'],
12167 * }
12168 * ```
12169 *
12170 * Which the minifier may translate to:
12171 * ```
12172 * {
12173 * minifiedPublicInput1: 'publicInput1',
12174 * minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],
12175 * }
12176 * ```
12177 *
12178 * This allows the render to re-construct the minified, public, and declared names
12179 * of properties.
12180 *
12181 * NOTE:
12182 * - Because declared and public name are usually same we only generate the array
12183 * `['declared', 'public']` format when they differ.
12184 * - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
12185 * inconsistent behavior in that it uses declared names rather than minified or public. For
12186 * this reason `NgOnChanges` will be deprecated and removed in future version and this
12187 * API will be simplified to be consistent with `output`.
12188 */
12189 inputs?: { [P in keyof T]?: string | [string, string] | undefined; } | undefined;
12190 /**
12191 * A map of output names.
12192 *
12193 * The format is in: `{[actualPropertyName: string]:string}`.
12194 *
12195 * Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
12196 *
12197 * This allows the render to re-construct the minified and non-minified names
12198 * of properties.
12199 */
12200 outputs?: { [P_1 in keyof T]?: string | undefined; } | undefined;
12201 /**
12202 * A list of optional features to apply.
12203 *
12204 * See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}
12205 */
12206 features?: DirectiveDefFeature[] | undefined;
12207 /**
12208 * Function executed by the parent template to allow child directive to apply host bindings.
12209 */
12210 hostBindings?: HostBindingsFunction<T> | undefined;
12211 /**
12212 * The number of bindings in this directive `hostBindings` (including pure fn bindings).
12213 *
12214 * Used to calculate the length of the component's LView array, so we
12215 * can pre-fill the array and set the host binding start index.
12216 */
12217 hostVars?: number | undefined;
12218 /**
12219 * Assign static attribute values to a host element.
12220 *
12221 * This property will assign static attribute values as well as class and style
12222 * values to a host element. Since attribute values can consist of different types of values,
12223 * the `hostAttrs` array must include the values in the following format:
12224 *
12225 * attrs = [
12226 * // static attributes (like `title`, `name`, `id`...)
12227 * attr1, value1, attr2, value,
12228 *
12229 * // a single namespace value (like `x:id`)
12230 * NAMESPACE_MARKER, namespaceUri1, name1, value1,
12231 *
12232 * // another single namespace value (like `x:name`)
12233 * NAMESPACE_MARKER, namespaceUri2, name2, value2,
12234 *
12235 * // a series of CSS classes that will be applied to the element (no spaces)
12236 * CLASSES_MARKER, class1, class2, class3,
12237 *
12238 * // a series of CSS styles (property + value) that will be applied to the element
12239 * STYLES_MARKER, prop1, value1, prop2, value2
12240 * ]
12241 *
12242 * All non-class and non-style attributes must be defined at the start of the list
12243 * first before all class and style values are set. When there is a change in value
12244 * type (like when classes and styles are introduced) a marker must be used to separate
12245 * the entries. The marker values themselves are set via entries found in the
12246 * [AttributeMarker] enum.
12247 */
12248 hostAttrs?: TAttributes | undefined;
12249 /**
12250 * Function to create instances of content queries associated with a given directive.
12251 */
12252 contentQueries?: ContentQueriesFunction<T> | undefined;
12253 /**
12254 * Additional set of instructions specific to view query processing. This could be seen as a
12255 * set of instructions to be inserted into the template function.
12256 */
12257 viewQuery?: ViewQueriesFunction<T> | null | undefined;
12258 /**
12259 * Defines the name that can be used in the template to assign this directive to a variable.
12260 *
12261 * See: {@link Directive.exportAs}
12262 */
12263 exportAs?: string[] | undefined;
12264}) => never;
12265
12266/**
12267 * Construct an injectable definition which defines how a token will be constructed by the DI
12268 * system, and in which injectors (if any) it will be available.
12269 *
12270 * This should be assigned to a static `ɵprov` field on a type, which will then be an
12271 * `InjectableType`.
12272 *
12273 * Options:
12274 * * `providedIn` determines which injectors will include the injectable, by either associating it
12275 * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be
12276 * provided in the `'root'` injector, which will be the application-level injector in most apps.
12277 * * `factory` gives the zero argument function which will create an instance of the injectable.
12278 * The factory can call `inject` to access the `Injector` and request injection of dependencies.
12279 *
12280 * @codeGenApi
12281 * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
12282 */
12283export declare function ɵɵdefineInjectable<T>(opts: {
12284 token: unknown;
12285 providedIn?: Type<any> | 'root' | 'platform' | 'any' | 'environment' | null;
12286 factory: () => T;
12287}): unknown;
12288
12289/**
12290 * Construct an `InjectorDef` which configures an injector.
12291 *
12292 * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an
12293 * `InjectorType`.
12294 *
12295 * Options:
12296 *
12297 * * `providers`: an optional array of providers to add to the injector. Each provider must
12298 * either have a factory or point to a type which has a `ɵprov` static property (the
12299 * type must be an `InjectableType`).
12300 * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s
12301 * whose providers will also be added to the injector. Locally provided types will override
12302 * providers from imports.
12303 *
12304 * @codeGenApi
12305 */
12306export declare function ɵɵdefineInjector(options: {
12307 providers?: any[];
12308 imports?: any[];
12309}): unknown;
12310
12311/**
12312 * @codeGenApi
12313 */
12314export declare function ɵɵdefineNgModule<T>(def: {
12315 /** Token representing the module. Used by DI. */
12316 type: T;
12317 /** List of components to bootstrap. */
12318 bootstrap?: Type<any>[] | (() => Type<any>[]);
12319 /** List of components, directives, and pipes declared by this module. */
12320 declarations?: Type<any>[] | (() => Type<any>[]);
12321 /** List of modules or `ModuleWithProviders` imported by this module. */
12322 imports?: Type<any>[] | (() => Type<any>[]);
12323 /**
12324 * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
12325 * module.
12326 */
12327 exports?: Type<any>[] | (() => Type<any>[]);
12328 /** The set of schemas that declare elements to be allowed in the NgModule. */
12329 schemas?: SchemaMetadata[] | null;
12330 /** Unique ID for the module that is used with `getModuleFactory`. */
12331 id?: string | null;
12332}): unknown;
12333
12334/**
12335 * Create a pipe definition object.
12336 *
12337 * # Example
12338 * ```
12339 * class MyPipe implements PipeTransform {
12340 * // Generated by Angular Template Compiler
12341 * static ɵpipe = definePipe({
12342 * ...
12343 * });
12344 * }
12345 * ```
12346 * @param pipeDef Pipe definition generated by the compiler
12347 *
12348 * @codeGenApi
12349 */
12350export declare function ɵɵdefinePipe<T>(pipeDef: {
12351 /** Name of the pipe. Used for matching pipes in template to pipe defs. */
12352 name: string;
12353 /** Pipe class reference. Needed to extract pipe lifecycle hooks. */
12354 type: Type<T>;
12355 /** Whether the pipe is pure. */
12356 pure?: boolean;
12357 /**
12358 * Whether the pipe is standalone.
12359 */
12360 standalone?: boolean;
12361}): unknown;
12362
12363
12364/**
12365 * @publicApi
12366 */
12367export declare type ɵɵDirectiveDeclaration<T, Selector extends string, ExportAs extends string[], InputMap extends {
12368 [key: string]: string;
12369}, OutputMap extends {
12370 [key: string]: string;
12371}, QueryFields extends string[], NgContentSelectors extends never = never, IsStandalone extends boolean = false, HostDirectives = never> = unknown;
12372
12373/**
12374 * Returns the value associated to the given token from the injectors.
12375 *
12376 * `directiveInject` is intended to be used for directive, component and pipe factories.
12377 * All other injection use `inject` which does not walk the node injector tree.
12378 *
12379 * Usage example (in factory function):
12380 *
12381 * ```ts
12382 * class SomeDirective {
12383 * constructor(directive: DirectiveA) {}
12384 *
12385 * static ɵdir = ɵɵdefineDirective({
12386 * type: SomeDirective,
12387 * factory: () => new SomeDirective(ɵɵdirectiveInject(DirectiveA))
12388 * });
12389 * }
12390 * ```
12391 * @param token the type or token to inject
12392 * @param flags Injection flags
12393 * @returns the value from the injector or `null` when not found
12394 *
12395 * @codeGenApi
12396 */
12397export declare function ɵɵdirectiveInject<T>(token: ProviderToken<T>): T;
12398
12399export declare function ɵɵdirectiveInject<T>(token: ProviderToken<T>, flags: InjectFlags): T;
12400
12401/**
12402 * Disables directive matching on element.
12403 *
12404 * * Example:
12405 * ```
12406 * <my-comp my-directive>
12407 * Should match component / directive.
12408 * </my-comp>
12409 * <div ngNonBindable>
12410 * <!-- ɵɵdisableBindings() -->
12411 * <my-comp my-directive>
12412 * Should not match component / directive because we are in ngNonBindable.
12413 * </my-comp>
12414 * <!-- ɵɵenableBindings() -->
12415 * </div>
12416 * ```
12417 *
12418 * @codeGenApi
12419 */
12420export declare function ɵɵdisableBindings(): void;
12421
12422/**
12423 * Creates an empty element using {@link elementStart} and {@link elementEnd}
12424 *
12425 * @param index Index of the element in the data array
12426 * @param name Name of the DOM Node
12427 * @param attrsIndex Index of the element's attributes in the `consts` array.
12428 * @param localRefsIndex Index of the element's local references in the `consts` array.
12429 * @returns This function returns itself so that it may be chained.
12430 *
12431 * @codeGenApi
12432 */
12433export declare function ɵɵelement(index: number, name: string, attrsIndex?: number | null, localRefsIndex?: number): typeof ɵɵelement;
12434
12435/**
12436 * Creates an empty logical container using {@link elementContainerStart}
12437 * and {@link elementContainerEnd}
12438 *
12439 * @param index Index of the element in the LView array
12440 * @param attrsIndex Index of the container attributes in the `consts` array.
12441 * @param localRefsIndex Index of the container's local references in the `consts` array.
12442 * @returns This function returns itself so that it may be chained.
12443 *
12444 * @codeGenApi
12445 */
12446export declare function ɵɵelementContainer(index: number, attrsIndex?: number | null, localRefsIndex?: number): typeof ɵɵelementContainer;
12447
12448/**
12449 * Mark the end of the <ng-container>.
12450 * @returns This function returns itself so that it may be chained.
12451 *
12452 * @codeGenApi
12453 */
12454export declare function ɵɵelementContainerEnd(): typeof ɵɵelementContainerEnd;
12455
12456/**
12457 * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.
12458 * The instruction must later be followed by `elementContainerEnd()` call.
12459 *
12460 * @param index Index of the element in the LView array
12461 * @param attrsIndex Index of the container attributes in the `consts` array.
12462 * @param localRefsIndex Index of the container's local references in the `consts` array.
12463 * @returns This function returns itself so that it may be chained.
12464 *
12465 * Even if this instruction accepts a set of attributes no actual attribute values are propagated to
12466 * the DOM (as a comment node can't have attributes). Attributes are here only for directive
12467 * matching purposes and setting initial inputs of directives.
12468 *
12469 * @codeGenApi
12470 */
12471export declare function ɵɵelementContainerStart(index: number, attrsIndex?: number | null, localRefsIndex?: number): typeof ɵɵelementContainerStart;
12472
12473/**
12474 * Mark the end of the element.
12475 * @returns This function returns itself so that it may be chained.
12476 *
12477 * @codeGenApi
12478 */
12479export declare function ɵɵelementEnd(): typeof ɵɵelementEnd;
12480
12481
12482/**
12483 * Create DOM element. The instruction must later be followed by `elementEnd()` call.
12484 *
12485 * @param index Index of the element in the LView array
12486 * @param name Name of the DOM Node
12487 * @param attrsIndex Index of the element's attributes in the `consts` array.
12488 * @param localRefsIndex Index of the element's local references in the `consts` array.
12489 * @returns This function returns itself so that it may be chained.
12490 *
12491 * Attributes and localRefs are passed as an array of strings where elements with an even index
12492 * hold an attribute name and elements with an odd index hold an attribute value, ex.:
12493 * ['id', 'warning5', 'class', 'alert']
12494 *
12495 * @codeGenApi
12496 */
12497export declare function ɵɵelementStart(index: number, name: string, attrsIndex?: number | null, localRefsIndex?: number): typeof ɵɵelementStart;
12498
12499/**
12500 * Enables directive matching on elements.
12501 *
12502 * * Example:
12503 * ```
12504 * <my-comp my-directive>
12505 * Should match component / directive.
12506 * </my-comp>
12507 * <div ngNonBindable>
12508 * <!-- ɵɵdisableBindings() -->
12509 * <my-comp my-directive>
12510 * Should not match component / directive because we are in ngNonBindable.
12511 * </my-comp>
12512 * <!-- ɵɵenableBindings() -->
12513 * </div>
12514 * ```
12515 *
12516 * @codeGenApi
12517 */
12518export declare function ɵɵenableBindings(): void;
12519
12520/**
12521 * @publicApi
12522 */
12523export declare type ɵɵFactoryDeclaration<T, CtorDependencies extends CtorDependency[]> = unknown;
12524
12525export declare enum ɵɵFactoryTarget {
12526 Directive = 0,
12527 Component = 1,
12528 Injectable = 2,
12529 Pipe = 3,
12530 NgModule = 4
12531}
12532
12533/**
12534 * Returns the current OpaqueViewState instance.
12535 *
12536 * Used in conjunction with the restoreView() instruction to save a snapshot
12537 * of the current view and restore it when listeners are invoked. This allows
12538 * walking the declaration view tree in listeners to get vars from parent views.
12539 *
12540 * @codeGenApi
12541 */
12542export declare function ɵɵgetCurrentView(): OpaqueViewState;
12543
12544/**
12545 * @codeGenApi
12546 */
12547export declare function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T;
12548
12549/**
12550 * This feature adds the host directives behavior to a directive definition by patching a
12551 * function onto it. The expectation is that the runtime will invoke the function during
12552 * directive matching.
12553 *
12554 * For example:
12555 * ```ts
12556 * class ComponentWithHostDirective {
12557 * static ɵcmp = defineComponent({
12558 * type: ComponentWithHostDirective,
12559 * features: [ɵɵHostDirectivesFeature([
12560 * SimpleHostDirective,
12561 * {directive: AdvancedHostDirective, inputs: ['foo: alias'], outputs: ['bar']},
12562 * ])]
12563 * });
12564 * }
12565 * ```
12566 *
12567 * @codeGenApi
12568 */
12569export declare function ɵɵHostDirectivesFeature(rawHostDirectives: HostDirectiveConfig[] | (() => HostDirectiveConfig[])): (definition: ɵDirectiveDef<unknown>) => void;
12570
12571/**
12572 * Update a property on a host element. Only applies to native node properties, not inputs.
12573 *
12574 * Operates on the element selected by index via the {@link select} instruction.
12575 *
12576 * @param propName Name of property. Because it is going to DOM, this is not subject to
12577 * renaming as part of minification.
12578 * @param value New value to write.
12579 * @param sanitizer An optional function used to sanitize the value.
12580 * @returns This function returns itself so that it may be chained
12581 * (e.g. `property('name', ctx.name)('title', ctx.title)`)
12582 *
12583 * @codeGenApi
12584 */
12585export declare function ɵɵhostProperty<T>(propName: string, value: T, sanitizer?: SanitizerFn | null): typeof ɵɵhostProperty;
12586
12587/**
12588 *
12589 * Use this instruction to create a translation block that doesn't contain any placeholder.
12590 * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.
12591 *
12592 * The translation `message` is the value which is locale specific. The translation string may
12593 * contain placeholders which associate inner elements and sub-templates within the translation.
12594 *
12595 * The translation `message` placeholders are:
12596 * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
12597 * interpolated into. The placeholder `index` points to the expression binding index. An optional
12598 * `block` that matches the sub-template in which it was declared.
12599 * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning
12600 * and end of DOM element that were embedded in the original translation block. The placeholder
12601 * `index` points to the element index in the template instructions set. An optional `block` that
12602 * matches the sub-template in which it was declared.
12603 * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
12604 * split up and translated separately in each angular template function. The `index` points to the
12605 * `template` instruction index. A `block` that matches the sub-template in which it was declared.
12606 *
12607 * @param index A unique index of the translation in the static block.
12608 * @param messageIndex An index of the translation message from the `def.consts` array.
12609 * @param subTemplateIndex Optional sub-template index in the `message`.
12610 *
12611 * @codeGenApi
12612 */
12613export declare function ɵɵi18n(index: number, messageIndex: number, subTemplateIndex?: number): void;
12614
12615/**
12616 * Updates a translation block or an i18n attribute when the bindings have changed.
12617 *
12618 * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}
12619 * (i18n attribute) on which it should update the content.
12620 *
12621 * @codeGenApi
12622 */
12623export declare function ɵɵi18nApply(index: number): void;
12624
12625/**
12626 * Marks a list of attributes as translatable.
12627 *
12628 * @param index A unique index in the static block
12629 * @param values
12630 *
12631 * @codeGenApi
12632 */
12633export declare function ɵɵi18nAttributes(index: number, attrsIndex: number): void;
12634
12635/**
12636 * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes
12637 * into the render tree, moves the placeholder nodes and removes the deleted nodes.
12638 *
12639 * @codeGenApi
12640 */
12641export declare function ɵɵi18nEnd(): void;
12642
12643/**
12644 * Stores the values of the bindings during each update cycle in order to determine if we need to
12645 * update the translated nodes.
12646 *
12647 * @param value The binding's value
12648 * @returns This function returns itself so that it may be chained
12649 * (e.g. `i18nExp(ctx.name)(ctx.title)`)
12650 *
12651 * @codeGenApi
12652 */
12653export declare function ɵɵi18nExp<T>(value: T): typeof ɵɵi18nExp;
12654
12655/**
12656 * Handles message string post-processing for internationalization.
12657 *
12658 * Handles message string post-processing by transforming it from intermediate
12659 * format (that might contain some markers that we need to replace) to the final
12660 * form, consumable by i18nStart instruction. Post processing steps include:
12661 *
12662 * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])
12663 * 2. Replace all ICU vars (like "VAR_PLURAL")
12664 * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}
12665 * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)
12666 * in case multiple ICUs have the same placeholder name
12667 *
12668 * @param message Raw translation string for post processing
12669 * @param replacements Set of replacements that should be applied
12670 *
12671 * @returns Transformed string that can be consumed by i18nStart instruction
12672 *
12673 * @codeGenApi
12674 */
12675export declare function ɵɵi18nPostprocess(message: string, replacements?: {
12676 [key: string]: (string | string[]);
12677}): string;
12678
12679/**
12680 * Marks a block of text as translatable.
12681 *
12682 * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.
12683 * The translation `message` is the value which is locale specific. The translation string may
12684 * contain placeholders which associate inner elements and sub-templates within the translation.
12685 *
12686 * The translation `message` placeholders are:
12687 * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be
12688 * interpolated into. The placeholder `index` points to the expression binding index. An optional
12689 * `block` that matches the sub-template in which it was declared.
12690 * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning
12691 * and end of DOM element that were embedded in the original translation block. The placeholder
12692 * `index` points to the element index in the template instructions set. An optional `block` that
12693 * matches the sub-template in which it was declared.
12694 * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be
12695 * split up and translated separately in each angular template function. The `index` points to the
12696 * `template` instruction index. A `block` that matches the sub-template in which it was declared.
12697 *
12698 * @param index A unique index of the translation in the static block.
12699 * @param messageIndex An index of the translation message from the `def.consts` array.
12700 * @param subTemplateIndex Optional sub-template index in the `message`.
12701 *
12702 * @codeGenApi
12703 */
12704export declare function ɵɵi18nStart(index: number, messageIndex: number, subTemplateIndex?: number): void;
12705
12706/**
12707 * Merges the definition from a super class to a sub class.
12708 * @param definition The definition that is a SubClass of another directive of component
12709 *
12710 * @codeGenApi
12711 */
12712export declare function ɵɵInheritDefinitionFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
12713
12714/**
12715 * Generated instruction: injects a token from the currently active injector.
12716 *
12717 * (Additional documentation moved to `inject`, as it is the public API, and an alias for this
12718 * instruction)
12719 *
12720 * @see inject
12721 * @codeGenApi
12722 * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
12723 */
12724export declare function ɵɵinject<T>(token: ProviderToken<T>): T;
12725
12726export declare function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
12727
12728/**
12729 * Information about how a type or `InjectionToken` interfaces with the DI system.
12730 *
12731 * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly
12732 * requesting injection of other types if necessary.
12733 *
12734 * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular
12735 * `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates
12736 * that the injectable does not belong to any scope.
12737 *
12738 * @codeGenApi
12739 * @publicApi The ViewEngine compiler emits code with this type for injectables. This code is
12740 * deployed to npm, and should be treated as public api.
12741
12742 */
12743export declare interface ɵɵInjectableDeclaration<T> {
12744 /**
12745 * Specifies that the given type belongs to a particular injector:
12746 * - `InjectorType` such as `NgModule`,
12747 * - `'root'` the root injector
12748 * - `'any'` all injectors.
12749 * - `null`, does not belong to any injector. Must be explicitly listed in the injector
12750 * `providers`.
12751 */
12752 providedIn: InjectorType<any> | 'root' | 'platform' | 'any' | 'environment' | null;
12753 /**
12754 * The token to which this definition belongs.
12755 *
12756 * Note that this may not be the same as the type that the `factory` will create.
12757 */
12758 token: unknown;
12759 /**
12760 * Factory method to execute to create an instance of the injectable.
12761 */
12762 factory: (t?: Type<any>) => T;
12763 /**
12764 * In a case of no explicit injector, a location where the instance of the injectable is stored.
12765 */
12766 value: T | undefined;
12767}
12768
12769/**
12770 * Facade for the attribute injection from DI.
12771 *
12772 * @codeGenApi
12773 */
12774export declare function ɵɵinjectAttribute(attrNameToInject: string): string | null;
12775
12776/**
12777 * @publicApi
12778 */
12779export declare type ɵɵInjectorDeclaration<T> = unknown;
12780
12781/**
12782 * Information about the providers to be included in an `Injector` as well as how the given type
12783 * which carries the information should be created by the DI system.
12784 *
12785 * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested
12786 * structure of providers with a defined priority (identically to how `NgModule`s also have
12787 * an import/dependency structure).
12788 *
12789 * NOTE: This is a private type and should not be exported
12790 *
12791 * @codeGenApi
12792 */
12793export declare interface ɵɵInjectorDef<T> {
12794 providers: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | EnvironmentProviders | any[])[];
12795 imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];
12796}
12797
12798/**
12799 * Throws an error indicating that a factory function could not be generated by the compiler for a
12800 * particular class.
12801 *
12802 * This instruction allows the actual error message to be optimized away when ngDevMode is turned
12803 * off, saving bytes of generated code while still providing a good experience in dev mode.
12804 *
12805 * The name of the class is not mentioned here, but will be in the generated factory function name
12806 * and thus in the stack trace.
12807 *
12808 * @codeGenApi
12809 */
12810export declare function ɵɵinvalidFactory(): never;
12811
12812/**
12813 * Throws an error indicating that a factory function could not be generated by the compiler for a
12814 * particular class.
12815 *
12816 * The name of the class is not mentioned here, but will be in the generated factory function name
12817 * and thus in the stack trace.
12818 *
12819 * @codeGenApi
12820 */
12821export declare function ɵɵinvalidFactoryDep(index: number): never;
12822
12823/**
12824 * Adds an event listener to the current node.
12825 *
12826 * If an output exists on one of the node's directives, it also subscribes to the output
12827 * and saves the subscription for later cleanup.
12828 *
12829 * @param eventName Name of the event
12830 * @param listenerFn The function to be called when event emits
12831 * @param useCapture Whether or not to use capture in event listener - this argument is a reminder
12832 * from the Renderer3 infrastructure and should be removed from the instruction arguments
12833 * @param eventTargetResolver Function that returns global target information in case this listener
12834 * should be attached to a global object like window, document or body
12835 *
12836 * @codeGenApi
12837 */
12838export declare function ɵɵlistener(eventName: string, listenerFn: (e?: any) => any, useCapture?: boolean, eventTargetResolver?: GlobalTargetResolver): typeof ɵɵlistener;
12839
12840/**
12841 * Loads a QueryList corresponding to the current view or content query.
12842 *
12843 * @codeGenApi
12844 */
12845export declare function ɵɵloadQuery<T>(): QueryList<T>;
12846
12847/**
12848 * Sets the namespace used to create elements to `null`, which forces element creation to use
12849 * `createElement` rather than `createElementNS`.
12850 *
12851 * @codeGenApi
12852 */
12853export declare function ɵɵnamespaceHTML(): void;
12854
12855/**
12856 * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.
12857 *
12858 * @codeGenApi
12859 */
12860export declare function ɵɵnamespaceMathML(): void;
12861
12862/**
12863 * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.
12864 *
12865 * @codeGenApi
12866 */
12867export declare function ɵɵnamespaceSVG(): void;
12868
12869/**
12870 * Retrieves a context at the level specified and saves it as the global, contextViewData.
12871 * Will get the next level up if level is not specified.
12872 *
12873 * This is used to save contexts of parent views so they can be bound in embedded views, or
12874 * in conjunction with reference() to bind a ref from a parent view.
12875 *
12876 * @param level The relative level of the view from which to grab context compared to contextVewData
12877 * @returns context
12878 *
12879 * @codeGenApi
12880 */
12881export declare function ɵɵnextContext<T = any>(level?: number): T;
12882
12883/**
12884 * Evaluates the class metadata declaration.
12885 *
12886 * @codeGenApi
12887 */
12888export declare function ɵɵngDeclareClassMetadata(decl: {
12889 type: Type<any>;
12890 decorators: any[];
12891 ctorParameters?: () => any[];
12892 propDecorators?: {
12893 [field: string]: any;
12894 };
12895}): void;
12896
12897/**
12898 * Compiles a partial component declaration object into a full component definition object.
12899 *
12900 * @codeGenApi
12901 */
12902export declare function ɵɵngDeclareComponent(decl: R3DeclareComponentFacade): unknown;
12903
12904/**
12905 * Compiles a partial directive declaration object into a full directive definition object.
12906 *
12907 * @codeGenApi
12908 */
12909export declare function ɵɵngDeclareDirective(decl: R3DeclareDirectiveFacade): unknown;
12910
12911/**
12912 * Compiles a partial pipe declaration object into a full pipe definition object.
12913 *
12914 * @codeGenApi
12915 */
12916export declare function ɵɵngDeclareFactory(decl: R3DeclareFactoryFacade): unknown;
12917
12918/**
12919 * Compiles a partial injectable declaration object into a full injectable definition object.
12920 *
12921 * @codeGenApi
12922 */
12923export declare function ɵɵngDeclareInjectable(decl: R3DeclareInjectableFacade): unknown;
12924
12925/**
12926 * Compiles a partial injector declaration object into a full injector definition object.
12927 *
12928 * @codeGenApi
12929 */
12930export declare function ɵɵngDeclareInjector(decl: R3DeclareInjectorFacade): unknown;
12931
12932/**
12933 * Compiles a partial NgModule declaration object into a full NgModule definition object.
12934 *
12935 * @codeGenApi
12936 */
12937export declare function ɵɵngDeclareNgModule(decl: R3DeclareNgModuleFacade): unknown;
12938
12939/**
12940 * Compiles a partial pipe declaration object into a full pipe definition object.
12941 *
12942 * @codeGenApi
12943 */
12944export declare function ɵɵngDeclarePipe(decl: R3DeclarePipeFacade): unknown;
12945
12946/**
12947 * @publicApi
12948 */
12949export declare type ɵɵNgModuleDeclaration<T, Declarations, Imports, Exports> = unknown;
12950
12951/**
12952 * The NgOnChangesFeature decorates a component with support for the ngOnChanges
12953 * lifecycle hook, so it should be included in any component that implements
12954 * that hook.
12955 *
12956 * If the component or directive uses inheritance, the NgOnChangesFeature MUST
12957 * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise
12958 * inherited properties will not be propagated to the ngOnChanges lifecycle
12959 * hook.
12960 *
12961 * Example usage:
12962 *
12963 * ```
12964 * static ɵcmp = defineComponent({
12965 * ...
12966 * inputs: {name: 'publicName'},
12967 * features: [NgOnChangesFeature]
12968 * });
12969 * ```
12970 *
12971 * @codeGenApi
12972 */
12973export declare function ɵɵNgOnChangesFeature<T>(): DirectiveDefFeature;
12974
12975
12976/**
12977 * Create a pipe.
12978 *
12979 * @param index Pipe index where the pipe will be stored.
12980 * @param pipeName The name of the pipe
12981 * @returns T the instance of the pipe.
12982 *
12983 * @codeGenApi
12984 */
12985export declare function ɵɵpipe(index: number, pipeName: string): any;
12986
12987/**
12988 * Invokes a pipe with 1 arguments.
12989 *
12990 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
12991 * the pipe only when an input to the pipe changes.
12992 *
12993 * @param index Pipe index where the pipe was stored on creation.
12994 * @param slotOffset the offset in the reserved slot space
12995 * @param v1 1st argument to {@link PipeTransform#transform}.
12996 *
12997 * @codeGenApi
12998 */
12999export declare function ɵɵpipeBind1(index: number, slotOffset: number, v1: any): any;
13000
13001/**
13002 * Invokes a pipe with 2 arguments.
13003 *
13004 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
13005 * the pipe only when an input to the pipe changes.
13006 *
13007 * @param index Pipe index where the pipe was stored on creation.
13008 * @param slotOffset the offset in the reserved slot space
13009 * @param v1 1st argument to {@link PipeTransform#transform}.
13010 * @param v2 2nd argument to {@link PipeTransform#transform}.
13011 *
13012 * @codeGenApi
13013 */
13014export declare function ɵɵpipeBind2(index: number, slotOffset: number, v1: any, v2: any): any;
13015
13016/**
13017 * Invokes a pipe with 3 arguments.
13018 *
13019 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
13020 * the pipe only when an input to the pipe changes.
13021 *
13022 * @param index Pipe index where the pipe was stored on creation.
13023 * @param slotOffset the offset in the reserved slot space
13024 * @param v1 1st argument to {@link PipeTransform#transform}.
13025 * @param v2 2nd argument to {@link PipeTransform#transform}.
13026 * @param v3 4rd argument to {@link PipeTransform#transform}.
13027 *
13028 * @codeGenApi
13029 */
13030export declare function ɵɵpipeBind3(index: number, slotOffset: number, v1: any, v2: any, v3: any): any;
13031
13032/**
13033 * Invokes a pipe with 4 arguments.
13034 *
13035 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
13036 * the pipe only when an input to the pipe changes.
13037 *
13038 * @param index Pipe index where the pipe was stored on creation.
13039 * @param slotOffset the offset in the reserved slot space
13040 * @param v1 1st argument to {@link PipeTransform#transform}.
13041 * @param v2 2nd argument to {@link PipeTransform#transform}.
13042 * @param v3 3rd argument to {@link PipeTransform#transform}.
13043 * @param v4 4th argument to {@link PipeTransform#transform}.
13044 *
13045 * @codeGenApi
13046 */
13047export declare function ɵɵpipeBind4(index: number, slotOffset: number, v1: any, v2: any, v3: any, v4: any): any;
13048
13049/**
13050 * Invokes a pipe with variable number of arguments.
13051 *
13052 * This instruction acts as a guard to {@link PipeTransform#transform} invoking
13053 * the pipe only when an input to the pipe changes.
13054 *
13055 * @param index Pipe index where the pipe was stored on creation.
13056 * @param slotOffset the offset in the reserved slot space
13057 * @param values Array of arguments to pass to {@link PipeTransform#transform} method.
13058 *
13059 * @codeGenApi
13060 */
13061export declare function ɵɵpipeBindV(index: number, slotOffset: number, values: [any, ...any[]]): any;
13062
13063/**
13064 * @publicApi
13065 */
13066export declare type ɵɵPipeDeclaration<T, Name extends string, IsStandalone extends boolean = false> = unknown;
13067
13068/**
13069 * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call
13070 * to the projectionDef instruction.
13071 *
13072 * @param nodeIndex
13073 * @param selectorIndex:
13074 * - 0 when the selector is `*` (or unspecified as this is the default value),
13075 * - 1 based index of the selector from the {@link projectionDef}
13076 *
13077 * @codeGenApi
13078 */
13079export declare function ɵɵprojection(nodeIndex: number, selectorIndex?: number, attrs?: TAttributes): void;
13080
13081/**
13082 * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.
13083 * It takes all the selectors from the entire component's template and decides where
13084 * each projected node belongs (it re-distributes nodes among "buckets" where each "bucket" is
13085 * backed by a selector).
13086 *
13087 * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,
13088 * un-parsed form.
13089 *
13090 * The parsed form is needed for efficient matching of a node against a given CSS selector.
13091 * The un-parsed, textual form is needed for support of the ngProjectAs attribute.
13092 *
13093 * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more
13094 * drawbacks:
13095 * - having only a textual form would require runtime parsing of CSS selectors;
13096 * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a
13097 * template author).
13098 *
13099 * @param projectionSlots? A collection of projection slots. A projection slot can be based
13100 * on a parsed CSS selectors or set to the wildcard selector ("*") in order to match
13101 * all nodes which do not match any selector. If not specified, a single wildcard
13102 * selector projection slot will be defined.
13103 *
13104 * @codeGenApi
13105 */
13106export declare function ɵɵprojectionDef(projectionSlots?: ProjectionSlots): void;
13107
13108/**
13109 * Update a property on a selected element.
13110 *
13111 * Operates on the element selected by index via the {@link select} instruction.
13112 *
13113 * If the property name also exists as an input property on one of the element's directives,
13114 * the component property will be set instead of the element property. This check must
13115 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled
13116 *
13117 * @param propName Name of property. Because it is going to DOM, this is not subject to
13118 * renaming as part of minification.
13119 * @param value New value to write.
13120 * @param sanitizer An optional function used to sanitize the value.
13121 * @returns This function returns itself so that it may be chained
13122 * (e.g. `property('name', ctx.name)('title', ctx.title)`)
13123 *
13124 * @codeGenApi
13125 */
13126export declare function ɵɵproperty<T>(propName: string, value: T, sanitizer?: SanitizerFn | null): typeof ɵɵproperty;
13127
13128/**
13129 *
13130 * Update an interpolated property on an element with a lone bound value
13131 *
13132 * Used when the value passed to a property has 1 interpolated value in it, an no additional text
13133 * surrounds that interpolated value:
13134 *
13135 * ```html
13136 * <div title="{{v0}}"></div>
13137 * ```
13138 *
13139 * Its compiled representation is::
13140 *
13141 * ```ts
13142 * ɵɵpropertyInterpolate('title', v0);
13143 * ```
13144 *
13145 * If the property name also exists as an input property on one of the element's directives,
13146 * the component property will be set instead of the element property. This check must
13147 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13148 *
13149 * @param propName The name of the property to update
13150 * @param prefix Static value used for concatenation only.
13151 * @param v0 Value checked for change.
13152 * @param suffix Static value used for concatenation only.
13153 * @param sanitizer An optional sanitizer function
13154 * @returns itself, so that it may be chained.
13155 * @codeGenApi
13156 */
13157export declare function ɵɵpropertyInterpolate(propName: string, v0: any, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate;
13158
13159/**
13160 *
13161 * Update an interpolated property on an element with single bound value surrounded by text.
13162 *
13163 * Used when the value passed to a property has 1 interpolated value in it:
13164 *
13165 * ```html
13166 * <div title="prefix{{v0}}suffix"></div>
13167 * ```
13168 *
13169 * Its compiled representation is::
13170 *
13171 * ```ts
13172 * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');
13173 * ```
13174 *
13175 * If the property name also exists as an input property on one of the element's directives,
13176 * the component property will be set instead of the element property. This check must
13177 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13178 *
13179 * @param propName The name of the property to update
13180 * @param prefix Static value used for concatenation only.
13181 * @param v0 Value checked for change.
13182 * @param suffix Static value used for concatenation only.
13183 * @param sanitizer An optional sanitizer function
13184 * @returns itself, so that it may be chained.
13185 * @codeGenApi
13186 */
13187export declare function ɵɵpropertyInterpolate1(propName: string, prefix: string, v0: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate1;
13188
13189/**
13190 *
13191 * Update an interpolated property on an element with 2 bound values surrounded by text.
13192 *
13193 * Used when the value passed to a property has 2 interpolated values in it:
13194 *
13195 * ```html
13196 * <div title="prefix{{v0}}-{{v1}}suffix"></div>
13197 * ```
13198 *
13199 * Its compiled representation is::
13200 *
13201 * ```ts
13202 * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');
13203 * ```
13204 *
13205 * If the property name also exists as an input property on one of the element's directives,
13206 * the component property will be set instead of the element property. This check must
13207 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13208 *
13209 * @param propName The name of the property to update
13210 * @param prefix Static value used for concatenation only.
13211 * @param v0 Value checked for change.
13212 * @param i0 Static value used for concatenation only.
13213 * @param v1 Value checked for change.
13214 * @param suffix Static value used for concatenation only.
13215 * @param sanitizer An optional sanitizer function
13216 * @returns itself, so that it may be chained.
13217 * @codeGenApi
13218 */
13219export declare function ɵɵpropertyInterpolate2(propName: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate2;
13220
13221/**
13222 *
13223 * Update an interpolated property on an element with 3 bound values surrounded by text.
13224 *
13225 * Used when the value passed to a property has 3 interpolated values in it:
13226 *
13227 * ```html
13228 * <div title="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
13229 * ```
13230 *
13231 * Its compiled representation is::
13232 *
13233 * ```ts
13234 * ɵɵpropertyInterpolate3(
13235 * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');
13236 * ```
13237 *
13238 * If the property name also exists as an input property on one of the element's directives,
13239 * the component property will be set instead of the element property. This check must
13240 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13241 *
13242 * @param propName The name of the property to update
13243 * @param prefix Static value used for concatenation only.
13244 * @param v0 Value checked for change.
13245 * @param i0 Static value used for concatenation only.
13246 * @param v1 Value checked for change.
13247 * @param i1 Static value used for concatenation only.
13248 * @param v2 Value checked for change.
13249 * @param suffix Static value used for concatenation only.
13250 * @param sanitizer An optional sanitizer function
13251 * @returns itself, so that it may be chained.
13252 * @codeGenApi
13253 */
13254export declare function ɵɵpropertyInterpolate3(propName: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolate3;
13255
13256/**
13257 *
13258 * Update an interpolated property on an element with 4 bound values surrounded by text.
13259 *
13260 * Used when the value passed to a property has 4 interpolated values in it:
13261 *
13262 * ```html
13263 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
13264 * ```
13265 *
13266 * Its compiled representation is::
13267 *
13268 * ```ts
13269 * ɵɵpropertyInterpolate4(
13270 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
13271 * ```
13272 *
13273 * If the property name also exists as an input property on one of the element's directives,
13274 * the component property will be set instead of the element property. This check must
13275 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13276 *
13277 * @param propName The name of the property to update
13278 * @param prefix Static value used for concatenation only.
13279 * @param v0 Value checked for change.
13280 * @param i0 Static value used for concatenation only.
13281 * @param v1 Value checked for change.
13282 * @param i1 Static value used for concatenation only.
13283 * @param v2 Value checked for change.
13284 * @param i2 Static value used for concatenation only.
13285 * @param v3 Value checked for change.
13286 * @param suffix Static value used for concatenation only.
13287 * @param sanitizer An optional sanitizer function
13288 * @returns itself, so that it may be chained.
13289 * @codeGenApi
13290 */
13291export 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;
13292
13293/**
13294 *
13295 * Update an interpolated property on an element with 5 bound values surrounded by text.
13296 *
13297 * Used when the value passed to a property has 5 interpolated values in it:
13298 *
13299 * ```html
13300 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
13301 * ```
13302 *
13303 * Its compiled representation is::
13304 *
13305 * ```ts
13306 * ɵɵpropertyInterpolate5(
13307 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
13308 * ```
13309 *
13310 * If the property name also exists as an input property on one of the element's directives,
13311 * the component property will be set instead of the element property. This check must
13312 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13313 *
13314 * @param propName The name of the property to update
13315 * @param prefix Static value used for concatenation only.
13316 * @param v0 Value checked for change.
13317 * @param i0 Static value used for concatenation only.
13318 * @param v1 Value checked for change.
13319 * @param i1 Static value used for concatenation only.
13320 * @param v2 Value checked for change.
13321 * @param i2 Static value used for concatenation only.
13322 * @param v3 Value checked for change.
13323 * @param i3 Static value used for concatenation only.
13324 * @param v4 Value checked for change.
13325 * @param suffix Static value used for concatenation only.
13326 * @param sanitizer An optional sanitizer function
13327 * @returns itself, so that it may be chained.
13328 * @codeGenApi
13329 */
13330export 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;
13331
13332/**
13333 *
13334 * Update an interpolated property on an element with 6 bound values surrounded by text.
13335 *
13336 * Used when the value passed to a property has 6 interpolated values in it:
13337 *
13338 * ```html
13339 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
13340 * ```
13341 *
13342 * Its compiled representation is::
13343 *
13344 * ```ts
13345 * ɵɵpropertyInterpolate6(
13346 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
13347 * ```
13348 *
13349 * If the property name also exists as an input property on one of the element's directives,
13350 * the component property will be set instead of the element property. This check must
13351 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13352 *
13353 * @param propName The name of the property to update
13354 * @param prefix Static value used for concatenation only.
13355 * @param v0 Value checked for change.
13356 * @param i0 Static value used for concatenation only.
13357 * @param v1 Value checked for change.
13358 * @param i1 Static value used for concatenation only.
13359 * @param v2 Value checked for change.
13360 * @param i2 Static value used for concatenation only.
13361 * @param v3 Value checked for change.
13362 * @param i3 Static value used for concatenation only.
13363 * @param v4 Value checked for change.
13364 * @param i4 Static value used for concatenation only.
13365 * @param v5 Value checked for change.
13366 * @param suffix Static value used for concatenation only.
13367 * @param sanitizer An optional sanitizer function
13368 * @returns itself, so that it may be chained.
13369 * @codeGenApi
13370 */
13371export 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;
13372
13373/**
13374 *
13375 * Update an interpolated property on an element with 7 bound values surrounded by text.
13376 *
13377 * Used when the value passed to a property has 7 interpolated values in it:
13378 *
13379 * ```html
13380 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
13381 * ```
13382 *
13383 * Its compiled representation is::
13384 *
13385 * ```ts
13386 * ɵɵpropertyInterpolate7(
13387 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
13388 * ```
13389 *
13390 * If the property name also exists as an input property on one of the element's directives,
13391 * the component property will be set instead of the element property. This check must
13392 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13393 *
13394 * @param propName The name of the property to update
13395 * @param prefix Static value used for concatenation only.
13396 * @param v0 Value checked for change.
13397 * @param i0 Static value used for concatenation only.
13398 * @param v1 Value checked for change.
13399 * @param i1 Static value used for concatenation only.
13400 * @param v2 Value checked for change.
13401 * @param i2 Static value used for concatenation only.
13402 * @param v3 Value checked for change.
13403 * @param i3 Static value used for concatenation only.
13404 * @param v4 Value checked for change.
13405 * @param i4 Static value used for concatenation only.
13406 * @param v5 Value checked for change.
13407 * @param i5 Static value used for concatenation only.
13408 * @param v6 Value checked for change.
13409 * @param suffix Static value used for concatenation only.
13410 * @param sanitizer An optional sanitizer function
13411 * @returns itself, so that it may be chained.
13412 * @codeGenApi
13413 */
13414export 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;
13415
13416/**
13417 *
13418 * Update an interpolated property on an element with 8 bound values surrounded by text.
13419 *
13420 * Used when the value passed to a property has 8 interpolated values in it:
13421 *
13422 * ```html
13423 * <div title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
13424 * ```
13425 *
13426 * Its compiled representation is::
13427 *
13428 * ```ts
13429 * ɵɵpropertyInterpolate8(
13430 * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
13431 * ```
13432 *
13433 * If the property name also exists as an input property on one of the element's directives,
13434 * the component property will be set instead of the element property. This check must
13435 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13436 *
13437 * @param propName The name of the property to update
13438 * @param prefix Static value used for concatenation only.
13439 * @param v0 Value checked for change.
13440 * @param i0 Static value used for concatenation only.
13441 * @param v1 Value checked for change.
13442 * @param i1 Static value used for concatenation only.
13443 * @param v2 Value checked for change.
13444 * @param i2 Static value used for concatenation only.
13445 * @param v3 Value checked for change.
13446 * @param i3 Static value used for concatenation only.
13447 * @param v4 Value checked for change.
13448 * @param i4 Static value used for concatenation only.
13449 * @param v5 Value checked for change.
13450 * @param i5 Static value used for concatenation only.
13451 * @param v6 Value checked for change.
13452 * @param i6 Static value used for concatenation only.
13453 * @param v7 Value checked for change.
13454 * @param suffix Static value used for concatenation only.
13455 * @param sanitizer An optional sanitizer function
13456 * @returns itself, so that it may be chained.
13457 * @codeGenApi
13458 */
13459export 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;
13460
13461/**
13462 * Update an interpolated property on an element with 9 or more bound values surrounded by text.
13463 *
13464 * Used when the number of interpolated values exceeds 8.
13465 *
13466 * ```html
13467 * <div
13468 * title="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix"></div>
13469 * ```
13470 *
13471 * Its compiled representation is::
13472 *
13473 * ```ts
13474 * ɵɵpropertyInterpolateV(
13475 * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
13476 * 'suffix']);
13477 * ```
13478 *
13479 * If the property name also exists as an input property on one of the element's directives,
13480 * the component property will be set instead of the element property. This check must
13481 * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.
13482 *
13483 * @param propName The name of the property to update.
13484 * @param values The collection of values and the strings in between those values, beginning with a
13485 * string prefix and ending with a string suffix.
13486 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
13487 * @param sanitizer An optional sanitizer function
13488 * @returns itself, so that it may be chained.
13489 * @codeGenApi
13490 */
13491export declare function ɵɵpropertyInterpolateV(propName: string, values: any[], sanitizer?: SanitizerFn): typeof ɵɵpropertyInterpolateV;
13492
13493/**
13494 * This feature resolves the providers of a directive (or component),
13495 * and publish them into the DI system, making it visible to others for injection.
13496 *
13497 * For example:
13498 * ```ts
13499 * class ComponentWithProviders {
13500 * constructor(private greeter: GreeterDE) {}
13501 *
13502 * static ɵcmp = defineComponent({
13503 * type: ComponentWithProviders,
13504 * selectors: [['component-with-providers']],
13505 * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),
13506 * decls: 1,
13507 * vars: 1,
13508 * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {
13509 * if (fs & RenderFlags.Create) {
13510 * ɵɵtext(0);
13511 * }
13512 * if (fs & RenderFlags.Update) {
13513 * ɵɵtextInterpolate(ctx.greeter.greet());
13514 * }
13515 * },
13516 * features: [ɵɵProvidersFeature([GreeterDE])]
13517 * });
13518 * }
13519 * ```
13520 *
13521 * @param definition
13522 *
13523 * @codeGenApi
13524 */
13525export declare function ɵɵProvidersFeature<T>(providers: Provider[], viewProviders?: Provider[]): (definition: ɵDirectiveDef<T>) => void;
13526
13527/**
13528 * Bindings for pure functions are stored after regular bindings.
13529 *
13530 * |-------decls------|---------vars---------| |----- hostVars (dir1) ------|
13531 * ------------------------------------------------------------------------------------------
13532 * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |
13533 * ------------------------------------------------------------------------------------------
13534 * ^ ^
13535 * TView.bindingStartIndex TView.expandoStartIndex
13536 *
13537 * Pure function instructions are given an offset from the binding root. Adding the offset to the
13538 * binding root gives the first index where the bindings are stored. In component views, the binding
13539 * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +
13540 * any directive instances + any hostVars in directives evaluated before it.
13541 *
13542 * See VIEW_DATA.md for more information about host binding resolution.
13543 */
13544/**
13545 * If the value hasn't been saved, calls the pure function to store and return the
13546 * value. If it has been saved, returns the saved value.
13547 *
13548 * @param slotOffset the offset from binding root to the reserved slot
13549 * @param pureFn Function that returns a value
13550 * @param thisArg Optional calling context of pureFn
13551 * @returns value
13552 *
13553 * @codeGenApi
13554 */
13555export declare function ɵɵpureFunction0<T>(slotOffset: number, pureFn: () => T, thisArg?: any): T;
13556
13557/**
13558 * If the value of the provided exp has changed, calls the pure function to return
13559 * an updated value. Or if the value has not changed, returns cached value.
13560 *
13561 * @param slotOffset the offset from binding root to the reserved slot
13562 * @param pureFn Function that returns an updated value
13563 * @param exp Updated expression value
13564 * @param thisArg Optional calling context of pureFn
13565 * @returns Updated or cached value
13566 *
13567 * @codeGenApi
13568 */
13569export declare function ɵɵpureFunction1(slotOffset: number, pureFn: (v: any) => any, exp: any, thisArg?: any): any;
13570
13571/**
13572 * If the value of any provided exp has changed, calls the pure function to return
13573 * an updated value. Or if no values have changed, returns cached value.
13574 *
13575 * @param slotOffset the offset from binding root to the reserved slot
13576 * @param pureFn
13577 * @param exp1
13578 * @param exp2
13579 * @param thisArg Optional calling context of pureFn
13580 * @returns Updated or cached value
13581 *
13582 * @codeGenApi
13583 */
13584export declare function ɵɵpureFunction2(slotOffset: number, pureFn: (v1: any, v2: any) => any, exp1: any, exp2: any, thisArg?: any): any;
13585
13586/**
13587 * If the value of any provided exp has changed, calls the pure function to return
13588 * an updated value. Or if no values have changed, returns cached value.
13589 *
13590 * @param slotOffset the offset from binding root to the reserved slot
13591 * @param pureFn
13592 * @param exp1
13593 * @param exp2
13594 * @param exp3
13595 * @param thisArg Optional calling context of pureFn
13596 * @returns Updated or cached value
13597 *
13598 * @codeGenApi
13599 */
13600export declare function ɵɵpureFunction3(slotOffset: number, pureFn: (v1: any, v2: any, v3: any) => any, exp1: any, exp2: any, exp3: any, thisArg?: any): any;
13601
13602/**
13603 * If the value of any provided exp has changed, calls the pure function to return
13604 * an updated value. Or if no values have changed, returns cached value.
13605 *
13606 * @param slotOffset the offset from binding root to the reserved slot
13607 * @param pureFn
13608 * @param exp1
13609 * @param exp2
13610 * @param exp3
13611 * @param exp4
13612 * @param thisArg Optional calling context of pureFn
13613 * @returns Updated or cached value
13614 *
13615 * @codeGenApi
13616 */
13617export 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;
13618
13619/**
13620 * If the value of any provided exp has changed, calls the pure function to return
13621 * an updated value. Or if no values have changed, returns cached value.
13622 *
13623 * @param slotOffset the offset from binding root to the reserved slot
13624 * @param pureFn
13625 * @param exp1
13626 * @param exp2
13627 * @param exp3
13628 * @param exp4
13629 * @param exp5
13630 * @param thisArg Optional calling context of pureFn
13631 * @returns Updated or cached value
13632 *
13633 * @codeGenApi
13634 */
13635export 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;
13636
13637/**
13638 * If the value of any provided exp has changed, calls the pure function to return
13639 * an updated value. Or if no values have changed, returns cached value.
13640 *
13641 * @param slotOffset the offset from binding root to the reserved slot
13642 * @param pureFn
13643 * @param exp1
13644 * @param exp2
13645 * @param exp3
13646 * @param exp4
13647 * @param exp5
13648 * @param exp6
13649 * @param thisArg Optional calling context of pureFn
13650 * @returns Updated or cached value
13651 *
13652 * @codeGenApi
13653 */
13654export 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;
13655
13656/**
13657 * If the value of any provided exp has changed, calls the pure function to return
13658 * an updated value. Or if no values have changed, returns cached value.
13659 *
13660 * @param slotOffset the offset from binding root to the reserved slot
13661 * @param pureFn
13662 * @param exp1
13663 * @param exp2
13664 * @param exp3
13665 * @param exp4
13666 * @param exp5
13667 * @param exp6
13668 * @param exp7
13669 * @param thisArg Optional calling context of pureFn
13670 * @returns Updated or cached value
13671 *
13672 * @codeGenApi
13673 */
13674export 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;
13675
13676/**
13677 * If the value of any provided exp has changed, calls the pure function to return
13678 * an updated value. Or if no values have changed, returns cached value.
13679 *
13680 * @param slotOffset the offset from binding root to the reserved slot
13681 * @param pureFn
13682 * @param exp1
13683 * @param exp2
13684 * @param exp3
13685 * @param exp4
13686 * @param exp5
13687 * @param exp6
13688 * @param exp7
13689 * @param exp8
13690 * @param thisArg Optional calling context of pureFn
13691 * @returns Updated or cached value
13692 *
13693 * @codeGenApi
13694 */
13695export 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;
13696
13697/**
13698 * pureFunction instruction that can support any number of bindings.
13699 *
13700 * If the value of any provided exp has changed, calls the pure function to return
13701 * an updated value. Or if no values have changed, returns cached value.
13702 *
13703 * @param slotOffset the offset from binding root to the reserved slot
13704 * @param pureFn A pure function that takes binding values and builds an object or array
13705 * containing those values.
13706 * @param exps An array of binding values
13707 * @param thisArg Optional calling context of pureFn
13708 * @returns Updated or cached value
13709 *
13710 * @codeGenApi
13711 */
13712export declare function ɵɵpureFunctionV(slotOffset: number, pureFn: (...v: any[]) => any, exps: any[], thisArg?: any): any;
13713
13714/**
13715 * Refreshes a query by combining matches from all active views and removing matches from deleted
13716 * views.
13717 *
13718 * @returns `true` if a query got dirty during change detection or if this is a static query
13719 * resolving in creation mode, `false` otherwise.
13720 *
13721 * @codeGenApi
13722 */
13723export declare function ɵɵqueryRefresh(queryList: QueryList<any>): boolean;
13724
13725/**
13726 * Retrieves a local reference from the current contextViewData.
13727 *
13728 * If the reference to retrieve is in a parent view, this instruction is used in conjunction
13729 * with a nextContext() call, which walks up the tree and updates the contextViewData instance.
13730 *
13731 * @param index The index of the local ref in contextViewData.
13732 *
13733 * @codeGenApi
13734 */
13735export declare function ɵɵreference<T>(index: number): T;
13736
13737/**
13738 * Adds the given NgModule type to Angular's NgModule registry.
13739 *
13740 * This is generated as a side-effect of NgModule compilation. Note that the `id` is passed in
13741 * explicitly and not read from the NgModule definition. This is for two reasons: it avoids a
13742 * megamorphic read, and in JIT there's a chicken-and-egg problem where the NgModule may not be
13743 * fully resolved when it's registered.
13744 *
13745 * @codeGenApi
13746 */
13747export declare function ɵɵregisterNgModuleType(ngModuleType: ɵNgModuleType, id: string): void;
13748
13749/**
13750 * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in
13751 * value so that it can be used as a return value of an instruction.
13752 *
13753 * @codeGenApi
13754 */
13755export declare function ɵɵresetView<T>(value?: T): T | undefined;
13756
13757/**
13758 *
13759 * @codeGenApi
13760 */
13761export declare function ɵɵresolveBody(element: RElement & {
13762 ownerDocument: Document;
13763}): HTMLElement;
13764
13765/**
13766 *
13767 * @codeGenApi
13768 */
13769export declare function ɵɵresolveDocument(element: RElement & {
13770 ownerDocument: Document;
13771}): Document;
13772
13773/**
13774 *
13775 * @codeGenApi
13776 */
13777export declare function ɵɵresolveWindow(element: RElement & {
13778 ownerDocument: Document;
13779}): (Window & typeof globalThis) | null;
13780
13781/**
13782 * Restores `contextViewData` to the given OpaqueViewState instance.
13783 *
13784 * Used in conjunction with the getCurrentView() instruction to save a snapshot
13785 * of the current view and restore it when listeners are invoked. This allows
13786 * walking the declaration view tree in listeners to get vars from parent views.
13787 *
13788 * @param viewToRestore The OpaqueViewState instance to restore.
13789 * @returns Context of the restored OpaqueViewState instance.
13790 *
13791 * @codeGenApi
13792 */
13793export declare function ɵɵrestoreView<T = any>(viewToRestore: OpaqueViewState): T;
13794
13795/**
13796 * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing
13797 * dangerous content.
13798 *
13799 * This method parses the `html` and locates potentially dangerous content (such as urls and
13800 * javascript) and removes it.
13801 *
13802 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.
13803 *
13804 * @param unsafeHtml untrusted `html`, typically from the user.
13805 * @returns `html` string which is safe to display to user, because all of the dangerous javascript
13806 * and urls have been removed.
13807 *
13808 * @codeGenApi
13809 */
13810export declare function ɵɵsanitizeHtml(unsafeHtml: any): TrustedHTML | string;
13811
13812/**
13813 * A `url` sanitizer which only lets trusted `url`s through.
13814 *
13815 * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.
13816 *
13817 * @param unsafeResourceUrl untrusted `url`, typically from the user.
13818 * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
13819 * only trusted `url`s have been allowed to pass.
13820 *
13821 * @codeGenApi
13822 */
13823export declare function ɵɵsanitizeResourceUrl(unsafeResourceUrl: any): TrustedScriptURL | string;
13824
13825/**
13826 * A `script` sanitizer which only lets trusted javascript through.
13827 *
13828 * This passes only `script`s marked trusted by calling {@link
13829 * bypassSanitizationTrustScript}.
13830 *
13831 * @param unsafeScript untrusted `script`, typically from the user.
13832 * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,
13833 * because only trusted `scripts` have been allowed to pass.
13834 *
13835 * @codeGenApi
13836 */
13837export declare function ɵɵsanitizeScript(unsafeScript: any): TrustedScript | string;
13838
13839/**
13840 * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing
13841 * dangerous content.
13842 *
13843 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.
13844 *
13845 * @param unsafeStyle untrusted `style`, typically from the user.
13846 * @returns `style` string which is safe to bind to the `style` properties.
13847 *
13848 * @codeGenApi
13849 */
13850export declare function ɵɵsanitizeStyle(unsafeStyle: any): string;
13851
13852/**
13853 * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing
13854 * dangerous
13855 * content.
13856 *
13857 * This method parses the `url` and locates potentially dangerous content (such as javascript) and
13858 * removes it.
13859 *
13860 * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.
13861 *
13862 * @param unsafeUrl untrusted `url`, typically from the user.
13863 * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because
13864 * all of the dangerous javascript has been removed.
13865 *
13866 * @codeGenApi
13867 */
13868export declare function ɵɵsanitizeUrl(unsafeUrl: any): string;
13869
13870/**
13871 * Sanitizes URL, selecting sanitizer function based on tag and property names.
13872 *
13873 * This function is used in case we can't define security context at compile time, when only prop
13874 * name is available. This happens when we generate host bindings for Directives/Components. The
13875 * host element is unknown at compile time, so we defer calculation of specific sanitizer to
13876 * runtime.
13877 *
13878 * @param unsafeUrl untrusted `url`, typically from the user.
13879 * @param tag target element tag name.
13880 * @param prop name of the property that contains the value.
13881 * @returns `url` string which is safe to bind.
13882 *
13883 * @codeGenApi
13884 */
13885export declare function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl: any, tag: string, prop: string): any;
13886
13887/**
13888 * Generated next to NgModules to monkey-patch directive and pipe references onto a component's
13889 * definition, when generating a direct reference in the component file would otherwise create an
13890 * import cycle.
13891 *
13892 * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.
13893 *
13894 * @codeGenApi
13895 */
13896export declare function ɵɵsetComponentScope(type: ɵComponentType<any>, directives: Type<any>[] | (() => Type<any>[]), pipes: Type<any>[] | (() => Type<any>[])): void;
13897
13898/**
13899 * Adds the module metadata that is necessary to compute the module's transitive scope to an
13900 * existing module definition.
13901 *
13902 * Scope metadata of modules is not used in production builds, so calls to this function can be
13903 * marked pure to tree-shake it from the bundle, allowing for all referenced declarations
13904 * to become eligible for tree-shaking as well.
13905 *
13906 * @codeGenApi
13907 */
13908export declare function ɵɵsetNgModuleScope(type: any, scope: {
13909 /** List of components, directives, and pipes declared by this module. */
13910 declarations?: Type<any>[] | (() => Type<any>[]);
13911 /** List of modules or `ModuleWithProviders` imported by this module. */
13912 imports?: Type<any>[] | (() => Type<any>[]);
13913 /**
13914 * List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
13915 * module.
13916 */
13917 exports?: Type<any>[] | (() => Type<any>[]);
13918}): unknown;
13919
13920/**
13921 * A feature that acts as a setup code for the {@link StandaloneService}.
13922 *
13923 * The most important responsibility of this feature is to expose the "getStandaloneInjector"
13924 * function (an entry points to a standalone injector creation) on a component definition object. We
13925 * go through the features infrastructure to make sure that the standalone injector creation logic
13926 * is tree-shakable and not included in applications that don't use standalone components.
13927 *
13928 * @codeGenApi
13929 */
13930export declare function ɵɵStandaloneFeature(definition: ɵComponentDef<unknown>): void;
13931
13932/**
13933 * Update style bindings using an object literal on an element.
13934 *
13935 * This instruction is meant to apply styling via the `[style]="exp"` template bindings.
13936 * When styles are applied to the element they will then be updated with respect to
13937 * any styles/classes set via `styleProp`. If any styles are set to falsy
13938 * then they will be removed from the element.
13939 *
13940 * Note that the styling instruction will not be applied until `stylingApply` is called.
13941 *
13942 * @param styles A key/value style map of the styles that will be applied to the given element.
13943 * Any missing styles (that have already been applied to the element beforehand) will be
13944 * removed (unset) from the element's styling.
13945 *
13946 * Note that this will apply the provided styleMap value to the host element if this function
13947 * is called within a host binding.
13948 *
13949 * @codeGenApi
13950 */
13951export declare function ɵɵstyleMap(styles: {
13952 [styleName: string]: any;
13953} | string | undefined | null): void;
13954
13955
13956/**
13957 *
13958 * Update an interpolated style on an element with single bound value surrounded by text.
13959 *
13960 * Used when the value passed to a property has 1 interpolated value in it:
13961 *
13962 * ```html
13963 * <div style="key: {{v0}}suffix"></div>
13964 * ```
13965 *
13966 * Its compiled representation is:
13967 *
13968 * ```ts
13969 * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');
13970 * ```
13971 *
13972 * @param prefix Static value used for concatenation only.
13973 * @param v0 Value checked for change.
13974 * @param suffix Static value used for concatenation only.
13975 * @codeGenApi
13976 */
13977export declare function ɵɵstyleMapInterpolate1(prefix: string, v0: any, suffix: string): void;
13978
13979/**
13980 *
13981 * Update an interpolated style on an element with 2 bound values surrounded by text.
13982 *
13983 * Used when the value passed to a property has 2 interpolated values in it:
13984 *
13985 * ```html
13986 * <div style="key: {{v0}}; key1: {{v1}}suffix"></div>
13987 * ```
13988 *
13989 * Its compiled representation is:
13990 *
13991 * ```ts
13992 * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');
13993 * ```
13994 *
13995 * @param prefix Static value used for concatenation only.
13996 * @param v0 Value checked for change.
13997 * @param i0 Static value used for concatenation only.
13998 * @param v1 Value checked for change.
13999 * @param suffix Static value used for concatenation only.
14000 * @codeGenApi
14001 */
14002export declare function ɵɵstyleMapInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): void;
14003
14004/**
14005 *
14006 * Update an interpolated style on an element with 3 bound values surrounded by text.
14007 *
14008 * Used when the value passed to a property has 3 interpolated values in it:
14009 *
14010 * ```html
14011 * <div style="key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix"></div>
14012 * ```
14013 *
14014 * Its compiled representation is:
14015 *
14016 * ```ts
14017 * ɵɵstyleMapInterpolate3(
14018 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');
14019 * ```
14020 *
14021 * @param prefix Static value used for concatenation only.
14022 * @param v0 Value checked for change.
14023 * @param i0 Static value used for concatenation only.
14024 * @param v1 Value checked for change.
14025 * @param i1 Static value used for concatenation only.
14026 * @param v2 Value checked for change.
14027 * @param suffix Static value used for concatenation only.
14028 * @codeGenApi
14029 */
14030export declare function ɵɵstyleMapInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): void;
14031
14032/**
14033 *
14034 * Update an interpolated style on an element with 4 bound values surrounded by text.
14035 *
14036 * Used when the value passed to a property has 4 interpolated values in it:
14037 *
14038 * ```html
14039 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix"></div>
14040 * ```
14041 *
14042 * Its compiled representation is:
14043 *
14044 * ```ts
14045 * ɵɵstyleMapInterpolate4(
14046 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');
14047 * ```
14048 *
14049 * @param prefix Static value used for concatenation only.
14050 * @param v0 Value checked for change.
14051 * @param i0 Static value used for concatenation only.
14052 * @param v1 Value checked for change.
14053 * @param i1 Static value used for concatenation only.
14054 * @param v2 Value checked for change.
14055 * @param i2 Static value used for concatenation only.
14056 * @param v3 Value checked for change.
14057 * @param suffix Static value used for concatenation only.
14058 * @codeGenApi
14059 */
14060export declare function ɵɵstyleMapInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): void;
14061
14062/**
14063 *
14064 * Update an interpolated style on an element with 5 bound values surrounded by text.
14065 *
14066 * Used when the value passed to a property has 5 interpolated values in it:
14067 *
14068 * ```html
14069 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix"></div>
14070 * ```
14071 *
14072 * Its compiled representation is:
14073 *
14074 * ```ts
14075 * ɵɵstyleMapInterpolate5(
14076 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');
14077 * ```
14078 *
14079 * @param prefix Static value used for concatenation only.
14080 * @param v0 Value checked for change.
14081 * @param i0 Static value used for concatenation only.
14082 * @param v1 Value checked for change.
14083 * @param i1 Static value used for concatenation only.
14084 * @param v2 Value checked for change.
14085 * @param i2 Static value used for concatenation only.
14086 * @param v3 Value checked for change.
14087 * @param i3 Static value used for concatenation only.
14088 * @param v4 Value checked for change.
14089 * @param suffix Static value used for concatenation only.
14090 * @codeGenApi
14091 */
14092export 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;
14093
14094/**
14095 *
14096 * Update an interpolated style on an element with 6 bound values surrounded by text.
14097 *
14098 * Used when the value passed to a property has 6 interpolated values in it:
14099 *
14100 * ```html
14101 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};
14102 * key5: {{v5}}suffix"></div>
14103 * ```
14104 *
14105 * Its compiled representation is:
14106 *
14107 * ```ts
14108 * ɵɵstyleMapInterpolate6(
14109 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
14110 * 'suffix');
14111 * ```
14112 *
14113 * @param prefix Static value used for concatenation only.
14114 * @param v0 Value checked for change.
14115 * @param i0 Static value used for concatenation only.
14116 * @param v1 Value checked for change.
14117 * @param i1 Static value used for concatenation only.
14118 * @param v2 Value checked for change.
14119 * @param i2 Static value used for concatenation only.
14120 * @param v3 Value checked for change.
14121 * @param i3 Static value used for concatenation only.
14122 * @param v4 Value checked for change.
14123 * @param i4 Static value used for concatenation only.
14124 * @param v5 Value checked for change.
14125 * @param suffix Static value used for concatenation only.
14126 * @codeGenApi
14127 */
14128export 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;
14129
14130/**
14131 *
14132 * Update an interpolated style on an element with 7 bound values surrounded by text.
14133 *
14134 * Used when the value passed to a property has 7 interpolated values in it:
14135 *
14136 * ```html
14137 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
14138 * key6: {{v6}}suffix"></div>
14139 * ```
14140 *
14141 * Its compiled representation is:
14142 *
14143 * ```ts
14144 * ɵɵstyleMapInterpolate7(
14145 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
14146 * '; key6: ', v6, 'suffix');
14147 * ```
14148 *
14149 * @param prefix Static value used for concatenation only.
14150 * @param v0 Value checked for change.
14151 * @param i0 Static value used for concatenation only.
14152 * @param v1 Value checked for change.
14153 * @param i1 Static value used for concatenation only.
14154 * @param v2 Value checked for change.
14155 * @param i2 Static value used for concatenation only.
14156 * @param v3 Value checked for change.
14157 * @param i3 Static value used for concatenation only.
14158 * @param v4 Value checked for change.
14159 * @param i4 Static value used for concatenation only.
14160 * @param v5 Value checked for change.
14161 * @param i5 Static value used for concatenation only.
14162 * @param v6 Value checked for change.
14163 * @param suffix Static value used for concatenation only.
14164 * @codeGenApi
14165 */
14166export 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;
14167
14168/**
14169 *
14170 * Update an interpolated style on an element with 8 bound values surrounded by text.
14171 *
14172 * Used when the value passed to a property has 8 interpolated values in it:
14173 *
14174 * ```html
14175 * <div style="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
14176 * key6: {{v6}}; key7: {{v7}}suffix"></div>
14177 * ```
14178 *
14179 * Its compiled representation is:
14180 *
14181 * ```ts
14182 * ɵɵstyleMapInterpolate8(
14183 * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
14184 * '; key6: ', v6, '; key7: ', v7, 'suffix');
14185 * ```
14186 *
14187 * @param prefix Static value used for concatenation only.
14188 * @param v0 Value checked for change.
14189 * @param i0 Static value used for concatenation only.
14190 * @param v1 Value checked for change.
14191 * @param i1 Static value used for concatenation only.
14192 * @param v2 Value checked for change.
14193 * @param i2 Static value used for concatenation only.
14194 * @param v3 Value checked for change.
14195 * @param i3 Static value used for concatenation only.
14196 * @param v4 Value checked for change.
14197 * @param i4 Static value used for concatenation only.
14198 * @param v5 Value checked for change.
14199 * @param i5 Static value used for concatenation only.
14200 * @param v6 Value checked for change.
14201 * @param i6 Static value used for concatenation only.
14202 * @param v7 Value checked for change.
14203 * @param suffix Static value used for concatenation only.
14204 * @codeGenApi
14205 */
14206export 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;
14207
14208/**
14209 * Update an interpolated style on an element with 9 or more bound values surrounded by text.
14210 *
14211 * Used when the number of interpolated values exceeds 8.
14212 *
14213 * ```html
14214 * <div
14215 * class="key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};
14216 * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix"></div>
14217 * ```
14218 *
14219 * Its compiled representation is:
14220 *
14221 * ```ts
14222 * ɵɵstyleMapInterpolateV(
14223 * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,
14224 * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);
14225 * ```
14226 *.
14227 * @param values The collection of values and the strings in-between those values, beginning with
14228 * a string prefix and ending with a string suffix.
14229 * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)
14230 * @codeGenApi
14231 */
14232export declare function ɵɵstyleMapInterpolateV(values: any[]): void;
14233
14234/**
14235 * Update a style binding on an element with the provided value.
14236 *
14237 * If the style value is falsy then it will be removed from the element
14238 * (or assigned a different value depending if there are any styles placed
14239 * on the element with `styleMap` or any static styles that are
14240 * present from when the element was created with `styling`).
14241 *
14242 * Note that the styling element is updated as part of `stylingApply`.
14243 *
14244 * @param prop A valid CSS property.
14245 * @param value New value to write (`null` or an empty string to remove).
14246 * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.
14247 *
14248 * Note that this will apply the provided style value to the host element if this function is called
14249 * within a host binding function.
14250 *
14251 * @codeGenApi
14252 */
14253export declare function ɵɵstyleProp(prop: string, value: string | number | ɵSafeValue | undefined | null, suffix?: string | null): typeof ɵɵstyleProp;
14254
14255
14256/**
14257 *
14258 * Update an interpolated style property on an element with single bound value surrounded by text.
14259 *
14260 * Used when the value passed to a property has 1 interpolated value in it:
14261 *
14262 * ```html
14263 * <div style.color="prefix{{v0}}suffix"></div>
14264 * ```
14265 *
14266 * Its compiled representation is:
14267 *
14268 * ```ts
14269 * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');
14270 * ```
14271 *
14272 * @param styleIndex Index of style to update. This index value refers to the
14273 * index of the style in the style bindings array that was passed into
14274 * `styling`.
14275 * @param prefix Static value used for concatenation only.
14276 * @param v0 Value checked for change.
14277 * @param suffix Static value used for concatenation only.
14278 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14279 * @returns itself, so that it may be chained.
14280 * @codeGenApi
14281 */
14282export declare function ɵɵstylePropInterpolate1(prop: string, prefix: string, v0: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate1;
14283
14284/**
14285 *
14286 * Update an interpolated style property on an element with 2 bound values surrounded by text.
14287 *
14288 * Used when the value passed to a property has 2 interpolated values in it:
14289 *
14290 * ```html
14291 * <div style.color="prefix{{v0}}-{{v1}}suffix"></div>
14292 * ```
14293 *
14294 * Its compiled representation is:
14295 *
14296 * ```ts
14297 * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');
14298 * ```
14299 *
14300 * @param styleIndex Index of style to update. This index value refers to the
14301 * index of the style in the style bindings array that was passed into
14302 * `styling`.
14303 * @param prefix Static value used for concatenation only.
14304 * @param v0 Value checked for change.
14305 * @param i0 Static value used for concatenation only.
14306 * @param v1 Value checked for change.
14307 * @param suffix Static value used for concatenation only.
14308 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14309 * @returns itself, so that it may be chained.
14310 * @codeGenApi
14311 */
14312export declare function ɵɵstylePropInterpolate2(prop: string, prefix: string, v0: any, i0: string, v1: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate2;
14313
14314/**
14315 *
14316 * Update an interpolated style property on an element with 3 bound values surrounded by text.
14317 *
14318 * Used when the value passed to a property has 3 interpolated values in it:
14319 *
14320 * ```html
14321 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}suffix"></div>
14322 * ```
14323 *
14324 * Its compiled representation is:
14325 *
14326 * ```ts
14327 * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');
14328 * ```
14329 *
14330 * @param styleIndex Index of style to update. This index value refers to the
14331 * index of the style in the style bindings array that was passed into
14332 * `styling`.
14333 * @param prefix Static value used for concatenation only.
14334 * @param v0 Value checked for change.
14335 * @param i0 Static value used for concatenation only.
14336 * @param v1 Value checked for change.
14337 * @param i1 Static value used for concatenation only.
14338 * @param v2 Value checked for change.
14339 * @param suffix Static value used for concatenation only.
14340 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14341 * @returns itself, so that it may be chained.
14342 * @codeGenApi
14343 */
14344export declare function ɵɵstylePropInterpolate3(prop: string, prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string, valueSuffix?: string | null): typeof ɵɵstylePropInterpolate3;
14345
14346/**
14347 *
14348 * Update an interpolated style property on an element with 4 bound values surrounded by text.
14349 *
14350 * Used when the value passed to a property has 4 interpolated values in it:
14351 *
14352 * ```html
14353 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix"></div>
14354 * ```
14355 *
14356 * Its compiled representation is:
14357 *
14358 * ```ts
14359 * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
14360 * ```
14361 *
14362 * @param styleIndex Index of style to update. This index value refers to the
14363 * index of the style in the style bindings array that was passed into
14364 * `styling`.
14365 * @param prefix Static value used for concatenation only.
14366 * @param v0 Value checked for change.
14367 * @param i0 Static value used for concatenation only.
14368 * @param v1 Value checked for change.
14369 * @param i1 Static value used for concatenation only.
14370 * @param v2 Value checked for change.
14371 * @param i2 Static value used for concatenation only.
14372 * @param v3 Value checked for change.
14373 * @param suffix Static value used for concatenation only.
14374 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14375 * @returns itself, so that it may be chained.
14376 * @codeGenApi
14377 */
14378export 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;
14379
14380/**
14381 *
14382 * Update an interpolated style property on an element with 5 bound values surrounded by text.
14383 *
14384 * Used when the value passed to a property has 5 interpolated values in it:
14385 *
14386 * ```html
14387 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix"></div>
14388 * ```
14389 *
14390 * Its compiled representation is:
14391 *
14392 * ```ts
14393 * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
14394 * ```
14395 *
14396 * @param styleIndex Index of style to update. This index value refers to the
14397 * index of the style in the style bindings array that was passed into
14398 * `styling`.
14399 * @param prefix Static value used for concatenation only.
14400 * @param v0 Value checked for change.
14401 * @param i0 Static value used for concatenation only.
14402 * @param v1 Value checked for change.
14403 * @param i1 Static value used for concatenation only.
14404 * @param v2 Value checked for change.
14405 * @param i2 Static value used for concatenation only.
14406 * @param v3 Value checked for change.
14407 * @param i3 Static value used for concatenation only.
14408 * @param v4 Value checked for change.
14409 * @param suffix Static value used for concatenation only.
14410 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14411 * @returns itself, so that it may be chained.
14412 * @codeGenApi
14413 */
14414export 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;
14415
14416/**
14417 *
14418 * Update an interpolated style property on an element with 6 bound values surrounded by text.
14419 *
14420 * Used when the value passed to a property has 6 interpolated values in it:
14421 *
14422 * ```html
14423 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix"></div>
14424 * ```
14425 *
14426 * Its compiled representation is:
14427 *
14428 * ```ts
14429 * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
14430 * ```
14431 *
14432 * @param styleIndex Index of style to update. This index value refers to the
14433 * index of the style in the style bindings array that was passed into
14434 * `styling`.
14435 * @param prefix Static value used for concatenation only.
14436 * @param v0 Value checked for change.
14437 * @param i0 Static value used for concatenation only.
14438 * @param v1 Value checked for change.
14439 * @param i1 Static value used for concatenation only.
14440 * @param v2 Value checked for change.
14441 * @param i2 Static value used for concatenation only.
14442 * @param v3 Value checked for change.
14443 * @param i3 Static value used for concatenation only.
14444 * @param v4 Value checked for change.
14445 * @param i4 Static value used for concatenation only.
14446 * @param v5 Value checked for change.
14447 * @param suffix Static value used for concatenation only.
14448 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14449 * @returns itself, so that it may be chained.
14450 * @codeGenApi
14451 */
14452export 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;
14453
14454/**
14455 *
14456 * Update an interpolated style property on an element with 7 bound values surrounded by text.
14457 *
14458 * Used when the value passed to a property has 7 interpolated values in it:
14459 *
14460 * ```html
14461 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix"></div>
14462 * ```
14463 *
14464 * Its compiled representation is:
14465 *
14466 * ```ts
14467 * ɵɵstylePropInterpolate7(
14468 * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
14469 * ```
14470 *
14471 * @param styleIndex Index of style to update. This index value refers to the
14472 * index of the style in the style bindings array that was passed into
14473 * `styling`.
14474 * @param prefix Static value used for concatenation only.
14475 * @param v0 Value checked for change.
14476 * @param i0 Static value used for concatenation only.
14477 * @param v1 Value checked for change.
14478 * @param i1 Static value used for concatenation only.
14479 * @param v2 Value checked for change.
14480 * @param i2 Static value used for concatenation only.
14481 * @param v3 Value checked for change.
14482 * @param i3 Static value used for concatenation only.
14483 * @param v4 Value checked for change.
14484 * @param i4 Static value used for concatenation only.
14485 * @param v5 Value checked for change.
14486 * @param i5 Static value used for concatenation only.
14487 * @param v6 Value checked for change.
14488 * @param suffix Static value used for concatenation only.
14489 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14490 * @returns itself, so that it may be chained.
14491 * @codeGenApi
14492 */
14493export 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;
14494
14495/**
14496 *
14497 * Update an interpolated style property on an element with 8 bound values surrounded by text.
14498 *
14499 * Used when the value passed to a property has 8 interpolated values in it:
14500 *
14501 * ```html
14502 * <div style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix"></div>
14503 * ```
14504 *
14505 * Its compiled representation is:
14506 *
14507 * ```ts
14508 * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,
14509 * '-', v7, 'suffix');
14510 * ```
14511 *
14512 * @param styleIndex Index of style to update. This index value refers to the
14513 * index of the style in the style bindings array that was passed into
14514 * `styling`.
14515 * @param prefix Static value used for concatenation only.
14516 * @param v0 Value checked for change.
14517 * @param i0 Static value used for concatenation only.
14518 * @param v1 Value checked for change.
14519 * @param i1 Static value used for concatenation only.
14520 * @param v2 Value checked for change.
14521 * @param i2 Static value used for concatenation only.
14522 * @param v3 Value checked for change.
14523 * @param i3 Static value used for concatenation only.
14524 * @param v4 Value checked for change.
14525 * @param i4 Static value used for concatenation only.
14526 * @param v5 Value checked for change.
14527 * @param i5 Static value used for concatenation only.
14528 * @param v6 Value checked for change.
14529 * @param i6 Static value used for concatenation only.
14530 * @param v7 Value checked for change.
14531 * @param suffix Static value used for concatenation only.
14532 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14533 * @returns itself, so that it may be chained.
14534 * @codeGenApi
14535 */
14536export 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;
14537
14538/**
14539 * Update an interpolated style property on an element with 9 or more bound values surrounded by
14540 * text.
14541 *
14542 * Used when the number of interpolated values exceeds 8.
14543 *
14544 * ```html
14545 * <div
14546 * style.color="prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix">
14547 * </div>
14548 * ```
14549 *
14550 * Its compiled representation is:
14551 *
14552 * ```ts
14553 * ɵɵstylePropInterpolateV(
14554 * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
14555 * 'suffix']);
14556 * ```
14557 *
14558 * @param styleIndex Index of style to update. This index value refers to the
14559 * index of the style in the style bindings array that was passed into
14560 * `styling`..
14561 * @param values The collection of values and the strings in-between those values, beginning with
14562 * a string prefix and ending with a string suffix.
14563 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
14564 * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.
14565 * @returns itself, so that it may be chained.
14566 * @codeGenApi
14567 */
14568export declare function ɵɵstylePropInterpolateV(prop: string, values: any[], valueSuffix?: string | null): typeof ɵɵstylePropInterpolateV;
14569
14570/**
14571 * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.
14572 *
14573 * This instruction is for compatibility purposes and is designed to ensure that a
14574 * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered
14575 * in the component's renderer. Normally all host listeners are evaluated with the
14576 * parent component's renderer, but, in the case of animation @triggers, they need
14577 * to be evaluated with the sub component's renderer (because that's where the
14578 * animation triggers are defined).
14579 *
14580 * Do not use this instruction as a replacement for `listener`. This instruction
14581 * only exists to ensure compatibility with the ViewEngine's host binding behavior.
14582 *
14583 * @param eventName Name of the event
14584 * @param listenerFn The function to be called when event emits
14585 * @param useCapture Whether or not to use capture in event listener
14586 * @param eventTargetResolver Function that returns global target information in case this listener
14587 * should be attached to a global object like window, document or body
14588 *
14589 * @codeGenApi
14590 */
14591export declare function ɵɵsyntheticHostListener(eventName: string, listenerFn: (e?: any) => any): typeof ɵɵsyntheticHostListener;
14592
14593/**
14594 * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.
14595 *
14596 * This instruction is for compatibility purposes and is designed to ensure that a
14597 * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in
14598 * the component's renderer. Normally all host bindings are evaluated with the parent
14599 * component's renderer, but, in the case of animation @triggers, they need to be
14600 * evaluated with the sub component's renderer (because that's where the animation
14601 * triggers are defined).
14602 *
14603 * Do not use this instruction as a replacement for `elementProperty`. This instruction
14604 * only exists to ensure compatibility with the ViewEngine's host binding behavior.
14605 *
14606 * @param index The index of the element to update in the data array
14607 * @param propName Name of property. Because it is going to DOM, this is not subject to
14608 * renaming as part of minification.
14609 * @param value New value to write.
14610 * @param sanitizer An optional function used to sanitize the value.
14611 *
14612 * @codeGenApi
14613 */
14614export declare function ɵɵsyntheticHostProperty<T>(propName: string, value: T | ɵNO_CHANGE, sanitizer?: SanitizerFn | null): typeof ɵɵsyntheticHostProperty;
14615
14616/**
14617 * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.
14618 *
14619 * <ng-template #foo>
14620 * <div></div>
14621 * </ng-template>
14622 *
14623 * @param index The index of the container in the data array
14624 * @param templateFn Inline template
14625 * @param decls The number of nodes, local refs, and pipes for this template
14626 * @param vars The number of bindings for this template
14627 * @param tagName The name of the container element, if applicable
14628 * @param attrsIndex Index of template attributes in the `consts` array.
14629 * @param localRefs Index of the local references in the `consts` array.
14630 * @param localRefExtractor A function which extracts local-refs values from the template.
14631 * Defaults to the current element associated with the local-ref.
14632 *
14633 * @codeGenApi
14634 */
14635export 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;
14636
14637/**
14638 * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the
14639 * `<ng-template>` element.
14640 *
14641 * @codeGenApi
14642 */
14643export declare function ɵɵtemplateRefExtractor(tNode: TNode, lView: LView): TemplateRef<any> | null;
14644
14645/**
14646 * Create static text node
14647 *
14648 * @param index Index of the node in the data array
14649 * @param value Static string value to write.
14650 *
14651 * @codeGenApi
14652 */
14653export declare function ɵɵtext(index: number, value?: string): void;
14654
14655/**
14656 *
14657 * Update text content with a lone bound value
14658 *
14659 * Used when a text node has 1 interpolated value in it, an no additional text
14660 * surrounds that interpolated value:
14661 *
14662 * ```html
14663 * <div>{{v0}}</div>
14664 * ```
14665 *
14666 * Its compiled representation is:
14667 *
14668 * ```ts
14669 * ɵɵtextInterpolate(v0);
14670 * ```
14671 * @returns itself, so that it may be chained.
14672 * @see textInterpolateV
14673 * @codeGenApi
14674 */
14675export declare function ɵɵtextInterpolate(v0: any): typeof ɵɵtextInterpolate;
14676
14677/**
14678 *
14679 * Update text content with single bound value surrounded by other text.
14680 *
14681 * Used when a text node has 1 interpolated value in it:
14682 *
14683 * ```html
14684 * <div>prefix{{v0}}suffix</div>
14685 * ```
14686 *
14687 * Its compiled representation is:
14688 *
14689 * ```ts
14690 * ɵɵtextInterpolate1('prefix', v0, 'suffix');
14691 * ```
14692 * @returns itself, so that it may be chained.
14693 * @see textInterpolateV
14694 * @codeGenApi
14695 */
14696export declare function ɵɵtextInterpolate1(prefix: string, v0: any, suffix: string): typeof ɵɵtextInterpolate1;
14697
14698/**
14699 *
14700 * Update text content with 2 bound values surrounded by other text.
14701 *
14702 * Used when a text node has 2 interpolated values in it:
14703 *
14704 * ```html
14705 * <div>prefix{{v0}}-{{v1}}suffix</div>
14706 * ```
14707 *
14708 * Its compiled representation is:
14709 *
14710 * ```ts
14711 * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');
14712 * ```
14713 * @returns itself, so that it may be chained.
14714 * @see textInterpolateV
14715 * @codeGenApi
14716 */
14717export declare function ɵɵtextInterpolate2(prefix: string, v0: any, i0: string, v1: any, suffix: string): typeof ɵɵtextInterpolate2;
14718
14719/**
14720 *
14721 * Update text content with 3 bound values surrounded by other text.
14722 *
14723 * Used when a text node has 3 interpolated values in it:
14724 *
14725 * ```html
14726 * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>
14727 * ```
14728 *
14729 * Its compiled representation is:
14730 *
14731 * ```ts
14732 * ɵɵtextInterpolate3(
14733 * 'prefix', v0, '-', v1, '-', v2, 'suffix');
14734 * ```
14735 * @returns itself, so that it may be chained.
14736 * @see textInterpolateV
14737 * @codeGenApi
14738 */
14739export declare function ɵɵtextInterpolate3(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, suffix: string): typeof ɵɵtextInterpolate3;
14740
14741/**
14742 *
14743 * Update text content with 4 bound values surrounded by other text.
14744 *
14745 * Used when a text node has 4 interpolated values in it:
14746 *
14747 * ```html
14748 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>
14749 * ```
14750 *
14751 * Its compiled representation is:
14752 *
14753 * ```ts
14754 * ɵɵtextInterpolate4(
14755 * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');
14756 * ```
14757 * @returns itself, so that it may be chained.
14758 * @see ɵɵtextInterpolateV
14759 * @codeGenApi
14760 */
14761export declare function ɵɵtextInterpolate4(prefix: string, v0: any, i0: string, v1: any, i1: string, v2: any, i2: string, v3: any, suffix: string): typeof ɵɵtextInterpolate4;
14762
14763/**
14764 *
14765 * Update text content with 5 bound values surrounded by other text.
14766 *
14767 * Used when a text node has 5 interpolated values in it:
14768 *
14769 * ```html
14770 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>
14771 * ```
14772 *
14773 * Its compiled representation is:
14774 *
14775 * ```ts
14776 * ɵɵtextInterpolate5(
14777 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');
14778 * ```
14779 * @returns itself, so that it may be chained.
14780 * @see textInterpolateV
14781 * @codeGenApi
14782 */
14783export 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;
14784
14785/**
14786 *
14787 * Update text content with 6 bound values surrounded by other text.
14788 *
14789 * Used when a text node has 6 interpolated values in it:
14790 *
14791 * ```html
14792 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>
14793 * ```
14794 *
14795 * Its compiled representation is:
14796 *
14797 * ```ts
14798 * ɵɵtextInterpolate6(
14799 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');
14800 * ```
14801 *
14802 * @param i4 Static value used for concatenation only.
14803 * @param v5 Value checked for change. @returns itself, so that it may be chained.
14804 * @see textInterpolateV
14805 * @codeGenApi
14806 */
14807export 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;
14808
14809/**
14810 *
14811 * Update text content with 7 bound values surrounded by other text.
14812 *
14813 * Used when a text node has 7 interpolated values in it:
14814 *
14815 * ```html
14816 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>
14817 * ```
14818 *
14819 * Its compiled representation is:
14820 *
14821 * ```ts
14822 * ɵɵtextInterpolate7(
14823 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');
14824 * ```
14825 * @returns itself, so that it may be chained.
14826 * @see textInterpolateV
14827 * @codeGenApi
14828 */
14829export 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;
14830
14831/**
14832 *
14833 * Update text content with 8 bound values surrounded by other text.
14834 *
14835 * Used when a text node has 8 interpolated values in it:
14836 *
14837 * ```html
14838 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>
14839 * ```
14840 *
14841 * Its compiled representation is:
14842 *
14843 * ```ts
14844 * ɵɵtextInterpolate8(
14845 * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');
14846 * ```
14847 * @returns itself, so that it may be chained.
14848 * @see textInterpolateV
14849 * @codeGenApi
14850 */
14851export 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;
14852
14853/**
14854 * Update text content with 9 or more bound values other surrounded by text.
14855 *
14856 * Used when the number of interpolated values exceeds 8.
14857 *
14858 * ```html
14859 * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>
14860 * ```
14861 *
14862 * Its compiled representation is:
14863 *
14864 * ```ts
14865 * ɵɵtextInterpolateV(
14866 * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,
14867 * 'suffix']);
14868 * ```
14869 *.
14870 * @param values The collection of values and the strings in between those values, beginning with
14871 * a string prefix and ending with a string suffix.
14872 * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)
14873 *
14874 * @returns itself, so that it may be chained.
14875 * @codeGenApi
14876 */
14877export declare function ɵɵtextInterpolateV(values: any[]): typeof ɵɵtextInterpolateV;
14878
14879/**
14880 * A template tag function for promoting the associated constant literal to a
14881 * TrustedHTML. Interpolation is explicitly not allowed.
14882 *
14883 * @param html constant template literal containing trusted HTML.
14884 * @returns TrustedHTML wrapping `html`.
14885 *
14886 * @security This is a security-sensitive function and should only be used to
14887 * convert constant values of attributes and properties found in
14888 * application-provided Angular templates to TrustedHTML.
14889 *
14890 * @codeGenApi
14891 */
14892export declare function ɵɵtrustConstantHtml(html: TemplateStringsArray): TrustedHTML | string;
14893
14894/**
14895 * A template tag function for promoting the associated constant literal to a
14896 * TrustedScriptURL. Interpolation is explicitly not allowed.
14897 *
14898 * @param url constant template literal containing a trusted script URL.
14899 * @returns TrustedScriptURL wrapping `url`.
14900 *
14901 * @security This is a security-sensitive function and should only be used to
14902 * convert constant values of attributes and properties found in
14903 * application-provided Angular templates to TrustedScriptURL.
14904 *
14905 * @codeGenApi
14906 */
14907export declare function ɵɵtrustConstantResourceUrl(url: TemplateStringsArray): TrustedScriptURL | string;
14908
14909
14910/**
14911 * Validation function invoked at runtime for each binding that might potentially
14912 * represent a security-sensitive attribute of an <iframe>.
14913 * See `IFRAME_SECURITY_SENSITIVE_ATTRS` in the
14914 * `packages/compiler/src/schema/dom_security_schema.ts` script for the full list
14915 * of such attributes.
14916 *
14917 * @codeGenApi
14918 */
14919export declare function ɵɵvalidateIframeAttribute(attrValue: any, tagName: string, attrName: string): any;
14920
14921/**
14922 * Creates new QueryList, stores the reference in LView and returns QueryList.
14923 *
14924 * @param predicate The type for which the query will search
14925 * @param flags Flags associated with the query
14926 * @param read What to save in the query
14927 *
14928 * @codeGenApi
14929 */
14930export declare function ɵɵviewQuery<T>(predicate: ProviderToken<unknown> | string[], flags: QueryFlags, read?: any): void;
14931
14932export { }
14933
\No newline at end of file