CDPR-Modding-Documentation / CDPR-Modding-Documentation/REDkit-bugtracker
witcherscript, annotations: support for `event` in @addMethod
Open
Scripting
- Dominant language
- No language data
- Stars
- 7
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
the `@addMethod` allows to add a method to a class, however it doesn't support event functions
**Describe the solution you'd like**
Add support for the `event` type of method:
```js
@addMethod(MyClass)
event OnSpawned(spawnData : SEntitySpawnData) {}
```
Doing so currently yields this error:
```
error: syntax error, unexpected TOKEN_EVENT, expecting TOKEN_FUNCTION, near 'event'
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.