Generic node property validator util #1783
guyo13
started this conversation in
Show and tell
Replies: 2 comments
-
For anyone interested, I created a utility library that contains this function. @guyo13/langium-utils |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hey @guyo13, looks pretty interesting. I haven't tried this out, but I'm wondering whether the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just discovered this amazing project and started hacking at it to create DSLs for my projects and clients!
I created a small validator util which can validate for uniqueness of property values over a typed array of AstNodes.
It is adapted from the example in the tutorials but the nice thing is that both the node type and its property are typed which facilitates development.
Here is the code
Example usage in a validator:
Wdyt? Is the type constraint on
P
accurate? Maybe its worth to start some validation utils library as part of the monorepo.Beta Was this translation helpful? Give feedback.
All reactions