feat: widen withResource to Resource beyond ResourceRef - #301
feat: widen withResource to Resource beyond ResourceRef#301michael-small wants to merge 3 commits into
withResource to Resource beyond ResourceRef#301Conversation
| withProps, | ||
| } from '@ngrx/signals'; | ||
|
|
||
| // TODO - add other specifics of HttpResourceRef (headers, statusCode, progress) |
There was a problem hiding this comment.
Should this be done in this PR? Or a separate PR?
I will already have a separate PR for exposing snapshot as we discussed in a different PR
There was a problem hiding this comment.
I would really prefer is we could this an a separate, as I would also see this is a more generic feature. For example it should also allow to expose resource types which we aren't even aware of.
|
Draft again: need to make the |
rainerhahnekamp
left a comment
There was a problem hiding this comment.
I think we should the generic resource feature (see comments) in a separate issue
| withProps, | ||
| } from '@ngrx/signals'; | ||
|
|
||
| // TODO - add other specifics of HttpResourceRef (headers, statusCode, progress) |
There was a problem hiding this comment.
I would really prefer is we could this an a separate, as I would also see this is a more generic feature. For example it should also allow to expose resource types which we aren't even aware of.
71fc0f6 to
b94e490
Compare
|
@rainerhahnekamp I have to make some changes so that |
|
Provided the following method in a new branch for |
| ); | ||
| } | ||
|
|
||
| export function isResourceRef(value: unknown): value is ResourceRef<unknown> { |
There was a problem hiding this comment.
Refer to https://github.com/angular/angular/pull/70616/changes#diff-16f6b7cc4c4e69b511c8312d38c6cf71c412e6f1d6ac9092054c0f349215cdedR117 and the existing isResource for a better implementation, pending review
997a066 to
39eaa74
Compare
39eaa74 to
ed018f5
Compare
|
The state of the feature is ready for review. That said, I am adding tests for the extensions branch off of this to need to pass the type assertion, while still resolving to the right values which are applicable to this branch on its own. |
Issue: #292