File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @bluecadet/launchpad " : patch
3
+ ---
4
+
5
+ Add intellisense for hook names
Original file line number Diff line number Diff line change 3
3
*/
4
4
5
5
/**
6
- * @typedef {Object<string, Array<string>> } HookMapping
6
+ * @typedef {'startup' | 'update-content' | 'start-apps' | 'shutdown' | 'stop-apps' } LaunchpadCommand
7
+ */
8
+
9
+ /**
10
+ * @typedef {`pre-${LaunchpadCommand}` | `post-${LaunchpadCommand}` } LaunchpadHook
11
+ */
12
+
13
+ /**
14
+ * @typedef {{[K in LaunchpadHook]?: string[]} } HookMapping
7
15
* @example
8
16
* {
9
17
* "pre-startup": ["taskkill /im explorer.exe"],
@@ -17,7 +25,7 @@ export class CommandHooks {
17
25
*/
18
26
constructor ( hooks = { } ) {
19
27
/**
20
- * Formant : pre-<command>
28
+ * Format : pre-<command>
21
29
* @type {Array<ExecHook> }
22
30
*/
23
31
this . preHooks = [ ] ;
You can’t perform that action at this time.
0 commit comments