For example, there are two VSCode extensions:
extension1
has registered commandexCommand1
extension2
has registered commandexCommand2
According to documentation, a VSCode extension can call commands (ref: https://code.visualstudio.com/docs/extensionAPI/vscode-api)
executeCommand<T>(command: string, ...rest: any[]): Thenable<T | undefined>
If API Doc is correct then
extension1
can callexCommand2
provided byextension2
extension2
can callexCommand1
provided byextension1
But, VSCode's extensions are lazily loaded, so how does one call a command from another extension that may not already be loaded?