-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathMVMInterface.d.ts
More file actions
122 lines (122 loc) · 2.97 KB
/
MVMInterface.d.ts
File metadata and controls
122 lines (122 loc) · 2.97 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/// <reference types="node" />
import { Capability } from './RunOptions';
import { EventEmitter } from 'events';
/**
* Represents text coming from MATLAB
*/
export interface TextEvent {
text: string;
stream: number;
}
/**
* Represents a eval request to MATLAB
*/
export interface EvalRequest {
requestId: string | number;
command: string;
isUserEval: boolean;
capabilitiesToRemove?: Capability[];
}
/**
* Represents a eval response to MATLAB
*/
export interface EvalResponse {
requestId: string | number;
}
/**
* Represents a feval request to MATLAB
*/
export interface FEvalRequest {
requestId: string | number;
functionName: string;
nargout: number;
args: unknown[];
isUserEval: boolean;
capabilitiesToRemove?: Capability[];
}
/**
* Represents a feval response from MATLAB
*/
export interface FEvalResponse {
requestId: string | number;
result: unknown;
}
/**
* Represents a eval response to MATLAB
*/
export interface EvalResponse {
requestId: string | number;
}
/**
* Represents a feval request to MATLAB
*/
export interface BreakpointRequest {
requestId: string | number;
fileName: string;
lineNumber: number;
condition?: string;
anonymousIndex?: number;
}
/**
* Represents a breakpoint response from MATLAB
*/
export interface BreakpointResponse {
requestId: string | number;
error?: MVMError;
}
/**
* MATLAB Error result
*/
export interface MVMError {
error: {
id: string;
msg: string;
};
}
export declare enum PromptState {
INITIALIZING = "INITIALIZING",
READY = "READY",
BUSY = "BUSY",
DEBUG = "DEBUG",
INPUT = "INPUT",
PAUSE = "PAUSE",
MORE = "MORE",
COMPLETING_BLOCK = "COMPLETING_BLOCK"
}
export declare const STATE_REQUESTER: {
INITIALIZING: string;
READY: string;
BUSY: string;
DEBUG: string;
INPUT: string;
KEYBOARD: string;
PAUSE: string;
MORE: string;
COMPLETING_BLOCK: string;
BANG: string;
};
export declare const STATE_REQUESTER_TO_STATE: {
[x: string]: PromptState;
};
/**
* The base functionality for any MVM instance to support
*/
export interface IMVM extends EventEmitter {
getMatlabRelease(): string | null;
eval: (command: string, isUserEval?: boolean, capabilitiesToRemove?: Capability[]) => Promise<void>;
feval: (functionName: string, nargout: number, args: unknown[], isUserEval?: boolean, capabilitiesToRemove?: Capability[]) => Promise<MVMError | any>;
setBreakpoint(fileName: string, lineNumber: number, condition?: string, anonymousIndex?: number): Promise<void>;
clearBreakpoint(fileName: string, lineNumber: number, condition?: string, anonymousIndex?: number): Promise<void>;
unpause(): void;
pauseInDebugger(): void;
interrupt: () => void;
}
export declare namespace IMVM {
enum Events {
clc = "clc",
output = "output",
promptChange = "promptChange",
stateChange = "stateChange",
inputPrompt = "inputPrompt"
}
}