Closed
Conversation
Member
Author
|
Caretaker: this needs an update to the g3 patch & a single client application: cl/760838126 |
pkozlowski-opensource
approved these changes
May 20, 2025
Member
pkozlowski-opensource
left a comment
There was a problem hiding this comment.
LGTM
Reviewed-for: fw-general
Reviewed-for: public-api
c60422e to
301e5ba
Compare
It was set to es2022 for build tsconfig in https://github.com/angular/angular/pull/60066/files#diff-7ec658aedc62a693cc513accc8f360938d90bcbdb09aa79c1401e56fe84f5fd3, but was missed for the main one.
301e5ba to
99b2641
Compare
Now only mutable resources can be reloaded.
`Resource.error` used to return `unknown`. Now it's `Error | undefined`. For non-`Error` types they are encapsulated with the `Error` type.
…g undefined When there is an underlying error state it would not be possible to swallow the error with: `computed(() => res.value()?.inner);`
When the resource is loading after reloading from the error state reading `Resource.value()` would return the default value instead of throwing an error. This change prevents `Resource.hasValue()` from throwing an error in such a case.
99b2641 to
ad0346c
Compare
Contributor
|
This PR was merged into the repository by commit 905194f. The changes were merged into the following branches: main, 20.0.x |
atscott
pushed a commit
that referenced
this pull request
May 21, 2025
Now only mutable resources can be reloaded. PR Close #61441
atscott
pushed a commit
that referenced
this pull request
May 21, 2025
`Resource.error` used to return `unknown`. Now it's `Error | undefined`. For non-`Error` types they are encapsulated with the `Error` type. PR Close #61441
atscott
pushed a commit
that referenced
this pull request
May 21, 2025
It was set to es2022 for build tsconfig in https://github.com/angular/angular/pull/60066/files#diff-7ec658aedc62a693cc513accc8f360938d90bcbdb09aa79c1401e56fe84f5fd3, but was missed for the main one. PR Close #61441
atscott
pushed a commit
that referenced
this pull request
May 21, 2025
Now only mutable resources can be reloaded. PR Close #61441
atscott
pushed a commit
that referenced
this pull request
May 21, 2025
`Resource.error` used to return `unknown`. Now it's `Error | undefined`. For non-`Error` types they are encapsulated with the `Error` type. PR Close #61441
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A copy of #60610 with a flag to allow the behavior to be patched out.