forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
47 lines (37 loc) · 1.81 KB
/
types.ts
File metadata and controls
47 lines (37 loc) · 1.81 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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { Socket } from 'net';
import { Readable } from 'stream';
import { Disposable } from 'vscode';
import { Logger } from 'vscode-debugadapter';
import { Message } from 'vscode-debugadapter/lib/messages';
export type LocalDebugOptions = { port: number; host: string; customDebugger?: boolean };
export type RemoteDebugOptions = LocalDebugOptions & { waitUntilDebuggerAttaches: boolean };
export interface IDebugLauncherScriptProvider<T> {
getLauncherArgs(options: T): string[];
}
export interface ILocalDebugLauncherScriptProvider extends IDebugLauncherScriptProvider<LocalDebugOptions> {
getLauncherArgs(options: LocalDebugOptions): string[];
}
export interface IRemoteDebugLauncherScriptProvider extends IDebugLauncherScriptProvider<RemoteDebugOptions> {}
export const IProtocolParser = Symbol('IProtocolParser');
export interface IProtocolParser extends Disposable {
connect(stream: Readable): void;
once(event: string | symbol, listener: Function): this;
on(event: string | symbol, listener: Function): this;
}
export const IProtocolLogger = Symbol('IProtocolLogger');
export interface IProtocolLogger extends Disposable {
connect(inputStream: Readable, outputStream: Readable): void;
setup(logger: Logger.ILogger): void;
}
export const IDebugStreamProvider = Symbol('IDebugStreamProvider');
export interface IDebugStreamProvider extends Disposable {
readonly useDebugSocketStream: boolean;
getInputAndOutputStreams(): Promise<{ input: NodeJS.ReadStream | Socket; output: NodeJS.WriteStream | Socket }>;
}
export const IProtocolMessageWriter = Symbol('IProtocolMessageWriter');
export interface IProtocolMessageWriter {
write(stream: Socket | NodeJS.WriteStream, message: Message): void;
}