For example, there are two VSCode extensions:
extension1has registered commandexCommand1extension2has 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
extension1can callexCommand2provided byextension2extension2can callexCommand1provided byextension1
But, VSCode's extensions are lazily loaded, so how does one call a command from another extension that may not already be loaded?