Merge pull request #5940 from rhysd/patch-3

auto-launch: Fixed isEnabled() method
This commit is contained in:
Horiuchi_H
2015-09-25 17:31:02 +09:00
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -14,4 +14,11 @@ var a2 = new AutoLaunch({
a1.enable();
a2.disable();
var enabled: boolean = a1.isEnabled();
a1.isEnabled(function(enabled: boolean) {
if (enabled) {
return;
}
a1.enable(function(err){ console.log(err.message); });
});
+1 -1
View File
@@ -32,7 +32,7 @@ declare class AutoLaunch {
/**
* Returns if auto start up is enabled
*/
isEnabled(callback?: (err: Error) => void): boolean;
isEnabled(callback: (enabled: boolean) => void): void;
}
declare module "auto-launch" {