mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
atom: add PackageManager.deactivatePackage() method (#23208)
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Vendored
+3
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user