Skip to content
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

Custom editors: onDidEdit should not have optional data #93875

Closed
bpasero opened this issue Mar 31, 2020 · 5 comments
Closed

Custom editors: onDidEdit should not have optional data #93875

bpasero opened this issue Mar 31, 2020 · 5 comments
Assignees
Labels
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Mar 31, 2020

Refs: #93767

It seems to me that onDidEdit should force to send the edit, but this typing allows undefined from the fire method:

image

@mjbvz
Copy link
Contributor

mjbvz commented Mar 31, 2020

I believe the custom editor api typings are correct since they only use Event

This looks like a strict null error in our EventEmitter types. We should only let you omit the argument for EventEmitter<void>

@mjbvz mjbvz added the api label Mar 31, 2020
@mjbvz mjbvz added this to the April 2020 milestone Mar 31, 2020
@jrieken
Copy link
Member

jrieken commented Apr 1, 2020

Yeah, that's an event emitter problem. Unsure when/why that happened...

@mjbvz mjbvz closed this as completed in 1ed9dcd Apr 9, 2020
@bpasero
Copy link
Member Author

bpasero commented Apr 10, 2020

@mjbvz isn't 1ed9dcd a breaking API change?

@mjbvz
Copy link
Contributor

mjbvz commented Apr 10, 2020

Strictly perhaps, but not practically

This change will cause compile errors for extensions compiled with strict mode TS that were mistakenly calling fire(undefined). However doing that was almost certainly a bug in their code. Old extension code will keep working just fine but now the error will be obvious if an extension author recompiles it

@bpasero
Copy link
Member Author

bpasero commented Apr 10, 2020

That maybe deserves a shoutout in release notes.

@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants