DefinitelyTyped/types/auto-launch/auto-launch-tests.ts
2017-07-07 16:29:49 -07:00

24 lines
452 B
TypeScript

import AutoLaunch = require('auto-launch');
const minecraftAutoLauncher = new AutoLaunch({
name: 'Minecraft',
path: '/Applications/Minecraft.app',
mac: {
useLaunchAgent: true
}
});
minecraftAutoLauncher.enable();
minecraftAutoLauncher.disable();
minecraftAutoLauncher.isEnabled()
.then((isEnabled) => {
if (isEnabled) {
return;
}
minecraftAutoLauncher.enable();
})
.catch((err) => {
console.error(err);
});