-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathtypes.ts
58 lines (49 loc) · 1.28 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
export interface Request {
/**
* The id of the command to run
*/
commandId: string;
/**
* A uuid that will be written to the response file for sanity checking
* client-side
*/
uuid: string;
/**
* Arguments to the command, if any
*/
args: any[];
/**
* A boolean indicating if we should return the output of the command
*/
returnCommandOutput: boolean;
/**
* A boolean indicating if we should await the command to ensure it is
* complete. This behaviour is desirable for some commands and not others.
* For most commands it is ok, and can remove race conditions, but for
* some commands, such as ones that show a quick picker, it can hang the
* client
*/
waitForFinish: boolean;
}
export interface Response {
/**
* The return value of the command, if requested.
*/
returnValue?: any;
/**
* The uuid passed into the response for sanity checking client-side
*/
uuid: string;
/**
* Any error encountered or null if successful
*/
error: string | null;
/**
* A list of warnings issued when running the command
*/
warnings: string[];
}
/**
* The type of the focused element in vscode at the moment of the command being executed.
*/
export type FocusedElementType = "textEditor" | "terminal" | "other";