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
changeAnnotation event is not listed in the types for session.on inside ace.d.ts
Expected Behavior
When using typescript and writing editor.session.on('changeAnnotation', fn) not to get a typescript error
Current Behavior
The following TypeError is raised
No overload matches this call.
The last overload gave the following error.
Argument of type '"changeAnnotation"' is not assignable to parameter of type '"changeTabSize"'.ts(2769)
Reproduction Steps
When using typescript and write editor.session.on('changeAnnotation', fn) to get a typescript error
Possible Solution
The types need to be updated to match all supported event names
Additional Information/Context
No response
Ace Version / Browser / OS / Keyboard layout
TypeScript in VSCode
The text was updated successfully, but these errors were encountered:
Hey!
Thanks for the feedback. Indeed you are right that we are missing this type in ace.d.ts. It's sort of a never ending battle for us to keep this file in sync with the actual implementation.
We are right now working on auto-generating it based on JSDoc: #5318, in which case the current ace.d.ts will just be thrown away.
So I am hesitant to make a change for it right now, but let's keep this issue open in case we don't merge #5318
I also don't really know yet how that implementation is going to pick up events but I am curious to try it.
This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
Describe the bug
changeAnnotation
event is not listed in the types forsession.on
insideace.d.ts
Expected Behavior
When using typescript and writing
editor.session.on('changeAnnotation', fn)
not to get a typescript errorCurrent Behavior
The following TypeError is raised
Reproduction Steps
When using typescript and write
editor.session.on('changeAnnotation', fn)
to get a typescript errorPossible Solution
The types need to be updated to match all supported event names
Additional Information/Context
No response
Ace Version / Browser / OS / Keyboard layout
TypeScript in VSCode
The text was updated successfully, but these errors were encountered: