File tree 1 file changed +47
-0
lines changed
1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Type definitions for auto-launch 5.0
2
+ // Project: https://github.com/Teamwork/node-auto-launch, https://github.com/4ver/node-auto-launch
3
+ // Definitions by: rhysd <https://github.com/rhysd>, Daniel Perez Alvarez <https://github.com/unindented>
4
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
+
6
+ interface AutoLaunchOptions {
7
+ /**
8
+ * Application name.
9
+ */
10
+ name : string ;
11
+ /**
12
+ * Path to application. Default is `process.execPath`.
13
+ */
14
+ path ?: string | undefined ;
15
+ /**
16
+ * Hidden on launch. Default is `false`.
17
+ */
18
+ isHidden ?: boolean | undefined ;
19
+ /**
20
+ * For Mac-only options.
21
+ */
22
+ mac ?: {
23
+ /**
24
+ * 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`.
25
+ */
26
+ useLaunchAgent ?: boolean | undefined ;
27
+ } | undefined ;
28
+ }
29
+
30
+ declare class AutoLaunch {
31
+ constructor ( options : AutoLaunchOptions ) ;
32
+
33
+ /**
34
+ * Enables auto-launch at start up.
35
+ */
36
+ enable ( ) : Promise < void > ;
37
+ /**
38
+ * Disables auto-launch at start up.
39
+ */
40
+ disable ( ) : Promise < void > ;
41
+ /**
42
+ * Returns true if auto-launch is enabled.
43
+ */
44
+ isEnabled ( ) : Promise < boolean > ;
45
+ }
46
+
47
+ export = AutoLaunch ;
You can’t perform that action at this time.
0 commit comments