You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have some large parameter-types which we would like to use both in *.feature files and also in our typescript code. Small example how we have to do it currently (some of our types are much, much larger):
Here the values are only defined once in typeValues without needing to repeat them. The CucumberJS runner also runs the scenario fine. But, the VSCode extension does not recognize the step anymore and marks it as not existing.
Is it possible that defineParameterType() can accept a variable for the regexp parameter?
⛏ Have you considered any alternatives or workarounds?
📚 Any additional context?
The text was updated successfully, but these errors were encountered:
kieran-ryan
changed the title
defineParameterType > regexp parameter should recognize variables
Support referencing variables in parameter type regular expressions
Jan 2, 2024
kieran-ryan
changed the title
Support referencing variables in parameter type regular expressions
Reference variables in parameter type regular expressions
Jan 7, 2024
I tried to solve the same problem. I found that this is not a problem of the plugin (this repo), but the language-service. And it is a huge problem. The language service does not operate on the executed javascript, but on the source text. It does not execute the source text, but looks at the syntax tree.
I fear that they won't change that in the near future, it would change most of the current architecture.
🤔 What's the problem you're trying to solve?
We have some large parameter-types which we would like to use both in
*.feature
files and also in our typescript code. Small example how we have to do it currently (some of our types are much, much larger):As you can see, we need to duplicate all type values.
✨ What's your proposed solution?
We tried a solution like this:
Here the values are only defined once in
typeValues
without needing to repeat them. The CucumberJS runner also runs the scenario fine. But, the VSCode extension does not recognize the step anymore and marks it as not existing.Is it possible that
defineParameterType()
can accept a variable for theregexp
parameter?⛏ Have you considered any alternatives or workarounds?
📚 Any additional context?
The text was updated successfully, but these errors were encountered: