diff --git a/types/atom/atom-tests.ts b/types/atom/atom-tests.ts index 5fc92880f4..fbd5f6d0d8 100644 --- a/types/atom/atom-tests.ts +++ b/types/atom/atom-tests.ts @@ -1459,6 +1459,14 @@ function testPackageManager() { bool = atom.packages.isPackageDisabled("Test"); + // Activating and deactivating packages + atom.packages.activatePackage("Test").then((activePack) => { + pack = activePack; + }); + atom.packages.deactivatePackage("Test", true).then(() => { + // package is deactivated + }); + // Accessing active packages packs = atom.packages.getActivePackages(); diff --git a/types/atom/index.d.ts b/types/atom/index.d.ts index a261661144..f83f751657 100644 --- a/types/atom/index.d.ts +++ b/types/atom/index.d.ts @@ -4111,6 +4111,9 @@ export interface PackageManager { /** Activate a single package by name or path. */ activatePackage(nameOrPath: string): Promise; + /** Deactivate a single package by name or path. */ + deactivatePackage(nameOrPath: string, suppressSerialization?: boolean): Promise; + /** Triggers the given package activation hook. */ triggerActivationHook(hook: string): void;