- Notifications
You must be signed in to change notification settings - Fork1.9k
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Hi everyone, I was testing a NestJS codebase which uses a lot of different decorators to implement some logic. In particular, I wanted to build a query to get all classes with a My attempt was to do something like this: But this is matching all classes with a Any help would be really appreciated! |
BetaWas this translation helpful?Give feedback.
All reactions
Your code works for me for simple examples. Can you provide a code example that exhibits the problem?
One thing to watch out for:toString is abbreviated for AST nodes that would naturally consume more than 20 characters, so e.g.@RequireRole("Looooong") might turn into"@Requir ... ooong)". If that's the problem, you may need to usegetADecorator().getExpression().(InvokeExpr).getCalleeName() or similar (depending on the exact nature of the decorator) to extract the decorator's full function name.
Replies: 1 comment 1 reply
-
Your code works for me for simple examples. Can you provide a code example that exhibits the problem? One thing to watch out for: |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hi@smowton, and thanks for the quick response! |
BetaWas this translation helpful?Give feedback.