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

Renderer messaging: do not use generics #125086

Closed
isidorn opened this issue Jun 1, 2021 · 2 comments
Closed

Renderer messaging: do not use generics #125086

isidorn opened this issue Jun 1, 2021 · 2 comments
Assignees
Labels
insiders-released Patch has been released in VS Code Insiders notebook polish Cleanup and polish issue under-discussion Issue is under discussion for relevance, priority, approach
Milestone

Comments

@isidorn
Copy link
Contributor

isidorn commented Jun 1, 2021

Testing #125016

Currently in the renderer messaging api we use <TSend = any, TReceive = TSend>. I suggest to instead simply use any since we already use that in other messaging api we have: debug protocol and for the WebView.

@connor4312 connor4312 added notebook polish Cleanup and polish issue labels Jun 1, 2021
@connor4312 connor4312 added this to the May 2021 milestone Jun 1, 2021
@mjbvz
Copy link
Collaborator

mjbvz commented Jun 1, 2021

I think the generics make sense in this case. Having them lets you optionally enforce typings on the messaging object

Webviews use any because postMessage belongs to the entire WebView object instead of a dedicated messaging class like we have here

@connor4312 connor4312 added the under-discussion Issue is under discussion for relevance, priority, approach label Jun 1, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
insiders-released Patch has been released in VS Code Insiders notebook polish Cleanup and polish issue under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

4 participants
@isidorn @connor4312 @mjbvz and others