microsoft/vscode-react-native
Publicmirrored from https://github.com/microsoft/vscode-react-nativeAvailable
src/debugger/nodeDebugAdapter.d.ts
57lines · modeblame
40e4b177Patricio Beltran10 years ago | 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT license. See LICENSE file in the project root for details. | |
| 3 | | |
| 4 | // These typings do not reflect the typings as intended to be used | |
| 5 | // but rather as they exist in truth, so we can reach into the internals | |
| 6 | // and access what we need. | |
e45838cbVladimir Kotikov9 years ago | 7 | declare module VSCodeDebugAdapterPackage { |
40e4b177Patricio Beltran10 years ago | 8 | class DebugSession { |
e45838cbVladimir Kotikov9 years ago | 9 | public static run(debugSession: typeof DebugSession): void; |
a8b90ac7Vladimir Kotikov9 years ago | 10 | // This is actually inherited from protocol server but we'll put it here |
| 11 | public start(inStream: NodeJS.ReadableStream, outStream: NodeJS.WritableStream): void; | |
| 12 | public sendEvent(event: Event): void; | |
e45838cbVladimir Kotikov9 years ago | 13 | } |
| 14 | class InitializedEvent extends Event { | |
40e4b177Patricio Beltran10 years ago | 15 | constructor(); |
| 16 | } | |
e45838cbVladimir Kotikov9 years ago | 17 | class OutputEvent extends Event { |
40e4b177Patricio Beltran10 years ago | 18 | constructor(message: string, destination?: string); |
| 19 | } | |
e45838cbVladimir Kotikov9 years ago | 20 | class TerminatedEvent extends Event { |
40e4b177Patricio Beltran10 years ago | 21 | constructor(); |
| 22 | } | |
e45838cbVladimir Kotikov9 years ago | 23 | class Event { |
| 24 | public event: string; | |
| 25 | public body: any; | |
| 26 | } | |
| 27 | interface Request { | |
| 28 | command: string; | |
| 29 | arguments?: any; | |
| 30 | } | |
40e4b177Patricio Beltran10 years ago | 31 | } |
| 32 | | |
e45838cbVladimir Kotikov9 years ago | 33 | declare module ChromeDebuggerCorePackage { |
| 34 | abstract class ChromeDebugAdapter { | |
| 35 | protected _attachMode: boolean; | |
| 36 | protected doAttach(port: number, targetUrl?: string, address?: string, timeout?: number): Promise<void>; | |
| 37 | } | |
40e4b177Patricio Beltran10 years ago | 38 | |
e45838cbVladimir Kotikov9 years ago | 39 | interface IChromeDebugSessionOpts { |
| 40 | logFilePath?: string; | |
| 41 | adapter: typeof ChromeDebugAdapter; | |
| 42 | extensionName: string; | |
| 43 | } | |
40e4b177Patricio Beltran10 years ago | 44 | |
e45838cbVladimir Kotikov9 years ago | 45 | class ChromeDebugSession extends VSCodeDebugAdapterPackage.DebugSession { |
| 46 | protected _debugAdapter: any; | |
| 47 | constructor(debuggerLinesAndColumnsStartAt1?: boolean, isServer?: boolean, opts?: IChromeDebugSessionOpts); | |
| 48 | protected dispatchRequest(request: { command: string }): void; | |
| 49 | } | |
40e4b177Patricio Beltran10 years ago | 50 | } |
| 51 | | |
e45838cbVladimir Kotikov9 years ago | 52 | declare module Node2DebugAdapterPackage { |
| 53 | class Node2DebugAdapter extends ChromeDebuggerCorePackage.ChromeDebugAdapter { | |
8049d420Vladimir Kotikov9 years ago | 54 | protected doAttach(port: number, targetUrl?: string, address?: string, timeout?: number): Promise<void>; |
e45838cbVladimir Kotikov9 years ago | 55 | } |
774cffd7Vladimir Kotikov9 years ago | 56 | } |
e45838cbVladimir Kotikov9 years ago | 57 | |