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

Add common Disposable API #222

Merged
merged 4 commits into from
Jan 24, 2023
Merged

Add common Disposable API #222

merged 4 commits into from
Jan 24, 2023

Conversation

tortmayr
Copy link
Contributor

@tortmayr tortmayr commented Jan 18, 2023

Provide a reusable Disposable API similar to what Theia/VS Code uses
Part of eclipse-glsp/glsp#867

Also: Update dev packages and autoformat package.json files

+ Autoformat package.json files
Provide a reusable Disposable API similar to what Theia/VS Code uses
Fixes eclipse-glsp/glsp#867
Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API looks good to me in general, thank you very much Tobias! If we ever need more functionality (e.g., listeners) we can always add them later. I was only wondering on whether we should already use the API in this package, e.g., there are a few places where we have register/deregister methods (e.g., tools, listeners, etc.) where the register call could return the corresponding deregister instead of void. Or will there be a separate task/PR for that?

packages/protocol/src/utils/disposable.ts Outdated Show resolved Hide resolved
@tortmayr
Copy link
Contributor Author

If we ever need more functionality (e.g., listeners) we can always add them later. I was only wondering on whether we should already use the API in this package, e.g., there are a few places where we have register/deregister methods (e.g., tools, listeners, etc.) where the register call could return the corresponding deregister instead of void. Or will there be a separate task/PR for that?

I think we should do that in a separate PR.

Co-authored-by: Martin Fleck <mfleck@eclipsesource.com>
Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tortmayr tortmayr merged commit ee71b2a into master Jan 24, 2023
@tortmayr tortmayr deleted the issues/867 branch January 24, 2023 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants