microsoft/vscode-react-native
Publicmirrored from https://github.com/microsoft/vscode-react-nativeAvailable
src/debugger/nodeDebugAdapter.d.ts
55lines · modecode
| 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. |
| 7 | declare module VSCodeDebugAdapterPackage { |
| 8 | class DebugSession { |
| 9 | public static run(debugSession: typeof DebugSession): void; |
| 10 | } |
| 11 | class InitializedEvent extends Event { |
| 12 | constructor(); |
| 13 | } |
| 14 | class OutputEvent extends Event { |
| 15 | constructor(message: string, destination?: string); |
| 16 | } |
| 17 | class TerminatedEvent extends Event { |
| 18 | constructor(); |
| 19 | } |
| 20 | class Event { |
| 21 | public event: string; |
| 22 | public body: any; |
| 23 | } |
| 24 | interface Request { |
| 25 | command: string; |
| 26 | arguments?: any; |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | declare module ChromeDebuggerCorePackage { |
| 31 | abstract class ChromeDebugAdapter { |
| 32 | protected _attachMode: boolean; |
| 33 | protected doAttach(port: number, targetUrl?: string, address?: string, timeout?: number): Promise<void>; |
| 34 | } |
| 35 | |
| 36 | interface IChromeDebugSessionOpts { |
| 37 | logFilePath?: string; |
| 38 | adapter: typeof ChromeDebugAdapter; |
| 39 | extensionName: string; |
| 40 | } |
| 41 | |
| 42 | class ChromeDebugSession extends VSCodeDebugAdapterPackage.DebugSession { |
| 43 | protected _debugAdapter: any; |
| 44 | constructor(debuggerLinesAndColumnsStartAt1?: boolean, isServer?: boolean, opts?: IChromeDebugSessionOpts); |
| 45 | public sendEvent(event: VSCodeDebugAdapterPackage.InitializedEvent): void; |
| 46 | protected dispatchRequest(request: { command: string }): void; |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | declare module Node2DebugAdapterPackage { |
| 51 | class Node2DebugAdapter extends ChromeDebuggerCorePackage.ChromeDebugAdapter { |
| 52 | protected doAttach(port: number, targetUrl?: string, address?: string, timeout?: number): Promise<void> |
| 53 | } |
| 54 | } |