@angular/upgrade 19.2.0 → 19.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/static/index.d.ts CHANGED
@@ -1,117 +1,13 @@
1
1
  /**
2
- * @license Angular v19.2.0
3
- * (c) 2010-2024 Google LLC. https://angular.io/
2
+ * @license Angular v19.2.2
3
+ * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
-
8
- import { DoCheck } from '@angular/core';
9
- import { ElementRef } from '@angular/core';
7
+ import { a as IInjectorService, c as IAugmentedJQuery, d as IDirective, e as IController, f as IScope, g as ILinkFn, S as SingleOrListOrMap, h as INgModelController } from '../angular1.d-DnOc0Rx9.js';
8
+ export { V as VERSION, i as getAngularJSGlobal, j as getAngularLib, s as setAngularJSGlobal, k as setAngularLib, l as ɵangular1 } from '../angular1.d-DnOc0Rx9.js';
10
9
  import * as i0 from '@angular/core';
11
- import { Injector } from '@angular/core';
12
- import { NgModuleFactory } from '@angular/core';
13
- import { NgModuleRef } from '@angular/core';
14
- import { NgZone } from '@angular/core';
15
- import { OnChanges } from '@angular/core';
16
- import { OnDestroy } from '@angular/core';
17
- import { OnInit } from '@angular/core';
18
- import { PlatformRef } from '@angular/core';
19
- import { SimpleChanges } from '@angular/core';
20
- import { StaticProvider } from '@angular/core';
21
- import { Type } from '@angular/core';
22
- import { Version } from '@angular/core';
23
-
24
- declare const $$TESTABILITY = "$$testability";
25
-
26
-
27
- declare const $COMPILE = "$compile";
28
-
29
- declare const $CONTROLLER = "$controller";
30
-
31
- declare const $DELEGATE = "$delegate";
32
-
33
- declare const $EXCEPTION_HANDLER = "$exceptionHandler";
34
-
35
- declare const $HTTP_BACKEND = "$httpBackend";
36
-
37
- declare const $INJECTOR = "$injector";
38
-
39
- declare const $INTERVAL = "$interval";
40
-
41
- declare const $PARSE = "$parse";
42
-
43
- declare const $PROVIDE = "$provide";
44
-
45
- declare const $ROOT_ELEMENT = "$rootElement";
46
-
47
- declare const $ROOT_SCOPE = "$rootScope";
48
-
49
- declare const $SCOPE = "$scope";
50
-
51
- declare const $TEMPLATE_CACHE = "$templateCache";
52
-
53
- declare const $TEMPLATE_REQUEST = "$templateRequest";
54
-
55
- declare let angular: {
56
- bootstrap: (e: Element, modules: (string | IInjectable)[], config?: IAngularBootstrapConfig) => IInjectorService;
57
- module: (prefix: string, dependencies?: string[]) => IModule;
58
- element: {
59
- (e: string | Element | Document | IAugmentedJQuery): IAugmentedJQuery;
60
- cleanData: (nodes: Node[] | NodeList) => void;
61
- };
62
- injector: (modules: Array<string | IInjectable>, strictDi?: boolean) => IInjectorService;
63
- version: {
64
- major: number;
65
- };
66
- resumeBootstrap: () => void;
67
- getTestability: (e: Element) => ITestabilityService;
68
- };
69
-
70
- declare const bootstrap: typeof angular.bootstrap;
71
-
72
- /**
73
- * Clean the jqLite/jQuery data on the element and all its descendants.
74
- * Equivalent to how jqLite/jQuery invoke `cleanData()` on an Element when removed:
75
- * https://github.com/angular/angular.js/blob/2e72ea13fa98bebf6ed4b5e3c45eaf5f990ed16f/src/jqLite.js#L349-L355
76
- * https://github.com/jquery/jquery/blob/6984d1747623dbc5e87fd6c261a5b6b1628c107c/src/manipulation.js#L182
77
- *
78
- * NOTE:
79
- * `cleanData()` will also invoke the AngularJS `$destroy` DOM event on the element:
80
- * https://github.com/angular/angular.js/blob/2e72ea13fa98bebf6ed4b5e3c45eaf5f990ed16f/src/Angular.js#L1932-L1945
81
- *
82
- * @param node The DOM node whose data needs to be cleaned.
83
- */
84
- declare function cleanData(node: Node): void;
85
-
86
- declare const COMPILER_KEY = "$$angularCompiler";
87
-
88
- declare function controllerKey(name: string): string;
89
-
90
- declare class Deferred<R> {
91
- promise: Promise<R>;
92
- resolve: (value: R | PromiseLike<R>) => void;
93
- reject: (error?: any) => void;
94
- constructor();
95
- }
96
-
97
- /**
98
- * Destroy an AngularJS app given the app `$injector`.
99
- *
100
- * NOTE: Destroying an app is not officially supported by AngularJS, but try to do our best by
101
- * destroying `$rootScope` and clean the jqLite/jQuery data on `$rootElement` and all
102
- * descendants.
103
- *
104
- * @param $injector The `$injector` of the AngularJS app to destroy.
105
- */
106
- declare function destroyApp($injector: IInjectorService): void;
107
-
108
- declare function directiveNormalize(name: string): string;
109
-
110
- declare type DirectiveRequireProperty = SingleOrListOrMap<string>;
111
-
112
- declare type DirectiveTranscludeProperty = boolean | 'element' | {
113
- [key: string]: string;
114
- };
10
+ import { Type, StaticProvider, NgModuleRef, NgModuleFactory, OnInit, OnChanges, DoCheck, OnDestroy, ElementRef, Injector, SimpleChanges, NgZone, PlatformRef } from '@angular/core';
115
11
 
116
12
  /**
117
13
  * @description
@@ -151,10 +47,9 @@ declare type DirectiveTranscludeProperty = boolean | 'element' | {
151
47
  * <br />
152
48
  * (This option is only necessary when using `downgradeModule()` to downgrade more than one
153
49
  * Angular module.)
154
- * - `propagateDigest?: boolean`: Whether to perform {@link ChangeDetectorRef#detectChanges} on the
155
- * component on every
156
- * [$digest](https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$digest). If set to `false`,
157
- * change detection will still be performed when any of the component's inputs changes.
50
+ * - `propagateDigest?: boolean`: Whether to perform {@link /api/core/ChangeDetectorRef#detectChanges detectChanges} on the
51
+ * component on every {@link https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$digest $digest}.
52
+ * If set to `false`, change detection will still be performed when any of the component's inputs changes.
158
53
  * (Default: true)
159
54
  *
160
55
  * @returns a factory function that can be used to register the component in an
@@ -162,7 +57,7 @@ declare type DirectiveTranscludeProperty = boolean | 'element' | {
162
57
  *
163
58
  * @publicApi
164
59
  */
165
- export declare function downgradeComponent(info: {
60
+ declare function downgradeComponent(info: {
166
61
  component: Type<any>;
167
62
  downgradedModule?: string;
168
63
  propagateDigest?: boolean;
@@ -174,9 +69,6 @@ export declare function downgradeComponent(info: {
174
69
  selectors?: string[];
175
70
  }): any;
176
71
 
177
- declare const DOWNGRADED_MODULE_COUNT_KEY = "$$angularDowngradedModuleCount";
178
-
179
-
180
72
  /**
181
73
  * @description
182
74
  *
@@ -237,7 +129,7 @@ declare const DOWNGRADED_MODULE_COUNT_KEY = "$$angularDowngradedModuleCount";
237
129
  *
238
130
  * @publicApi
239
131
  */
240
- export declare function downgradeInjectable(token: any, downgradedModule?: string): Function;
132
+ declare function downgradeInjectable(token: any, downgradedModule?: string): Function;
241
133
 
242
134
  /**
243
135
  * @description
@@ -344,7 +236,7 @@ export declare function downgradeInjectable(token: any, downgradedModule?: strin
344
236
  * {@link PlatformRef#bootstrapmodulefactory `bootstrapModuleFactory()`} to bootstrap the
345
237
  * downgraded modules, each one is considered a "root" module. As a consequence, a new instance
346
238
  * will be created for every injectable provided in `"root"` (via
347
- * {@link Injectable#providedIn `providedIn`}).
239
+ * {@link /api/core/Injectable#providedIn providedIn}
348
240
  * If this is not your intention, you can have a shared module (that will act as act as the "root"
349
241
  * module) and create all downgraded modules using that module's injector:
350
242
  *
@@ -352,8 +244,7 @@ export declare function downgradeInjectable(token: any, downgradedModule?: strin
352
244
  *
353
245
  * @publicApi
354
246
  */
355
- export declare function downgradeModule<T>(moduleOrBootstrapFn: Type<T> | ((extraProviders: StaticProvider[]) => Promise<NgModuleRef<T>>)): string;
356
-
247
+ declare function downgradeModule<T>(moduleOrBootstrapFn: Type<T> | ((extraProviders: StaticProvider[]) => Promise<NgModuleRef<T>>)): string;
357
248
  /**
358
249
  * @description
359
250
  *
@@ -459,7 +350,7 @@ export declare function downgradeModule<T>(moduleOrBootstrapFn: Type<T> | ((extr
459
350
  * {@link PlatformRef#bootstrapmodulefactory `bootstrapModuleFactory()`} to bootstrap the
460
351
  * downgraded modules, each one is considered a "root" module. As a consequence, a new instance
461
352
  * will be created for every injectable provided in `"root"` (via
462
- * {@link Injectable#providedIn `providedIn`}).
353
+ * {@link /api/core/Injectable#providedIn providedIn}
463
354
  * If this is not your intention, you can have a shared module (that will act as act as the "root"
464
355
  * module) and create all downgraded modules using that module's injector:
465
356
  *
@@ -470,382 +361,7 @@ export declare function downgradeModule<T>(moduleOrBootstrapFn: Type<T> | ((extr
470
361
  * @deprecated Passing `NgModuleFactory` as the `downgradeModule` function argument is deprecated,
471
362
  * please pass an NgModule class reference instead.
472
363
  */
473
- export declare function downgradeModule<T>(moduleOrBootstrapFn: NgModuleFactory<T>): string;
474
-
475
- declare const element: typeof angular.element;
476
-
477
- /**
478
- * Returns the current AngularJS global.
479
- *
480
- * @publicApi
481
- */
482
- export declare function getAngularJSGlobal(): any;
483
-
484
- /**
485
- * @deprecated Use `getAngularJSGlobal` instead.
486
- *
487
- * @publicApi
488
- */
489
- export declare function getAngularLib(): any;
490
-
491
- declare function getDowngradedModuleCount($injector: IInjectorService): number;
492
-
493
- declare const getTestability: typeof angular.getTestability;
494
-
495
- declare function getTypeName(type: Type<any>): string;
496
-
497
- declare function getUpgradeAppType($injector: IInjectorService): UpgradeAppType;
498
-
499
- declare const GROUP_PROJECTABLE_NODES_KEY = "$$angularGroupProjectableNodes";
500
-
501
- /**
502
- * Glue the AngularJS `NgModelController` (if it exists) to the component
503
- * (if it implements the needed subset of the `ControlValueAccessor` interface).
504
- */
505
- declare function hookupNgModel(ngModel: INgModelController, component: any): void;
506
-
507
- declare interface IAngularBootstrapConfig {
508
- strictDi?: boolean;
509
- }
510
-
511
- declare interface IAnnotatedFunction extends Function {
512
- $inject?: Function extends {
513
- $inject?: string[];
514
- } ? Ng1Token[] : ReadonlyArray<Ng1Token>;
515
- }
516
-
517
- declare interface IAttributes {
518
- $observe(attr: string, fn: (v: string) => void): void;
519
- [key: string]: any;
520
- }
521
-
522
- declare type IAugmentedJQuery = Node[] & {
523
- on?: (name: string, fn: () => void) => void;
524
- data?: (name: string, value?: any) => any;
525
- text?: () => string;
526
- inheritedData?: (name: string, value?: any) => any;
527
- children?: () => IAugmentedJQuery;
528
- contents?: () => IAugmentedJQuery;
529
- parent?: () => IAugmentedJQuery;
530
- empty?: () => void;
531
- append?: (content: IAugmentedJQuery | string) => IAugmentedJQuery;
532
- controller?: (name: string) => any;
533
- isolateScope?: () => IScope;
534
- injector?: () => IInjectorService;
535
- triggerHandler?: (eventTypeOrObject: string | Event, extraParameters?: any[]) => IAugmentedJQuery;
536
- remove?: () => void;
537
- removeData?: () => void;
538
- };
539
-
540
- declare interface IBindingDestination {
541
- [key: string]: any;
542
- $onChanges?: (changes: SimpleChanges) => void;
543
- }
544
-
545
- declare interface ICacheObject {
546
- put<T>(key: string, value?: T): T;
547
- get(key: string): any;
548
- }
549
-
550
- declare interface ICloneAttachFunction {
551
- (clonedElement: IAugmentedJQuery, scope: IScope): any;
552
- }
553
-
554
- declare interface ICompiledExpression {
555
- (context: any, locals: any): any;
556
- assign?: (context: any, value: any) => any;
557
- }
558
-
559
- declare interface ICompileService {
560
- (element: Element | NodeList | Node[] | string, transclude?: Function): ILinkFn;
561
- }
562
-
563
- declare interface IComponent {
564
- bindings?: {
565
- [key: string]: string;
566
- };
567
- controller?: string | IInjectable;
568
- controllerAs?: string;
569
- require?: DirectiveRequireProperty;
570
- template?: string | Function;
571
- templateUrl?: string | Function;
572
- transclude?: DirectiveTranscludeProperty;
573
- }
574
-
575
- declare type IController = string | IInjectable;
576
-
577
- declare interface IControllerInstance extends IBindingDestination {
578
- $doCheck?: () => void;
579
- $onDestroy?: () => void;
580
- $onInit?: () => void;
581
- $postLink?: () => void;
582
- }
583
-
584
- declare interface IControllerService {
585
- (controllerConstructor: IController, locals?: any, later?: any, ident?: any): any;
586
- (controllerName: string, locals?: any): any;
587
- }
588
-
589
- declare interface IDirective {
590
- compile?: IDirectiveCompileFn;
591
- controller?: IController;
592
- controllerAs?: string;
593
- bindToController?: boolean | {
594
- [key: string]: string;
595
- };
596
- link?: IDirectiveLinkFn | IDirectivePrePost;
597
- name?: string;
598
- priority?: number;
599
- replace?: boolean;
600
- require?: DirectiveRequireProperty;
601
- restrict?: string;
602
- scope?: boolean | {
603
- [key: string]: string;
604
- };
605
- template?: string | Function;
606
- templateUrl?: string | Function;
607
- templateNamespace?: string;
608
- terminal?: boolean;
609
- transclude?: DirectiveTranscludeProperty;
610
- }
611
-
612
- declare interface IDirectiveCompileFn {
613
- (templateElement: IAugmentedJQuery, templateAttributes: IAttributes, transclude: ITranscludeFunction): IDirectivePrePost;
614
- }
615
-
616
- declare interface IDirectiveLinkFn {
617
- (scope: IScope, instanceElement: IAugmentedJQuery, instanceAttributes: IAttributes, controller: any, transclude: ITranscludeFunction): void;
618
- }
619
-
620
- declare interface IDirectivePrePost {
621
- pre?: IDirectiveLinkFn;
622
- post?: IDirectiveLinkFn;
623
- }
624
-
625
- declare interface IHttpBackendService {
626
- (method: string, url: string, post?: any, callback?: Function, headers?: any, timeout?: number, withCredentials?: boolean): void;
627
- }
628
-
629
- declare type IInjectable = (Ng1Token | Function)[] | IAnnotatedFunction;
630
-
631
- declare interface IInjectorService {
632
- get(key: string): any;
633
- has(key: string): boolean;
634
- }
635
-
636
- declare interface IIntervalService {
637
- (func: Function, delay: number, count?: number, invokeApply?: boolean, ...args: any[]): Promise<any>;
638
- cancel(promise: Promise<any>): boolean;
639
- }
640
-
641
- declare interface ILinkFn {
642
- (scope: IScope, cloneAttachFn?: ICloneAttachFunction, options?: ILinkFnOptions): IAugmentedJQuery;
643
- $$slots?: {
644
- [slotName: string]: ILinkFn;
645
- };
646
- }
647
-
648
- declare interface ILinkFnOptions {
649
- parentBoundTranscludeFn?: Function;
650
- transcludeControllers?: {
651
- [key: string]: any;
652
- };
653
- futureParentElement?: Node;
654
- }
655
-
656
- declare interface IModule {
657
- name: string;
658
- requires: (string | IInjectable)[];
659
- config(fn: IInjectable): IModule;
660
- directive(selector: string, factory: IInjectable): IModule;
661
- component(selector: string, component: IComponent): IModule;
662
- controller(name: string, type: IInjectable): IModule;
663
- factory(key: Ng1Token, factoryFn: IInjectable): IModule;
664
- value(key: Ng1Token, value: any): IModule;
665
- constant(token: Ng1Token, value: any): IModule;
666
- run(a: IInjectable): IModule;
667
- }
668
-
669
- declare interface INgModelController {
670
- $render(): void;
671
- $isEmpty(value: any): boolean;
672
- $setValidity(validationErrorKey: string, isValid: boolean): void;
673
- $setPristine(): void;
674
- $setDirty(): void;
675
- $setUntouched(): void;
676
- $setTouched(): void;
677
- $rollbackViewValue(): void;
678
- $validate(): void;
679
- $commitViewValue(): void;
680
- $setViewValue(value: any, trigger: string): void;
681
- $viewValue: any;
682
- $modelValue: any;
683
- $parsers: Function[];
684
- $formatters: Function[];
685
- $validators: {
686
- [key: string]: Function;
687
- };
688
- $asyncValidators: {
689
- [key: string]: Function;
690
- };
691
- $viewChangeListeners: Function[];
692
- $error: Object;
693
- $pending: Object;
694
- $untouched: boolean;
695
- $touched: boolean;
696
- $pristine: boolean;
697
- $dirty: boolean;
698
- $valid: boolean;
699
- $invalid: boolean;
700
- $name: string;
701
- }
702
-
703
- declare const injector: typeof angular.injector;
704
-
705
- declare const INJECTOR_KEY = "$$angularInjector";
706
-
707
- declare interface IParseService {
708
- (expression: string): ICompiledExpression;
709
- }
710
-
711
- declare interface IProvider {
712
- $get: IInjectable;
713
- }
714
-
715
- declare interface IProvideService {
716
- provider(token: Ng1Token, provider: IProvider): IProvider;
717
- factory(token: Ng1Token, factory: IInjectable): IProvider;
718
- service(token: Ng1Token, type: IInjectable): IProvider;
719
- value(token: Ng1Token, value: any): IProvider;
720
- constant(token: Ng1Token, value: any): void;
721
- decorator(token: Ng1Token, factory: IInjectable): void;
722
- }
723
-
724
- declare interface IRootScopeService {
725
- $new(isolate?: boolean): IScope;
726
- $id: string;
727
- $parent: IScope;
728
- $root: IScope;
729
- $watch(exp: Ng1Expression, fn?: (a1?: any, a2?: any) => void): Function;
730
- $on(event: string, fn?: (event?: any, ...args: any[]) => void): Function;
731
- $destroy(): any;
732
- $apply(exp?: Ng1Expression): any;
733
- $digest(): any;
734
- $evalAsync(exp: Ng1Expression, locals?: any): void;
735
- $on(event: string, fn?: (event?: any, ...args: any[]) => void): Function;
736
- $$childTail: IScope;
737
- $$childHead: IScope;
738
- $$nextSibling: IScope;
739
- $$phase: any;
740
- [key: string]: any;
741
- }
742
-
743
- declare interface IScope extends IRootScopeService {
744
- }
745
-
746
- declare function isFunction(value: any): value is Function;
747
-
748
- declare function isNgModuleType(value: any): value is Type<unknown>;
749
-
750
- declare interface ITemplateCacheService extends ICacheObject {
751
- }
752
-
753
- declare interface ITestabilityService {
754
- findBindings(element: Element, expression: string, opt_exactMatch?: boolean): Element[];
755
- findModels(element: Element, expression: string, opt_exactMatch?: boolean): Element[];
756
- getLocation(): string;
757
- setLocation(url: string): void;
758
- whenStable(callback: Function): void;
759
- }
760
-
761
- declare interface ITranscludeFunction {
762
- (scope: IScope, cloneAttachFn: ICloneAttachFunction): IAugmentedJQuery;
763
- (cloneAttachFn?: ICloneAttachFunction): IAugmentedJQuery;
764
- }
765
-
766
- declare const LAZY_MODULE_REF = "$$angularLazyModuleRef";
767
-
768
- declare interface LazyModuleRef {
769
- injector?: Injector;
770
- promise?: Promise<Injector>;
771
- }
772
-
773
- declare const module_: typeof angular.module;
774
-
775
- declare type Ng1Expression = string | Function;
776
-
777
-
778
- declare type Ng1Token = string;
779
-
780
- declare const NG_ZONE_KEY = "$$angularNgZone";
781
-
782
- declare function onError(e: any): void;
783
-
784
- declare const REQUIRE_INJECTOR: string;
785
-
786
- declare const REQUIRE_NG_MODEL = "?ngModel";
787
-
788
- declare const resumeBootstrap: typeof angular.resumeBootstrap;
789
-
790
- /**
791
- * Resets the AngularJS global.
792
- *
793
- * Used when AngularJS is loaded lazily, and not available on `window`.
794
- *
795
- * @publicApi
796
- */
797
- export declare function setAngularJSGlobal(ng: any): void;
798
-
799
- /**
800
- * @deprecated Use `setAngularJSGlobal` instead.
801
- *
802
- * @publicApi
803
- */
804
- export declare function setAngularLib(ng: any): void;
805
-
806
- declare type SingleOrListOrMap<T> = T | T[] | {
807
- [key: string]: T;
808
- };
809
-
810
- /**
811
- * Test two values for strict equality, accounting for the fact that `NaN !== NaN`.
812
- */
813
- declare function strictEquals(val1: any, val2: any): boolean;
814
-
815
-
816
- /**
817
- * @fileoverview
818
- * While Angular only uses Trusted Types internally for the time being,
819
- * references to Trusted Types could leak into our public API, which would force
820
- * anyone compiling against @angular/upgrade to provide the @types/trusted-types
821
- * package in their compilation unit.
822
- *
823
- * Until https://github.com/microsoft/TypeScript/issues/30024 is resolved, we
824
- * will keep Angular's public API surface free of references to Trusted Types.
825
- * For internal and semi-private APIs that need to reference Trusted Types, the
826
- * minimal type definitions for the Trusted Types API provided by this module
827
- * should be used instead. They are marked as "declare" to prevent them from
828
- * being renamed by compiler optimization.
829
- *
830
- * Adapted from
831
- * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/trusted-types/index.d.ts
832
- * but restricted to the API surface used within Angular, mimicking the approach
833
- * in packages/core/src/util/security/trusted_type_defs.ts.
834
- */
835
- declare type TrustedHTML = string & {
836
- __brand__: 'TrustedHTML';
837
- };
838
-
839
- declare const UPGRADE_APP_TYPE_KEY = "$$angularUpgradeAppType";
840
-
841
- declare const UPGRADE_MODULE_NAME = "$$UpgradeModule";
842
-
843
- declare const enum UpgradeAppType {
844
- None = 0,
845
- Dynamic = 1,
846
- Static = 2,
847
- Lite = 3
848
- }
364
+ declare function downgradeModule<T>(moduleOrBootstrapFn: NgModuleFactory<T>): string;
849
365
 
850
366
  /**
851
367
  * @description
@@ -887,7 +403,7 @@ declare const enum UpgradeAppType {
887
403
  * @publicApi
888
404
  * @extensible
889
405
  */
890
- export declare class UpgradeComponent implements OnInit, OnChanges, DoCheck, OnDestroy {
406
+ declare class UpgradeComponent implements OnInit, OnChanges, DoCheck, OnDestroy {
891
407
  private helper;
892
408
  private $element;
893
409
  private $componentScope;
@@ -925,28 +441,6 @@ export declare class UpgradeComponent implements OnInit, OnChanges, DoCheck, OnD
925
441
  static ɵdir: i0.ɵɵDirectiveDeclaration<UpgradeComponent, never, never, {}, {}, never, never, true, never>;
926
442
  }
927
443
 
928
- declare class UpgradeHelper {
929
- private name;
930
- readonly $injector: IInjectorService;
931
- readonly element: Element;
932
- readonly $element: IAugmentedJQuery;
933
- readonly directive: IDirective;
934
- private readonly $compile;
935
- private readonly $controller;
936
- constructor(injector: Injector, name: string, elementRef: ElementRef, directive?: IDirective);
937
- static getDirective($injector: IInjectorService, name: string): IDirective;
938
- static getTemplate($injector: IInjectorService, directive: IDirective, fetchRemoteTemplate?: boolean, $element?: IAugmentedJQuery): string | TrustedHTML | Promise<string | TrustedHTML>;
939
- buildController(controllerType: IController, $scope: IScope): any;
940
- compileTemplate(template?: string | TrustedHTML): ILinkFn;
941
- onDestroy($scope: IScope, controllerInstance?: any): void;
942
- prepareTransclusion(): ILinkFn | undefined;
943
- resolveAndBindRequiredControllers(controllerInstance: IControllerInstance | null): SingleOrListOrMap<IControllerInstance> | null;
944
- private compileHtml;
945
- private extractChildNodes;
946
- private getDirectiveRequire;
947
- private resolveRequire;
948
- }
949
-
950
444
  /**
951
445
  * @description
952
446
  *
@@ -970,7 +464,7 @@ declare class UpgradeHelper {
970
464
  * {@link UpgradeModule#upgrading-an-angular-1-service Upgrading an AngularJS service} below.
971
465
  * 4. Creation of an AngularJS service that wraps and exposes an Angular injectable
972
466
  * so that it can be injected into an AngularJS context. See `downgradeInjectable`.
973
- * 3. Bootstrapping of a hybrid Angular application which contains both of the frameworks
467
+ * 5. Bootstrapping of a hybrid Angular application which contains both of the frameworks
974
468
  * coexisting in a single application.
975
469
  *
976
470
  * @usageNotes
@@ -1036,7 +530,7 @@ declare class UpgradeHelper {
1036
530
  *
1037
531
  * ### Examples
1038
532
  *
1039
- * Import the `UpgradeModule` into your top level {@link NgModule Angular `NgModule`}.
533
+ * Import the `UpgradeModule` into your top level Angular {@link NgModule NgModule}.
1040
534
  *
1041
535
  * {@example upgrade/static/ts/full/module.ts region='ng2-module'}
1042
536
  *
@@ -1050,7 +544,6 @@ declare class UpgradeHelper {
1050
544
  *
1051
545
  * {@example upgrade/static/ts/full/module.ts region='bootstrap-ng2'}
1052
546
  *
1053
- * {@a upgrading-an-angular-1-service}
1054
547
  * ### Upgrading an AngularJS service
1055
548
  *
1056
549
  * There is no specific API for upgrading an AngularJS service. Instead you should just follow the
@@ -1072,7 +565,7 @@ declare class UpgradeHelper {
1072
565
  *
1073
566
  * @publicApi
1074
567
  */
1075
- export declare class UpgradeModule {
568
+ declare class UpgradeModule {
1076
569
  /** The bootstrap zone for the upgrade application */
1077
570
  ngZone: NgZone;
1078
571
  /**
@@ -1112,125 +605,202 @@ export declare class UpgradeModule {
1112
605
  static ɵinj: i0.ɵɵInjectorDeclaration<UpgradeModule>;
1113
606
  }
1114
607
 
1115
- declare function validateInjectionKey($injector: IInjectorService, downgradedModule: string, injectionKey: string, attemptedAction: string): void;
608
+ declare const $COMPILE = "$compile";
609
+ declare const $CONTROLLER = "$controller";
610
+ declare const $DELEGATE = "$delegate";
611
+ declare const $EXCEPTION_HANDLER = "$exceptionHandler";
612
+ declare const $HTTP_BACKEND = "$httpBackend";
613
+ declare const $INJECTOR = "$injector";
614
+ declare const $INTERVAL = "$interval";
615
+ declare const $PARSE = "$parse";
616
+ declare const $PROVIDE = "$provide";
617
+ declare const $ROOT_ELEMENT = "$rootElement";
618
+ declare const $ROOT_SCOPE = "$rootScope";
619
+ declare const $SCOPE = "$scope";
620
+ declare const $TEMPLATE_CACHE = "$templateCache";
621
+ declare const $TEMPLATE_REQUEST = "$templateRequest";
622
+ declare const $$TESTABILITY = "$$testability";
623
+ declare const COMPILER_KEY = "$$angularCompiler";
624
+ declare const DOWNGRADED_MODULE_COUNT_KEY = "$$angularDowngradedModuleCount";
625
+ declare const GROUP_PROJECTABLE_NODES_KEY = "$$angularGroupProjectableNodes";
626
+ declare const INJECTOR_KEY = "$$angularInjector";
627
+ declare const LAZY_MODULE_REF = "$$angularLazyModuleRef";
628
+ declare const NG_ZONE_KEY = "$$angularNgZone";
629
+ declare const UPGRADE_APP_TYPE_KEY = "$$angularUpgradeAppType";
630
+ declare const REQUIRE_INJECTOR: string;
631
+ declare const REQUIRE_NG_MODEL = "?ngModel";
632
+ declare const UPGRADE_MODULE_NAME = "$$UpgradeModule";
633
+
634
+ declare const constants_d_$$TESTABILITY: typeof $$TESTABILITY;
635
+ declare const constants_d_$COMPILE: typeof $COMPILE;
636
+ declare const constants_d_$CONTROLLER: typeof $CONTROLLER;
637
+ declare const constants_d_$DELEGATE: typeof $DELEGATE;
638
+ declare const constants_d_$EXCEPTION_HANDLER: typeof $EXCEPTION_HANDLER;
639
+ declare const constants_d_$HTTP_BACKEND: typeof $HTTP_BACKEND;
640
+ declare const constants_d_$INJECTOR: typeof $INJECTOR;
641
+ declare const constants_d_$INTERVAL: typeof $INTERVAL;
642
+ declare const constants_d_$PARSE: typeof $PARSE;
643
+ declare const constants_d_$PROVIDE: typeof $PROVIDE;
644
+ declare const constants_d_$ROOT_ELEMENT: typeof $ROOT_ELEMENT;
645
+ declare const constants_d_$ROOT_SCOPE: typeof $ROOT_SCOPE;
646
+ declare const constants_d_$SCOPE: typeof $SCOPE;
647
+ declare const constants_d_$TEMPLATE_CACHE: typeof $TEMPLATE_CACHE;
648
+ declare const constants_d_$TEMPLATE_REQUEST: typeof $TEMPLATE_REQUEST;
649
+ declare const constants_d_COMPILER_KEY: typeof COMPILER_KEY;
650
+ declare const constants_d_DOWNGRADED_MODULE_COUNT_KEY: typeof DOWNGRADED_MODULE_COUNT_KEY;
651
+ declare const constants_d_GROUP_PROJECTABLE_NODES_KEY: typeof GROUP_PROJECTABLE_NODES_KEY;
652
+ declare const constants_d_INJECTOR_KEY: typeof INJECTOR_KEY;
653
+ declare const constants_d_LAZY_MODULE_REF: typeof LAZY_MODULE_REF;
654
+ declare const constants_d_NG_ZONE_KEY: typeof NG_ZONE_KEY;
655
+ declare const constants_d_REQUIRE_INJECTOR: typeof REQUIRE_INJECTOR;
656
+ declare const constants_d_REQUIRE_NG_MODEL: typeof REQUIRE_NG_MODEL;
657
+ declare const constants_d_UPGRADE_APP_TYPE_KEY: typeof UPGRADE_APP_TYPE_KEY;
658
+ declare const constants_d_UPGRADE_MODULE_NAME: typeof UPGRADE_MODULE_NAME;
659
+ declare namespace constants_d {
660
+ export { constants_d_$$TESTABILITY as $$TESTABILITY, constants_d_$COMPILE as $COMPILE, constants_d_$CONTROLLER as $CONTROLLER, constants_d_$DELEGATE as $DELEGATE, constants_d_$EXCEPTION_HANDLER as $EXCEPTION_HANDLER, constants_d_$HTTP_BACKEND as $HTTP_BACKEND, constants_d_$INJECTOR as $INJECTOR, constants_d_$INTERVAL as $INTERVAL, constants_d_$PARSE as $PARSE, constants_d_$PROVIDE as $PROVIDE, constants_d_$ROOT_ELEMENT as $ROOT_ELEMENT, constants_d_$ROOT_SCOPE as $ROOT_SCOPE, constants_d_$SCOPE as $SCOPE, constants_d_$TEMPLATE_CACHE as $TEMPLATE_CACHE, constants_d_$TEMPLATE_REQUEST as $TEMPLATE_REQUEST, constants_d_COMPILER_KEY as COMPILER_KEY, constants_d_DOWNGRADED_MODULE_COUNT_KEY as DOWNGRADED_MODULE_COUNT_KEY, constants_d_GROUP_PROJECTABLE_NODES_KEY as GROUP_PROJECTABLE_NODES_KEY, constants_d_INJECTOR_KEY as INJECTOR_KEY, constants_d_LAZY_MODULE_REF as LAZY_MODULE_REF, constants_d_NG_ZONE_KEY as NG_ZONE_KEY, constants_d_REQUIRE_INJECTOR as REQUIRE_INJECTOR, constants_d_REQUIRE_NG_MODEL as REQUIRE_NG_MODEL, constants_d_UPGRADE_APP_TYPE_KEY as UPGRADE_APP_TYPE_KEY, constants_d_UPGRADE_MODULE_NAME as UPGRADE_MODULE_NAME };
661
+ }
1116
662
 
1117
663
  /**
1118
- * @publicApi
664
+ * @fileoverview
665
+ * While Angular only uses Trusted Types internally for the time being,
666
+ * references to Trusted Types could leak into our public API, which would force
667
+ * anyone compiling against @angular/upgrade to provide the @types/trusted-types
668
+ * package in their compilation unit.
669
+ *
670
+ * Until https://github.com/microsoft/TypeScript/issues/30024 is resolved, we
671
+ * will keep Angular's public API surface free of references to Trusted Types.
672
+ * For internal and semi-private APIs that need to reference Trusted Types, the
673
+ * minimal type definitions for the Trusted Types API provided by this module
674
+ * should be used instead. They are marked as "declare" to prevent them from
675
+ * being renamed by compiler optimization.
676
+ *
677
+ * Adapted from
678
+ * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/trusted-types/index.d.ts
679
+ * but restricted to the API surface used within Angular, mimicking the approach
680
+ * in packages/core/src/util/security/trusted_type_defs.ts.
1119
681
  */
1120
- export declare const VERSION: Version;
682
+ type TrustedHTML = string & {
683
+ __brand__: 'TrustedHTML';
684
+ };
1121
685
 
1122
- declare namespace ɵangular1 {
1123
- export {
1124
- setAngularLib,
1125
- getAngularLib,
1126
- setAngularJSGlobal,
1127
- getAngularJSGlobal,
1128
- Ng1Token,
1129
- Ng1Expression,
1130
- IAnnotatedFunction,
1131
- IInjectable,
1132
- SingleOrListOrMap,
1133
- IModule,
1134
- ICompileService,
1135
- ILinkFn,
1136
- ILinkFnOptions,
1137
- IRootScopeService,
1138
- IScope,
1139
- IAngularBootstrapConfig,
1140
- IDirective,
1141
- DirectiveRequireProperty,
1142
- DirectiveTranscludeProperty,
1143
- IDirectiveCompileFn,
1144
- IDirectivePrePost,
1145
- IDirectiveLinkFn,
1146
- IComponent,
1147
- IAttributes,
1148
- ITranscludeFunction,
1149
- ICloneAttachFunction,
1150
- IAugmentedJQuery,
1151
- IProvider,
1152
- IProvideService,
1153
- IParseService,
1154
- ICompiledExpression,
1155
- IHttpBackendService,
1156
- ICacheObject,
1157
- ITemplateCacheService,
1158
- IController,
1159
- IControllerService,
1160
- IInjectorService,
1161
- IIntervalService,
1162
- ITestabilityService,
1163
- INgModelController,
1164
- bootstrap,
1165
- module_,
1166
- element,
1167
- injector,
1168
- resumeBootstrap,
1169
- getTestability
1170
- }
686
+ interface IBindingDestination {
687
+ [key: string]: any;
688
+ $onChanges?: (changes: SimpleChanges) => void;
1171
689
  }
1172
- export { ɵangular1 }
1173
-
1174
- declare namespace ɵconstants {
1175
- export {
1176
- $COMPILE,
1177
- $CONTROLLER,
1178
- $DELEGATE,
1179
- $EXCEPTION_HANDLER,
1180
- $HTTP_BACKEND,
1181
- $INJECTOR,
1182
- $INTERVAL,
1183
- $PARSE,
1184
- $PROVIDE,
1185
- $ROOT_ELEMENT,
1186
- $ROOT_SCOPE,
1187
- $SCOPE,
1188
- $TEMPLATE_CACHE,
1189
- $TEMPLATE_REQUEST,
1190
- $$TESTABILITY,
1191
- COMPILER_KEY,
1192
- DOWNGRADED_MODULE_COUNT_KEY,
1193
- GROUP_PROJECTABLE_NODES_KEY,
1194
- INJECTOR_KEY,
1195
- LAZY_MODULE_REF,
1196
- NG_ZONE_KEY,
1197
- UPGRADE_APP_TYPE_KEY,
1198
- REQUIRE_INJECTOR,
1199
- REQUIRE_NG_MODEL,
1200
- UPGRADE_MODULE_NAME
1201
- }
690
+ interface IControllerInstance extends IBindingDestination {
691
+ $doCheck?: () => void;
692
+ $onDestroy?: () => void;
693
+ $onInit?: () => void;
694
+ $postLink?: () => void;
695
+ }
696
+ declare class UpgradeHelper {
697
+ private name;
698
+ readonly $injector: IInjectorService;
699
+ readonly element: Element;
700
+ readonly $element: IAugmentedJQuery;
701
+ readonly directive: IDirective;
702
+ private readonly $compile;
703
+ private readonly $controller;
704
+ constructor(injector: Injector, name: string, elementRef: ElementRef, directive?: IDirective);
705
+ static getDirective($injector: IInjectorService, name: string): IDirective;
706
+ static getTemplate($injector: IInjectorService, directive: IDirective, fetchRemoteTemplate?: boolean, $element?: IAugmentedJQuery): string | TrustedHTML | Promise<string | TrustedHTML>;
707
+ buildController(controllerType: IController, $scope: IScope): any;
708
+ compileTemplate(template?: string | TrustedHTML): ILinkFn;
709
+ onDestroy($scope: IScope, controllerInstance?: any): void;
710
+ prepareTransclusion(): ILinkFn | undefined;
711
+ resolveAndBindRequiredControllers(controllerInstance: IControllerInstance | null): SingleOrListOrMap<IControllerInstance> | null;
712
+ private compileHtml;
713
+ private extractChildNodes;
714
+ private getDirectiveRequire;
715
+ private resolveRequire;
1202
716
  }
1203
- export { ɵconstants }
1204
717
 
1205
- declare namespace ɵupgradeHelper {
1206
- export {
1207
- IBindingDestination,
1208
- IControllerInstance,
1209
- UpgradeHelper
1210
- }
718
+ type upgrade_helper_d_IBindingDestination = IBindingDestination;
719
+ type upgrade_helper_d_IControllerInstance = IControllerInstance;
720
+ type upgrade_helper_d_UpgradeHelper = UpgradeHelper;
721
+ declare const upgrade_helper_d_UpgradeHelper: typeof UpgradeHelper;
722
+ declare namespace upgrade_helper_d {
723
+ export { type upgrade_helper_d_IBindingDestination as IBindingDestination, type upgrade_helper_d_IControllerInstance as IControllerInstance, upgrade_helper_d_UpgradeHelper as UpgradeHelper };
1211
724
  }
1212
- export { ɵupgradeHelper }
1213
725
 
1214
- declare namespace ɵutil {
1215
- export {
1216
- onError,
1217
- cleanData,
1218
- controllerKey,
1219
- destroyApp,
1220
- directiveNormalize,
1221
- getTypeName,
1222
- getDowngradedModuleCount,
1223
- getUpgradeAppType,
1224
- isFunction,
1225
- isNgModuleType,
1226
- validateInjectionKey,
1227
- hookupNgModel,
1228
- strictEquals,
1229
- Deferred,
1230
- LazyModuleRef,
1231
- UpgradeAppType
1232
- }
726
+ declare function onError(e: any): void;
727
+ /**
728
+ * Clean the jqLite/jQuery data on the element and all its descendants.
729
+ * Equivalent to how jqLite/jQuery invoke `cleanData()` on an Element when removed:
730
+ * https://github.com/angular/angular.js/blob/2e72ea13fa98bebf6ed4b5e3c45eaf5f990ed16f/src/jqLite.js#L349-L355
731
+ * https://github.com/jquery/jquery/blob/6984d1747623dbc5e87fd6c261a5b6b1628c107c/src/manipulation.js#L182
732
+ *
733
+ * NOTE:
734
+ * `cleanData()` will also invoke the AngularJS `$destroy` DOM event on the element:
735
+ * https://github.com/angular/angular.js/blob/2e72ea13fa98bebf6ed4b5e3c45eaf5f990ed16f/src/Angular.js#L1932-L1945
736
+ *
737
+ * @param node The DOM node whose data needs to be cleaned.
738
+ */
739
+ declare function cleanData(node: Node): void;
740
+ declare function controllerKey(name: string): string;
741
+ /**
742
+ * Destroy an AngularJS app given the app `$injector`.
743
+ *
744
+ * NOTE: Destroying an app is not officially supported by AngularJS, but try to do our best by
745
+ * destroying `$rootScope` and clean the jqLite/jQuery data on `$rootElement` and all
746
+ * descendants.
747
+ *
748
+ * @param $injector The `$injector` of the AngularJS app to destroy.
749
+ */
750
+ declare function destroyApp($injector: IInjectorService): void;
751
+ declare function directiveNormalize(name: string): string;
752
+ declare function getTypeName(type: Type<any>): string;
753
+ declare function getDowngradedModuleCount($injector: IInjectorService): number;
754
+ declare function getUpgradeAppType($injector: IInjectorService): UpgradeAppType;
755
+ declare function isFunction(value: any): value is Function;
756
+ declare function isNgModuleType(value: any): value is Type<unknown>;
757
+ declare function validateInjectionKey($injector: IInjectorService, downgradedModule: string, injectionKey: string, attemptedAction: string): void;
758
+ declare class Deferred<R> {
759
+ promise: Promise<R>;
760
+ resolve: (value: R | PromiseLike<R>) => void;
761
+ reject: (error?: any) => void;
762
+ constructor();
1233
763
  }
1234
- export { ɵutil }
764
+ interface LazyModuleRef {
765
+ injector?: Injector;
766
+ promise?: Promise<Injector>;
767
+ }
768
+ declare const enum UpgradeAppType {
769
+ None = 0,
770
+ Dynamic = 1,
771
+ Static = 2,
772
+ Lite = 3
773
+ }
774
+ /**
775
+ * Glue the AngularJS `NgModelController` (if it exists) to the component
776
+ * (if it implements the needed subset of the `ControlValueAccessor` interface).
777
+ */
778
+ declare function hookupNgModel(ngModel: INgModelController, component: any): void;
779
+ /**
780
+ * Test two values for strict equality, accounting for the fact that `NaN !== NaN`.
781
+ */
782
+ declare function strictEquals(val1: any, val2: any): boolean;
1235
783
 
1236
- export { }
784
+ type util_d_Deferred<R> = Deferred<R>;
785
+ declare const util_d_Deferred: typeof Deferred;
786
+ type util_d_LazyModuleRef = LazyModuleRef;
787
+ type util_d_UpgradeAppType = UpgradeAppType;
788
+ declare const util_d_UpgradeAppType: typeof UpgradeAppType;
789
+ declare const util_d_cleanData: typeof cleanData;
790
+ declare const util_d_controllerKey: typeof controllerKey;
791
+ declare const util_d_destroyApp: typeof destroyApp;
792
+ declare const util_d_directiveNormalize: typeof directiveNormalize;
793
+ declare const util_d_getDowngradedModuleCount: typeof getDowngradedModuleCount;
794
+ declare const util_d_getTypeName: typeof getTypeName;
795
+ declare const util_d_getUpgradeAppType: typeof getUpgradeAppType;
796
+ declare const util_d_hookupNgModel: typeof hookupNgModel;
797
+ declare const util_d_isFunction: typeof isFunction;
798
+ declare const util_d_isNgModuleType: typeof isNgModuleType;
799
+ declare const util_d_onError: typeof onError;
800
+ declare const util_d_strictEquals: typeof strictEquals;
801
+ declare const util_d_validateInjectionKey: typeof validateInjectionKey;
802
+ declare namespace util_d {
803
+ export { util_d_Deferred as Deferred, type util_d_LazyModuleRef as LazyModuleRef, util_d_UpgradeAppType as UpgradeAppType, util_d_cleanData as cleanData, util_d_controllerKey as controllerKey, util_d_destroyApp as destroyApp, util_d_directiveNormalize as directiveNormalize, util_d_getDowngradedModuleCount as getDowngradedModuleCount, util_d_getTypeName as getTypeName, util_d_getUpgradeAppType as getUpgradeAppType, util_d_hookupNgModel as hookupNgModel, util_d_isFunction as isFunction, util_d_isNgModuleType as isNgModuleType, util_d_onError as onError, util_d_strictEquals as strictEquals, util_d_validateInjectionKey as validateInjectionKey };
804
+ }
805
+
806
+ export { UpgradeComponent, UpgradeModule, downgradeComponent, downgradeInjectable, downgradeModule, constants_d as ɵconstants, upgrade_helper_d as ɵupgradeHelper, util_d as ɵutil };