aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/console/Completions.ts11
-rw-r--r--src/console/actions/index.ts5
-rw-r--r--src/console/reducers/index.ts3
3 files changed, 16 insertions, 3 deletions
diff --git a/src/console/Completions.ts b/src/console/Completions.ts
new file mode 100644
index 0000000..ec9135f
--- /dev/null
+++ b/src/console/Completions.ts
@@ -0,0 +1,11 @@
+type Completions = {
+ readonly name: string;
+ readonly items: {
+ readonly caption?: string;
+ readonly content?: string;
+ readonly url?: string;
+ readonly icon?: string;
+ }[];
+}[]
+
+export default Completions; \ No newline at end of file
diff --git a/src/console/actions/index.ts b/src/console/actions/index.ts
index 3770496..d36f8cd 100644
--- a/src/console/actions/index.ts
+++ b/src/console/actions/index.ts
@@ -1,4 +1,5 @@
-// console commands
+import Completions from "../Completions";
+
export const CONSOLE_HIDE = 'console.hide';
export const CONSOLE_SHOW_COMMAND = 'console.show.command';
export const CONSOLE_SHOW_ERROR = 'console.show.error';
@@ -44,7 +45,7 @@ interface SetConsoleTextAction {
interface SetCompletionsAction {
type: typeof CONSOLE_SET_COMPLETIONS;
- completions: any[];
+ completions: Completions;
completionSource: string;
}
diff --git a/src/console/reducers/index.ts b/src/console/reducers/index.ts
index 048a24f..677a982 100644
--- a/src/console/reducers/index.ts
+++ b/src/console/reducers/index.ts
@@ -1,11 +1,12 @@
import * as actions from '../actions';
+import Completions from "../Completions";
export interface State {
mode: string;
messageText: string;
consoleText: string;
completionSource: string;
- completions: any[],
+ completions: Completions;
select: number;
viewIndex: number;
}