@angular/core 20.0.0-next.1 → 20.0.0-next.3

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.
Files changed (54) hide show
  1. package/fesm2022/core.mjs +770 -2144
  2. package/fesm2022/core.mjs.map +1 -1
  3. package/fesm2022/primitives/di.mjs +3 -2
  4. package/fesm2022/primitives/di.mjs.map +1 -1
  5. package/fesm2022/primitives/event-dispatch.mjs +2 -589
  6. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  7. package/fesm2022/primitives/signals.mjs +44 -13
  8. package/fesm2022/primitives/signals.mjs.map +1 -1
  9. package/fesm2022/rxjs-interop.mjs +7 -39
  10. package/fesm2022/rxjs-interop.mjs.map +1 -1
  11. package/fesm2022/testing.mjs +116 -143
  12. package/fesm2022/testing.mjs.map +1 -1
  13. package/fesm2022/weak_ref-DrMdAIDh.mjs +12 -0
  14. package/fesm2022/weak_ref-DrMdAIDh.mjs.map +1 -0
  15. package/index.d.ts +14366 -15214
  16. package/navigation_types.d-u4EOrrdZ.d.ts +121 -0
  17. package/package.json +2 -2
  18. package/primitives/di/index.d.ts +66 -59
  19. package/primitives/event-dispatch/index.d.ts +205 -309
  20. package/primitives/signals/index.d.ts +161 -195
  21. package/rxjs-interop/index.d.ts +71 -100
  22. package/schematics/bundles/{apply_import_manager-e2a7fe5b.js → apply_import_manager-BXQEjo09.js} +15 -19
  23. package/schematics/bundles/{checker-af521da6.js → checker-BHb19MHt.js} +3695 -1175
  24. package/schematics/bundles/cleanup-unused-imports.js +56 -89
  25. package/schematics/bundles/{compiler_host-5a29293c.js → compiler_host-Bk3repE2.js} +19 -23
  26. package/schematics/bundles/control-flow-migration.js +81 -38
  27. package/schematics/bundles/{imports-047fbbc8.js → imports-CIX-JgAN.js} +9 -14
  28. package/schematics/bundles/{index-1bef3025.js → index-BL9kAIe5.js} +62 -66
  29. package/schematics/bundles/{program-a449f9bf.js → index-I8VbxQcO.js} +1508 -3178
  30. package/schematics/bundles/inject-flags.js +147 -0
  31. package/schematics/bundles/inject-migration.js +121 -127
  32. package/schematics/bundles/{leading_space-f8944434.js → leading_space-D9nQ8UQC.js} +1 -1
  33. package/schematics/bundles/{migrate_ts_type_references-2a3e9e6b.js → migrate_ts_type_references-KlOTWeDl.js} +121 -126
  34. package/schematics/bundles/{ng_decorators-b0d8b324.js → ng_decorators-DznZ5jMl.js} +4 -8
  35. package/schematics/bundles/{nodes-7758dbf6.js → nodes-B16H9JUd.js} +2 -6
  36. package/schematics/bundles/output-migration.js +94 -128
  37. package/schematics/bundles/{project_tsconfig_paths-b558633b.js → project_tsconfig_paths-CDVxT6Ov.js} +1 -1
  38. package/schematics/bundles/{property_name-ac18447e.js → property_name-BBwFuqMe.js} +3 -7
  39. package/schematics/bundles/route-lazy-loading.js +35 -41
  40. package/schematics/bundles/{project_paths-17dc204d.js → run_in_devkit-C0JPtK2u.js} +283 -216
  41. package/schematics/bundles/self-closing-tags-migration.js +55 -91
  42. package/schematics/bundles/signal-input-migration.js +121 -156
  43. package/schematics/bundles/signal-queries-migration.js +119 -154
  44. package/schematics/bundles/signals.js +12 -14
  45. package/schematics/bundles/standalone-migration.js +180 -200
  46. package/schematics/bundles/symbol-VPWguRxr.js +25 -0
  47. package/schematics/bundles/test-bed-get.js +98 -0
  48. package/schematics/migrations.json +8 -14
  49. package/testing/index.d.ts +289 -471
  50. package/weak_ref.d-ttyj86RV.d.ts +9 -0
  51. package/schematics/bundles/explicit-standalone-flag.js +0 -184
  52. package/schematics/bundles/index-ef1bffbb.js +0 -30
  53. package/schematics/bundles/pending-tasks.js +0 -103
  54. package/schematics/bundles/provide-initializer.js +0 -186
@@ -0,0 +1,121 @@
1
+ /**
2
+ * @license Angular v20.0.0-next.3
3
+ * (c) 2010-2025 Google LLC. https://angular.io/
4
+ * License: MIT
5
+ */
6
+
7
+ interface NavigationEventMap {
8
+ navigate: NavigateEvent;
9
+ navigatesuccess: Event;
10
+ navigateerror: ErrorEvent;
11
+ currententrychange: NavigationCurrentEntryChangeEvent;
12
+ }
13
+ interface NavigationResult {
14
+ committed: Promise<NavigationHistoryEntry>;
15
+ finished: Promise<NavigationHistoryEntry>;
16
+ }
17
+ declare class Navigation extends EventTarget {
18
+ entries(): NavigationHistoryEntry[];
19
+ readonly currentEntry: NavigationHistoryEntry | null;
20
+ updateCurrentEntry(options: NavigationUpdateCurrentEntryOptions): void;
21
+ readonly transition: NavigationTransition | null;
22
+ readonly canGoBack: boolean;
23
+ readonly canGoForward: boolean;
24
+ navigate(url: string, options?: NavigationNavigateOptions): NavigationResult;
25
+ reload(options?: NavigationReloadOptions): NavigationResult;
26
+ traverseTo(key: string, options?: NavigationOptions): NavigationResult;
27
+ back(options?: NavigationOptions): NavigationResult;
28
+ forward(options?: NavigationOptions): NavigationResult;
29
+ onnavigate: ((this: Navigation, ev: NavigateEvent) => any) | null;
30
+ onnavigatesuccess: ((this: Navigation, ev: Event) => any) | null;
31
+ onnavigateerror: ((this: Navigation, ev: ErrorEvent) => any) | null;
32
+ oncurrententrychange: ((this: Navigation, ev: NavigationCurrentEntryChangeEvent) => any) | null;
33
+ addEventListener<K extends keyof NavigationEventMap>(type: K, listener: (this: Navigation, ev: NavigationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
34
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
35
+ removeEventListener<K extends keyof NavigationEventMap>(type: K, listener: (this: Navigation, ev: NavigationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
36
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
37
+ }
38
+ declare class NavigationTransition {
39
+ readonly navigationType: NavigationTypeString;
40
+ readonly from: NavigationHistoryEntry;
41
+ readonly finished: Promise<void>;
42
+ }
43
+ interface NavigationHistoryEntryEventMap {
44
+ dispose: Event;
45
+ }
46
+ declare class NavigationHistoryEntry extends EventTarget {
47
+ readonly key: string;
48
+ readonly id: string;
49
+ readonly url: string | null;
50
+ readonly index: number;
51
+ readonly sameDocument: boolean;
52
+ getState(): unknown;
53
+ ondispose: ((this: NavigationHistoryEntry, ev: Event) => any) | null;
54
+ addEventListener<K extends keyof NavigationHistoryEntryEventMap>(type: K, listener: (this: NavigationHistoryEntry, ev: NavigationHistoryEntryEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
55
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
56
+ removeEventListener<K extends keyof NavigationHistoryEntryEventMap>(type: K, listener: (this: NavigationHistoryEntry, ev: NavigationHistoryEntryEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
57
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
58
+ }
59
+ type NavigationTypeString = 'reload' | 'push' | 'replace' | 'traverse';
60
+ interface NavigationUpdateCurrentEntryOptions {
61
+ state: unknown;
62
+ }
63
+ interface NavigationOptions {
64
+ info?: unknown;
65
+ }
66
+ interface NavigationNavigateOptions extends NavigationOptions {
67
+ state?: unknown;
68
+ history?: 'auto' | 'push' | 'replace';
69
+ }
70
+ interface NavigationReloadOptions extends NavigationOptions {
71
+ state?: unknown;
72
+ }
73
+ declare class NavigationCurrentEntryChangeEvent extends Event {
74
+ constructor(type: string, eventInit?: NavigationCurrentEntryChangeEventInit);
75
+ readonly navigationType: NavigationTypeString | null;
76
+ readonly from: NavigationHistoryEntry;
77
+ }
78
+ interface NavigationCurrentEntryChangeEventInit extends EventInit {
79
+ navigationType?: NavigationTypeString | null;
80
+ from: NavigationHistoryEntry;
81
+ }
82
+ declare class NavigateEvent extends Event {
83
+ constructor(type: string, eventInit?: NavigateEventInit);
84
+ readonly navigationType: NavigationTypeString;
85
+ readonly canIntercept: boolean;
86
+ readonly userInitiated: boolean;
87
+ readonly hashChange: boolean;
88
+ readonly destination: NavigationDestination;
89
+ readonly signal: AbortSignal;
90
+ readonly formData: FormData | null;
91
+ readonly downloadRequest: string | null;
92
+ readonly info?: unknown;
93
+ intercept(options?: NavigationInterceptOptions): void;
94
+ scroll(): void;
95
+ }
96
+ interface NavigateEventInit extends EventInit {
97
+ navigationType?: NavigationTypeString;
98
+ canIntercept?: boolean;
99
+ userInitiated?: boolean;
100
+ hashChange?: boolean;
101
+ destination: NavigationDestination;
102
+ signal: AbortSignal;
103
+ formData?: FormData | null;
104
+ downloadRequest?: string | null;
105
+ info?: unknown;
106
+ }
107
+ interface NavigationInterceptOptions {
108
+ handler?: () => Promise<void>;
109
+ focusReset?: 'after-transition' | 'manual';
110
+ scroll?: 'after-transition' | 'manual';
111
+ }
112
+ declare class NavigationDestination {
113
+ readonly url: string;
114
+ readonly key: string | null;
115
+ readonly id: string | null;
116
+ readonly index: number;
117
+ readonly sameDocument: boolean;
118
+ getState(): unknown;
119
+ }
120
+
121
+ export { NavigateEvent as N, Navigation as a, NavigationCurrentEntryChangeEvent as b, NavigationHistoryEntry as c, type NavigationNavigateOptions as d, type NavigationOptions as e, type NavigationReloadOptions as f, type NavigationResult as g, NavigationTransition as h, type NavigationUpdateCurrentEntryOptions as i, type NavigationTypeString as j, type NavigationInterceptOptions as k, NavigationDestination as l };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "20.0.0-next.1",
3
+ "version": "20.0.0-next.3",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  "tslib": "^2.3.0"
47
47
  },
48
48
  "peerDependencies": {
49
- "@angular/compiler": "20.0.0-next.1",
49
+ "@angular/compiler": "20.0.0-next.3",
50
50
  "rxjs": "^6.5.3 || ^7.4.0",
51
51
  "zone.js": "~0.15.0"
52
52
  },
@@ -1,54 +1,9 @@
1
1
  /**
2
- * @license Angular v20.0.0-next.1
2
+ * @license Angular v20.0.0-next.3
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
-
8
- export declare function getCurrentInjector(): Injector | undefined | null;
9
-
10
- /**
11
- * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.
12
- *
13
- * `InjectableType`s contain their own Dependency Injection metadata and are usable in an
14
- * `InjectorDef`-based `StaticInjector`.
15
- *
16
- * @publicApi
17
- */
18
- export declare interface InjectionToken<T> extends Type<T> {
19
- ɵprov: ɵɵInjectableDeclaration<T>;
20
- }
21
-
22
- export declare interface Injector {
23
- retrieve?<T>(token: InjectionToken<T>, options?: unknown): T | NotFound;
24
- }
25
-
26
- /**
27
- * Type guard for checking if an unknown value is a NotFound.
28
- */
29
- export declare function isNotFound(e: unknown): e is NotFound;
30
-
31
- /**
32
- * Value returned if the key-value pair couldn't be found in the context
33
- * hierarchy.
34
- */
35
- export declare const NOT_FOUND: unique symbol;
36
-
37
- /**
38
- * Type union of NotFound and NotFoundError.
39
- */
40
- export declare type NotFound = typeof NOT_FOUND | NotFoundError;
41
-
42
- /**
43
- * Error thrown when the key-value pair couldn't be found in the context
44
- * hierarchy. Context can be attached below.
45
- */
46
- export declare class NotFoundError extends Error {
47
- constructor(message: string);
48
- }
49
-
50
- export declare function setCurrentInjector(injector: Injector | null | undefined): Injector | undefined | null;
51
-
52
7
  /**
53
8
  * @description
54
9
  *
@@ -60,24 +15,37 @@ export declare function setCurrentInjector(injector: Injector | null | undefined
60
15
  * @publicApi
61
16
  */
62
17
  declare const Type: FunctionConstructor;
63
-
64
- declare interface Type<T> extends Function {
18
+ interface Type<T> extends Function {
65
19
  new (...args: any[]): T;
66
20
  }
67
21
 
68
22
  /**
69
- * Information about how a type or `InjectionToken` interfaces with the DI system.
23
+ * Information about how a type or `InjectionToken` interfaces with the DI
24
+ * system. This describes:
70
25
  *
71
- * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly
72
- * requesting injection of other types if necessary.
26
+ * 1. *How* the type is provided
27
+ * The declaration must specify only one of the following:
28
+ * - A `value` which is a predefined instance of the type.
29
+ * - A `factory` which defines how to create the given type `T`, possibly
30
+ * requesting injection of other types if necessary.
31
+ * - Neither, in which case the type is expected to already be present in the
32
+ * injector hierarchy. This is used for internal use cases.
73
33
  *
74
- * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular
75
- * `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates
76
- * that the injectable does not belong to any scope.
34
+ * 2. *Where* the type is stored (if it is stored)
35
+ * - The `providedIn` parameter specifies which injector the type belongs to.
36
+ * - The `token` is used as the key to store the type in the injector.
77
37
  */
78
- export declare interface ɵɵInjectableDeclaration<T> {
38
+ interface ɵɵInjectableDeclaration<T> {
79
39
  /**
80
- * Specifies that the given type belongs to a particular injector:
40
+ * Specifies that the given type belongs to a particular `Injector`,
41
+ * `NgModule`, or a special scope (e.g. `'root'`).
42
+ *
43
+ * `any` is deprecated and will be removed soon.
44
+ *
45
+ * A value of `null` indicates that the injectable does not belong to any
46
+ * scope, and won't be stored in any injector. For declarations with a
47
+ * factory, this will create a new instance of the type each time it is
48
+ * requested.
81
49
  */
82
50
  providedIn: Type<any> | 'root' | 'platform' | 'any' | null;
83
51
  /**
@@ -89,11 +57,50 @@ export declare interface ɵɵInjectableDeclaration<T> {
89
57
  /**
90
58
  * Factory method to execute to create an instance of the injectable.
91
59
  */
92
- factory: (t?: Type<any>) => T;
60
+ factory?: (t?: Type<any>) => T;
93
61
  /**
94
62
  * In a case of no explicit injector, a location where the instance of the injectable is stored.
95
63
  */
96
- value: T | undefined;
64
+ value?: T;
65
+ }
66
+ /**
67
+ * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.
68
+ *
69
+ * `InjectableType`s contain their own Dependency Injection metadata and are usable in an
70
+ * `InjectorDef`-based `StaticInjector`.
71
+ *
72
+ * @publicApi
73
+ */
74
+ interface InjectionToken<T> {
75
+ ɵprov: ɵɵInjectableDeclaration<T>;
76
+ }
77
+
78
+ /**
79
+ * Value returned if the key-value pair couldn't be found in the context
80
+ * hierarchy.
81
+ */
82
+ declare const NOT_FOUND: unique symbol;
83
+ /**
84
+ * Error thrown when the key-value pair couldn't be found in the context
85
+ * hierarchy. Context can be attached below.
86
+ */
87
+ declare class NotFoundError extends Error {
88
+ readonly name: string;
89
+ constructor(message: string);
90
+ }
91
+ /**
92
+ * Type guard for checking if an unknown value is a NotFound.
93
+ */
94
+ declare function isNotFound(e: unknown): e is NotFound;
95
+ /**
96
+ * Type union of NotFound and NotFoundError.
97
+ */
98
+ type NotFound = typeof NOT_FOUND | NotFoundError;
99
+
100
+ interface Injector {
101
+ retrieve<T>(token: InjectionToken<T>, options?: unknown): T | NotFound;
97
102
  }
103
+ declare function getCurrentInjector(): Injector | undefined | null;
104
+ declare function setCurrentInjector(injector: Injector | null | undefined): Injector | undefined | null;
98
105
 
99
- export { }
106
+ export { type InjectionToken, type Injector, NOT_FOUND, type NotFound, NotFoundError, getCurrentInjector, isNotFound, setCurrentInjector, type ɵɵInjectableDeclaration };