DefinitelyTyped/auto-launch/auto-launch-tests.ts
2015-09-22 00:38:55 +09:00

25 lines
414 B
TypeScript

/// <reference path="auto-launch.d.ts" />
import AutoLaunch = require('auto-launch');
var a1 = new AutoLaunch({
name: 'Foo',
});
var a2 = new AutoLaunch({
name: 'Foo',
path: '/Applications/Foo.app',
isHidden: true,
});
a1.enable();
a2.disable();
a1.isEnabled(function(enabled: boolean) {
if (enabled) {
return;
}
a1.enable(function(err){ console.log(err.message); });
});