Skip to content

Fix type safeness of executeCommand#16383

Merged
jakebailey merged 4 commits intomicrosoft:mainfrom
jakebailey:fix-command-types
Jun 4, 2021
Merged

Fix type safeness of executeCommand#16383
jakebailey merged 4 commits intomicrosoft:mainfrom
jakebailey:fix-command-types

Conversation

@jakebailey
Copy link
Copy Markdown
Member

#15387 changed how this worked, but left things in a state where commands were no longer statically validated; the constraints were removed from the general command interface, which everyone else uses. A new interface was added that maintained the type safeness, but that wasn't used anywhere (other than during DI registration, which doesn't actually do anything).

Revert the change, and then fix all of the new commands that were added after so they can be checked.

Split out from #16374, where I discovered this when changing installExtension.

@jakebailey
Copy link
Copy Markdown
Member Author

See why this was changed, now; there's a cycle due to where the types were defined in #15387. Better to break the cycle by moving constants, IMO.

@jakebailey
Copy link
Copy Markdown
Member Author

Well, this turned a little gross.

@kimadeline kimadeline added the no-changelog No news entry required label Jun 4, 2021
@jakebailey jakebailey merged commit 88ab735 into microsoft:main Jun 4, 2021
@jakebailey jakebailey deleted the fix-command-types branch June 4, 2021 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog No news entry required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants