@clerc/plugin-completions 1.0.0-beta.28 → 1.0.0-beta.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +33 -0
- package/dist/index.js +17 -1531
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ArgumentHandler, Command, OptionHandler } from "@bomb.sh/tab";
|
|
1
2
|
import { Plugin } from "@clerc/core";
|
|
2
3
|
|
|
3
4
|
//#region src/index.d.ts
|
|
@@ -13,6 +14,38 @@ declare module "@clerc/core" {
|
|
|
13
14
|
* @default true
|
|
14
15
|
*/
|
|
15
16
|
show?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Handler to provide custom completions for the command.
|
|
19
|
+
*/
|
|
20
|
+
handler?: (command: Command) => void;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
interface FlagCustomOptions {
|
|
24
|
+
/**
|
|
25
|
+
* Completions options for the flag.
|
|
26
|
+
*/
|
|
27
|
+
completions?: {
|
|
28
|
+
/**
|
|
29
|
+
* Whether to show the flag in completions output.
|
|
30
|
+
*
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
show?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Handler to provide custom completions for the flag.
|
|
36
|
+
*/
|
|
37
|
+
handler?: OptionHandler;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
interface ParameterCustomOptions {
|
|
41
|
+
/**
|
|
42
|
+
* Completions options for the parameter.
|
|
43
|
+
*/
|
|
44
|
+
completions?: {
|
|
45
|
+
/**
|
|
46
|
+
* Handler to provide custom completions for the parameter.
|
|
47
|
+
*/
|
|
48
|
+
handler?: ArgumentHandler;
|
|
16
49
|
};
|
|
17
50
|
}
|
|
18
51
|
}
|