-
I want to check if all references under a node are resolved. I need this to prevent running into assertions while validating a model. Is the following the right way of doing this? streamReferences(node).reduce((ok, description)=>ok && (description.reference.ref!==undefined), true); |
Beta Was this translation helpful? Give feedback.
Answered by
msujew
Feb 15, 2023
Replies: 1 comment 3 replies
-
Hey @goto40, Do you need all (as in: even those in children) references or only those defined on the specified node? If those on the specified node are enough, then your code should do well for that task 👍 Otherwise, you will need to wrap this with a call to |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
goto40
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @goto40,
Do you need all (as in: even those in children) references or only those defined on the specified node? If those on the specified node are enough, then your code should do well for that task 👍
Otherwise, you will need to wrap this with a call to
streamAst(node)
.