Skip to content

Commit

Permalink
fix isEnabled() method
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Sep 21, 2015
1 parent 09e3743 commit c5c929c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion auto-launch/auto-launch-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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); });
});
2 changes: 1 addition & 1 deletion auto-launch/auto-launch.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit c5c929c

Please sign in to comment.