DefinitelyTyped/types/auto-launch/index.d.ts
Nathan Shively-Sanders f0ce987bc1 Update project urls to match NPM url
Note that this *trivially* updates project urls by adding the NPM url to
the end, even when the urls are almost identical or the DT one is
outdated. I'll clean up the urls in a later commit.

This PR is unfinished! Please do not merge it yet.
2019-02-11 17:10:55 -08:00

48 lines
1.1 KiB
TypeScript

// Type definitions for auto-launch 5.0
// Project: https://github.com/Teamwork/node-auto-launch, https://github.com/4ver/node-auto-launch
// Definitions by: rhysd <https://github.com/rhysd>, Daniel Perez Alvarez <https://github.com/unindented>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface AutoLaunchOptions {
/**
* Application name.
*/
name: string;
/**
* Path to application. Default is `process.execPath`.
*/
path?: string;
/**
* Hidden on launch. Default is `false`.
*/
isHidden?: boolean;
/**
* For Mac-only options.
*/
mac?: {
/**
* By default, AppleScript is used to add a Login Item. If this is `true`, Launch Agent will be used to auto-launch your app. Defaults is `false`.
*/
useLaunchAgent?: boolean;
};
}
declare class AutoLaunch {
constructor(options: AutoLaunchOptions);
/**
* Enables auto-launch at start up.
*/
enable(): Promise<void>;
/**
* Disables auto-launch at start up.
*/
disable(): Promise<void>;
/**
* Returns true if auto-launch is enabled.
*/
isEnabled(): Promise<boolean>;
}
export = AutoLaunch;