feat(core): add "kind" to signal prototype nodes#58333
feat(core): add "kind" to signal prototype nodes#58333AleksanderBodurri wants to merge 1 commit intoangular:mainfrom
Conversation
cd19a29 to
f74db1d
Compare
dgp1130
left a comment
There was a problem hiding this comment.
NOTE: resource uses signal under the hood, so it will have kind: 'signal', I think that's fine for now, but just FYI.
There was a problem hiding this comment.
We can make this required, and specify kind: 'unknown' in REACTIVE_NODE.
There was a problem hiding this comment.
Angular and primitives code changes can't go into the same commit sadly (though this LGTM).
f74db1d to
1687c56
Compare
1687c56 to
17f193a
Compare
AndrewKushnir
left a comment
There was a problem hiding this comment.
Reviewed-for: public-api
There was a problem hiding this comment.
I assume there's a reason the type is string here rather than 'signal' | 'computed' | ...?
There was a problem hiding this comment.
If the Angular framework wants to create a node type and set kind to 'some-new-node-type' we would have to add that to the type contract in the primitive signals library. Having the type contract be less strict here lets us avoid this coupling and lets primitives/signals library consumers define their own "kind" of nodes.
|
@AleksanderBodurri Looks like other than fixing lint and a presubmit, this is good to go. |
1621a9e to
168f436
Compare
|
ahh missed that linting was failing, thanks @thePunderWoman 🙏 |
Enables debug APIs to determine the kind of a signal given a node.
168f436 to
0836aff
Compare
|
"green" TGP |
|
This PR was merged into the repository by commit fa0a9a5. The changes were merged into the following branches: main |
Builds on angular#58333 by assigning the kind field to reactive nodes that are not in the `core/primitives` package.
|
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 would enable debug APIs to determine the kind of a signal given a node for #57074