atom: add PackageManager.deactivatePackage() method (#23208)

This commit is contained in:
smhxx
2018-01-26 09:06:08 -08:00
committed by Andy
parent 1be865457a
commit 417ea06896
2 changed files with 11 additions and 0 deletions
+8
View File
@@ -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();
+3
View File
@@ -4111,6 +4111,9 @@ export interface PackageManager {
/** Activate a single package by name or path. */
activatePackage(nameOrPath: string): Promise<Package>;
/** Deactivate a single package by name or path. */
deactivatePackage(nameOrPath: string, suppressSerialization?: boolean): Promise<void>;
/** Triggers the given package activation hook. */
triggerActivationHook(hook: string): void;