Skip to content

add changeAnnotation event to types of EditSession #5319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
snaptopixel opened this issue Sep 19, 2023 · 2 comments
Closed

add changeAnnotation event to types of EditSession #5319

snaptopixel opened this issue Sep 19, 2023 · 2 comments

Comments

@snaptopixel
Copy link

Describe the bug

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

@marinsokol5
Copy link
Contributor

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.

@marinsokol5 marinsokol5 changed the title (module name): (short issue description) add changeAnnotation event to types of EditSession Sep 21, 2023
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants