@angular/core 20.0.0-next.2 → 20.0.0-next.4

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 (56) hide show
  1. package/event_dispatcher.d-pVP0-wST.d.ts +345 -0
  2. package/fesm2022/core.mjs +614 -428
  3. package/fesm2022/core.mjs.map +1 -1
  4. package/fesm2022/injector-BlLwZ2sr.mjs +24 -0
  5. package/fesm2022/injector-BlLwZ2sr.mjs.map +1 -0
  6. package/fesm2022/primitives/di.mjs +5 -18
  7. package/fesm2022/primitives/di.mjs.map +1 -1
  8. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  9. package/fesm2022/primitives/signals.mjs +4 -589
  10. package/fesm2022/primitives/signals.mjs.map +1 -1
  11. package/fesm2022/rxjs-interop.mjs +1 -8
  12. package/fesm2022/rxjs-interop.mjs.map +1 -1
  13. package/fesm2022/testing.mjs +2 -10
  14. package/fesm2022/testing.mjs.map +1 -1
  15. package/fesm2022/untracked-DkcXpNb_.mjs +620 -0
  16. package/fesm2022/untracked-DkcXpNb_.mjs.map +1 -0
  17. package/index.d.ts +7589 -7510
  18. package/{navigation_types.d-u4EOrrdZ.d.ts → navigation_types.d-DgDrF5rp.d.ts} +2 -2
  19. package/package.json +2 -2
  20. package/primitives/di/index.d.ts +25 -10
  21. package/primitives/event-dispatch/index.d.ts +5 -340
  22. package/primitives/signals/index.d.ts +5 -208
  23. package/rxjs-interop/index.d.ts +1 -10
  24. package/schematics/bundles/{apply_import_manager-CyRT0UvU.js → apply_import_manager-CeNv8GIG.js} +6 -6
  25. package/schematics/bundles/{checker-DF8ZaFW5.js → checker-k591b6WQ.js} +856 -180
  26. package/schematics/bundles/cleanup-unused-imports.js +42 -69
  27. package/schematics/bundles/{compiler_host-Da636uJ8.js → compiler_host-DwM3ugW3.js} +2 -2
  28. package/schematics/bundles/control-flow-migration.js +34 -13
  29. package/schematics/bundles/imports-CIX-JgAN.js +1 -1
  30. package/schematics/bundles/{program-BZk27Ndu.js → index-B4OAlHh8.js} +2234 -2097
  31. package/schematics/bundles/{index-DnkWgagp.js → index-BhELUmYx.js} +11 -11
  32. package/schematics/bundles/inject-flags.js +18 -52
  33. package/schematics/bundles/inject-migration.js +3 -3
  34. package/schematics/bundles/leading_space-D9nQ8UQC.js +1 -1
  35. package/schematics/bundles/{migrate_ts_type_references-DtkOnnv0.js → migrate_ts_type_references-Be0TNYen.js} +20 -20
  36. package/schematics/bundles/ng_decorators-DznZ5jMl.js +1 -1
  37. package/schematics/bundles/nodes-B16H9JUd.js +1 -1
  38. package/schematics/bundles/output-migration.js +62 -90
  39. package/schematics/bundles/project_tsconfig_paths-CDVxT6Ov.js +1 -1
  40. package/schematics/bundles/property_name-BBwFuqMe.js +1 -1
  41. package/schematics/bundles/route-lazy-loading.js +3 -3
  42. package/schematics/bundles/{project_paths-Jtbi76Bs.js → run_in_devkit-CkvEksWP.js} +262 -197
  43. package/schematics/bundles/self-closing-tags-migration.js +41 -71
  44. package/schematics/bundles/signal-input-migration.js +69 -97
  45. package/schematics/bundles/signal-queries-migration.js +80 -108
  46. package/schematics/bundles/signals.js +11 -11
  47. package/schematics/bundles/standalone-migration.js +8 -22
  48. package/schematics/bundles/symbol-VPWguRxr.js +25 -0
  49. package/schematics/bundles/test-bed-get.js +98 -0
  50. package/schematics/migrations.json +5 -0
  51. package/testing/index.d.ts +2 -4
  52. package/weak_ref.d-BZ7gyRag.d.ts +216 -0
  53. package/fesm2022/weak_ref-DrMdAIDh.mjs +0 -12
  54. package/fesm2022/weak_ref-DrMdAIDh.mjs.map +0 -1
  55. package/schematics/bundles/index-vGJcp5M7.js +0 -30
  56. package/weak_ref.d-ttyj86RV.d.ts +0 -9
@@ -0,0 +1,216 @@
1
+ /**
2
+ * @license Angular v20.0.0-next.4
3
+ * (c) 2010-2025 Google LLC. https://angular.io/
4
+ * License: MIT
5
+ */
6
+
7
+ /**
8
+ * A comparison function which can determine if two values are equal.
9
+ */
10
+ type ValueEqualityFn<T> = (a: T, b: T) => boolean;
11
+ /**
12
+ * The default equality function used for `signal` and `computed`, which uses referential equality.
13
+ */
14
+ declare function defaultEquals<T>(a: T, b: T): boolean;
15
+
16
+ type Version = number & {
17
+ __brand: 'Version';
18
+ };
19
+ type ReactiveHookFn = (node: ReactiveNode) => void;
20
+ /**
21
+ * Symbol used to tell `Signal`s apart from other functions.
22
+ *
23
+ * This can be used to auto-unwrap signals in various cases, or to auto-wrap non-signal values.
24
+ */
25
+ declare const SIGNAL: unique symbol;
26
+ declare function setActiveConsumer(consumer: ReactiveNode | null): ReactiveNode | null;
27
+ declare function getActiveConsumer(): ReactiveNode | null;
28
+ declare function isInNotificationPhase(): boolean;
29
+ interface Reactive {
30
+ [SIGNAL]: ReactiveNode;
31
+ }
32
+ declare function isReactive(value: unknown): value is Reactive;
33
+ declare const REACTIVE_NODE: ReactiveNode;
34
+ /**
35
+ * A producer and/or consumer which participates in the reactive graph.
36
+ *
37
+ * Producer `ReactiveNode`s which are accessed when a consumer `ReactiveNode` is the
38
+ * `activeConsumer` are tracked as dependencies of that consumer.
39
+ *
40
+ * Certain consumers are also tracked as "live" consumers and create edges in the other direction,
41
+ * from producer to consumer. These edges are used to propagate change notifications when a
42
+ * producer's value is updated.
43
+ *
44
+ * A `ReactiveNode` may be both a producer and consumer.
45
+ */
46
+ interface ReactiveNode {
47
+ /**
48
+ * Version of the value that this node produces.
49
+ *
50
+ * This is incremented whenever a new value is produced by this node which is not equal to the
51
+ * previous value (by whatever definition of equality is in use).
52
+ */
53
+ version: Version;
54
+ /**
55
+ * Epoch at which this node is verified to be clean.
56
+ *
57
+ * This allows skipping of some polling operations in the case where no signals have been set
58
+ * since this node was last read.
59
+ */
60
+ lastCleanEpoch: Version;
61
+ /**
62
+ * Whether this node (in its consumer capacity) is dirty.
63
+ *
64
+ * Only live consumers become dirty, when receiving a change notification from a dependency
65
+ * producer.
66
+ */
67
+ dirty: boolean;
68
+ /**
69
+ * Producers which are dependencies of this consumer.
70
+ *
71
+ * Uses the same indices as the `producerLastReadVersion` and `producerIndexOfThis` arrays.
72
+ */
73
+ producerNode: ReactiveNode[] | undefined;
74
+ /**
75
+ * `Version` of the value last read by a given producer.
76
+ *
77
+ * Uses the same indices as the `producerNode` and `producerIndexOfThis` arrays.
78
+ */
79
+ producerLastReadVersion: Version[] | undefined;
80
+ /**
81
+ * Index of `this` (consumer) in each producer's `liveConsumers` array.
82
+ *
83
+ * This value is only meaningful if this node is live (`liveConsumers.length > 0`). Otherwise
84
+ * these indices are stale.
85
+ *
86
+ * Uses the same indices as the `producerNode` and `producerLastReadVersion` arrays.
87
+ */
88
+ producerIndexOfThis: number[] | undefined;
89
+ /**
90
+ * Index into the producer arrays that the next dependency of this node as a consumer will use.
91
+ *
92
+ * This index is zeroed before this node as a consumer begins executing. When a producer is read,
93
+ * it gets inserted into the producers arrays at this index. There may be an existing dependency
94
+ * in this location which may or may not match the incoming producer, depending on whether the
95
+ * same producers were read in the same order as the last computation.
96
+ */
97
+ nextProducerIndex: number;
98
+ /**
99
+ * Array of consumers of this producer that are "live" (they require push notifications).
100
+ *
101
+ * `liveConsumerNode.length` is effectively our reference count for this node.
102
+ */
103
+ liveConsumerNode: ReactiveNode[] | undefined;
104
+ /**
105
+ * Index of `this` (producer) in each consumer's `producerNode` array.
106
+ *
107
+ * Uses the same indices as the `liveConsumerNode` array.
108
+ */
109
+ liveConsumerIndexOfThis: number[] | undefined;
110
+ /**
111
+ * Whether writes to signals are allowed when this consumer is the `activeConsumer`.
112
+ *
113
+ * This is used to enforce guardrails such as preventing writes to writable signals in the
114
+ * computation function of computed signals, which is supposed to be pure.
115
+ */
116
+ consumerAllowSignalWrites: boolean;
117
+ readonly consumerIsAlwaysLive: boolean;
118
+ /**
119
+ * Tracks whether producers need to recompute their value independently of the reactive graph (for
120
+ * example, if no initial value has been computed).
121
+ */
122
+ producerMustRecompute(node: unknown): boolean;
123
+ producerRecomputeValue(node: unknown): void;
124
+ consumerMarkedDirty(node: unknown): void;
125
+ /**
126
+ * Called when a signal is read within this consumer.
127
+ */
128
+ consumerOnSignalRead(node: unknown): void;
129
+ /**
130
+ * A debug name for the reactive node. Used in Angular DevTools to identify the node.
131
+ */
132
+ debugName?: string;
133
+ /**
134
+ * Kind of node. Example: 'signal', 'computed', 'input', 'effect'.
135
+ *
136
+ * ReactiveNode has this as 'unknown' by default, but derived node types should override this to
137
+ * make available the kind of signal that particular instance of a ReactiveNode represents.
138
+ *
139
+ * Used in Angular DevTools to identify the kind of signal.
140
+ */
141
+ kind: string;
142
+ }
143
+ /**
144
+ * Called by implementations when a producer's signal is read.
145
+ */
146
+ declare function producerAccessed(node: ReactiveNode): void;
147
+ /**
148
+ * Increment the global epoch counter.
149
+ *
150
+ * Called by source producers (that is, not computeds) whenever their values change.
151
+ */
152
+ declare function producerIncrementEpoch(): void;
153
+ /**
154
+ * Ensure this producer's `version` is up-to-date.
155
+ */
156
+ declare function producerUpdateValueVersion(node: ReactiveNode): void;
157
+ /**
158
+ * Propagate a dirty notification to live consumers of this producer.
159
+ */
160
+ declare function producerNotifyConsumers(node: ReactiveNode): void;
161
+ /**
162
+ * Whether this `ReactiveNode` in its producer capacity is currently allowed to initiate updates,
163
+ * based on the current consumer context.
164
+ */
165
+ declare function producerUpdatesAllowed(): boolean;
166
+ declare function consumerMarkDirty(node: ReactiveNode): void;
167
+ declare function producerMarkClean(node: ReactiveNode): void;
168
+ /**
169
+ * Prepare this consumer to run a computation in its reactive context.
170
+ *
171
+ * Must be called by subclasses which represent reactive computations, before those computations
172
+ * begin.
173
+ */
174
+ declare function consumerBeforeComputation(node: ReactiveNode | null): ReactiveNode | null;
175
+ /**
176
+ * Finalize this consumer's state after a reactive computation has run.
177
+ *
178
+ * Must be called by subclasses which represent reactive computations, after those computations
179
+ * have finished.
180
+ */
181
+ declare function consumerAfterComputation(node: ReactiveNode | null, prevConsumer: ReactiveNode | null): void;
182
+ /**
183
+ * Determine whether this consumer has any dependencies which have changed since the last time
184
+ * they were read.
185
+ */
186
+ declare function consumerPollProducersForChange(node: ReactiveNode): boolean;
187
+ /**
188
+ * Disconnect this consumer from the graph.
189
+ */
190
+ declare function consumerDestroy(node: ReactiveNode): void;
191
+ declare function runPostProducerCreatedFn(node: ReactiveNode): void;
192
+ declare function setPostProducerCreatedFn(fn: ReactiveHookFn | null): ReactiveHookFn | null;
193
+
194
+ interface SignalNode<T> extends ReactiveNode {
195
+ value: T;
196
+ equal: ValueEqualityFn<T>;
197
+ }
198
+ type SignalBaseGetter<T> = (() => T) & {
199
+ readonly [SIGNAL]: unknown;
200
+ };
201
+ interface SignalGetter<T> extends SignalBaseGetter<T> {
202
+ readonly [SIGNAL]: SignalNode<T>;
203
+ }
204
+ /**
205
+ * Create a `Signal` that can be set or updated directly.
206
+ */
207
+ declare function createSignal<T>(initialValue: T, equal?: ValueEqualityFn<T>): SignalGetter<T>;
208
+ declare function setPostSignalSetFn(fn: ReactiveHookFn | null): ReactiveHookFn | null;
209
+ declare function signalSetFn<T>(node: SignalNode<T>, newValue: T): void;
210
+ declare function signalUpdateFn<T>(node: SignalNode<T>, updater: (value: T) => T): void;
211
+ declare function runPostSignalSetFn<T>(node: SignalNode<T>): void;
212
+ declare const SIGNAL_NODE: SignalNode<unknown>;
213
+
214
+ declare function setAlternateWeakRefImpl(impl: unknown): void;
215
+
216
+ export { setPostSignalSetFn as A, signalSetFn as B, signalUpdateFn as C, setAlternateWeakRefImpl as D, type ReactiveNode as R, SIGNAL as S, type ValueEqualityFn as V, type SignalNode as a, REACTIVE_NODE as b, type Reactive as c, defaultEquals as d, type ReactiveHookFn as e, consumerAfterComputation as f, consumerBeforeComputation as g, consumerDestroy as h, consumerMarkDirty as i, consumerPollProducersForChange as j, getActiveConsumer as k, isInNotificationPhase as l, isReactive as m, producerIncrementEpoch as n, producerMarkClean as o, producerAccessed as p, producerNotifyConsumers as q, producerUpdateValueVersion as r, producerUpdatesAllowed as s, runPostProducerCreatedFn as t, setActiveConsumer as u, setPostProducerCreatedFn as v, SIGNAL_NODE as w, type SignalGetter as x, createSignal as y, runPostSignalSetFn as z };
@@ -1,12 +0,0 @@
1
- /**
2
- * @license Angular v20.0.0-next.2
3
- * (c) 2010-2025 Google LLC. https://angular.io/
4
- * License: MIT
5
- */
6
-
7
- function setAlternateWeakRefImpl(impl) {
8
- // TODO: remove this function
9
- }
10
-
11
- export { setAlternateWeakRefImpl as s };
12
- //# sourceMappingURL=weak_ref-DrMdAIDh.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"weak_ref-DrMdAIDh.mjs","sources":["../../../../../../packages/core/primitives/signals/src/weak_ref.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport function setAlternateWeakRefImpl(impl: unknown) {\n // TODO: remove this function\n}\n"],"names":[],"mappings":";;;;;;AAQM,SAAU,uBAAuB,CAAC,IAAa,EAAA;;AAErD;;;;"}
@@ -1,30 +0,0 @@
1
- 'use strict';
2
- /**
3
- * @license Angular v20.0.0-next.2
4
- * (c) 2010-2025 Google LLC. https://angular.io/
5
- * License: MIT
6
- */
7
- 'use strict';
8
-
9
- require('os');
10
- require('typescript');
11
- var checker = require('./checker-DF8ZaFW5.js');
12
- require('./program-BZk27Ndu.js');
13
- require('path');
14
-
15
- /**
16
- * @module
17
- * @description
18
- * Entry point for all public APIs of the compiler-cli package.
19
- */
20
- new checker.Version('20.0.0-next.2');
21
-
22
- var LogLevel;
23
- (function (LogLevel) {
24
- LogLevel[LogLevel["debug"] = 0] = "debug";
25
- LogLevel[LogLevel["info"] = 1] = "info";
26
- LogLevel[LogLevel["warn"] = 2] = "warn";
27
- LogLevel[LogLevel["error"] = 3] = "error";
28
- })(LogLevel || (LogLevel = {}));
29
-
30
- checker.setFileSystem(new checker.NodeJSFileSystem());
@@ -1,9 +0,0 @@
1
- /**
2
- * @license Angular v20.0.0-next.2
3
- * (c) 2010-2025 Google LLC. https://angular.io/
4
- * License: MIT
5
- */
6
-
7
- declare function setAlternateWeakRefImpl(impl: unknown): void;
8
-
9
- export { setAlternateWeakRefImpl as s };