avancement planning

This commit is contained in:
2026-05-26 11:58:39 +02:00
parent 619a2b240a
commit 150b97cd2e
4892 changed files with 99214 additions and 429382 deletions
+10 -15
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
@@ -19,6 +19,8 @@ import { untracked as untracked$1, BASE_EFFECT_NODE, runEffect, createLinkedSign
* <my-comp (valueChange)="processNewValue($event)" />
* ```
*
* @see [Custom events with outputs](guide/components/outputs)
*
* @publicAPI
*/
class OutputEmitterRef {
@@ -85,6 +87,7 @@ function getOutputDestroyRef(ref) {
/**
* Execute an arbitrary function in a non-reactive (non-tracking) context. The executed function
* can, optionally, return a value.
* @see [Reading without tracking dependencies](guide/signals#reading-without-tracking-dependencies)
*/
function untracked(nonReactiveReadsFn) {
return untracked$1(nonReactiveReadsFn);
@@ -92,6 +95,7 @@ function untracked(nonReactiveReadsFn) {
/**
* Create a computed `Signal` which derives a reactive value from an expression.
* @see [Computed signals](guide/signals#computed-signals)
*/
function computed(computation, options) {
const getter = createComputed(computation, options?.equal);
@@ -127,6 +131,8 @@ class EffectRefImpl {
*
* `effect()` must be run in injection context, unless the `injector` option is manually specified.
*
* @see [Effects](guide/signals#effects)
*
* @publicApi 20.0
*/
function effect(effectFn, options) {
@@ -294,19 +300,13 @@ function upgradeLinkedSignalGetter(getter, debugName) {
return upgradedGetter;
}
/**
* Whether a `Resource.value()` should throw an error when the resource is in the error state.
*
* This internal flag is being used to gradually roll out this behavior.
*/
let RESOURCE_VALUE_THROWS_ERRORS_DEFAULT = true;
function resource(options) {
if (ngDevMode && !options?.injector) {
assertInInjectionContext(resource);
}
const oldNameForParams = options.request;
const params = (options.params ?? oldNameForParams ?? (() => null));
return new ResourceImpl(params, getLoader(options), options.defaultValue, options.equal ? wrapEqualityFn(options.equal) : undefined, options.injector ?? inject(Injector), RESOURCE_VALUE_THROWS_ERRORS_DEFAULT);
return new ResourceImpl(params, getLoader(options), options.defaultValue, options.equal ? wrapEqualityFn(options.equal) : undefined, options.injector ?? inject(Injector));
}
/**
* Base class which implements `.value` as a `WritableSignal` by delegating `.set` and `.update`.
@@ -361,7 +361,7 @@ class ResourceImpl extends BaseWritableResource {
resolvePendingTask = undefined;
destroyed = false;
unregisterOnDestroy;
constructor(request, loaderFn, defaultValue, equal, injector, throwErrorsFromValue = RESOURCE_VALUE_THROWS_ERRORS_DEFAULT) {
constructor(request, loaderFn, defaultValue, equal, injector) {
super(
// Feed a computed signal for the value to `BaseWritableResource`, which will upgrade it to a
// `WritableSignal` that delegates to `ResourceImpl.set`.
@@ -375,12 +375,7 @@ class ResourceImpl extends BaseWritableResource {
return defaultValue;
}
if (!isResolved(streamValue)) {
if (throwErrorsFromValue) {
throw new ResourceValueError(this.error());
}
else {
return defaultValue;
}
throw new ResourceValueError(this.error());
}
return streamValue.value;
}, { equal }));