Skip to content

Commit 880494c

Browse files
committed
Rename interface
1 parent 36d21fe commit 880494c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/notebook.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import net = require('net');
33
import { spawn, ChildProcess } from 'child_process';
44
import { dirname } from 'path';
55

6-
interface RSessionRequest {
6+
interface RKernelRequest {
77
id: number;
88
type: 'eval' | 'cancel';
99
expr?: any;
1010
}
1111

12-
interface RSessionResponse {
12+
interface RKernelResponse {
1313
id: number;
1414
type: 'text' | 'plot' | 'viewer' | 'browser' | 'error';
1515
result: string;
@@ -29,7 +29,7 @@ class RKernel {
2929
this.doc = doc;
3030
}
3131

32-
private request(request: RSessionRequest) {
32+
private request(request: RKernelRequest) {
3333
if (this.socket) {
3434
const json = JSON.stringify(request);
3535
this.socket.write(`Content-Length: ${json.length}\n${json}`);
@@ -93,11 +93,11 @@ class RKernel {
9393
await this.start();
9494
}
9595

96-
public async eval(cell: vscode.NotebookCell): Promise<RSessionResponse> {
96+
public async eval(cell: vscode.NotebookCell): Promise<RKernelResponse> {
9797
if (this.socket) {
9898
return new Promise((resolve, reject) => {
9999
const handler = async (data: Buffer) => {
100-
const response: RSessionResponse = JSON.parse(data.toString());
100+
const response: RKernelResponse = JSON.parse(data.toString());
101101
resolve(response);
102102
this.socket.removeListener('data', handler);
103103
};
@@ -140,7 +140,7 @@ class RNotebook implements vscode.Disposable {
140140
this.kernel.restart();
141141
}
142142

143-
public async eval(cell: vscode.NotebookCell): Promise<RSessionResponse> {
143+
public async eval(cell: vscode.NotebookCell): Promise<RKernelResponse> {
144144
await this.kernel.start();
145145
return this.kernel.eval(cell);
146146
}

0 commit comments

Comments
 (0)