how to change parameters of a decorator
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 238
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
Similar to my question about adding params to a super, I need some help on modifying the parameters of a class decorator.
I want to add some extra entries to the "x" property of the decorators first property
```
@AclPath({
x: ['foo','bar],
})
class Test {}
```
in my "parsing" code I have this
```
console.log(
classDef.getDecorator('AclPath').getArguments()[0].getText()
);
```
which gives me the text of the argument. I've tried looking at the ast viewer

looking at this, I thought that "symbol" would be the way to go ... however - if I use `getSymbol()` on `classDef.getDecorator('AclPath').getArguments()[0]` I get undefined
Is there any way of getting the arguments of `imports` and directly manipulating that ? at the moment, I'm messing about with
string manipulation which just feels dirty ;)
Contributor guide
Assessment
This issue has not been assessed yet.