ReadonlyactivateDeclared as a property, not a method, so export const activate = app.activate
is safe: an extracted method would lose its receiver.
ReadonlycommandsTyped command invocation, usable from anywhere in the extension.
ReadonlydeactivateIdempotent entry to the application's single asynchronous stop path.
ReadonlyplanThe compiled plan. Exposed so tests can run it on fakes.
An extension, ready to be re-exported from
extension.ts.deactivateis the single cleanup path;activateregisters only a synchronous failsafe oncontext.subscriptions.One application per definition. A second
activatewhile the first is starting or running joins that start and resolves to the same value; afterdeactivate, or after a start that failed, it rejects with aFrameworkErrorof kindactivation(codeEXTENSION_NOT_RESTARTABLE) rather than building a second application. VS Code activates an extension once per session, so this only shows up in a test that reuses one definition — build one per test, or run the plan throughcreateTestHost.