Start using app.commands.execute for all commands called from extension.ts#2207
Merged
robertbrignull merged 5 commits intomainfrom Mar 22, 2023
Merged
Start using app.commands.execute for all commands called from extension.ts#2207robertbrignull merged 5 commits intomainfrom
robertbrignull merged 5 commits intomainfrom
Conversation
charisk
approved these changes
Mar 22, 2023
koesie10
approved these changes
Mar 22, 2023
|
|
||
| export type AllCommands = BaseCommands & | ||
| // All commands where the implementation is provided by this extension. | ||
| export type AllCodeQLCommands = BaseCommands & |
Member
There was a problem hiding this comment.
Should this perhaps be called AllExtensionCommands or just ExtensionCommands? I believe we're mostly using extension to refer to the extension (like in ExtensionApp), rather than CodeQL (since this can also refer to the CLI).
Contributor
Author
charisk
approved these changes
Mar 22, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We want to replace all calls to
commands.executeCommandwithapp.commands.executeso we can take advantage of the new typing. This PR converts the few calls fromextension.tsto the new method. This is just a first small PR to test the approach and make sure we're happy.I've introduced the separation between commands where we are providing the implementation, and commands that are provided for us but we still want to get strong typing.
If we're happy with the groundwork laid by this PR then we should be able to start converting more command usages.
Checklist
ready-for-doc-reviewlabel there.