microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
9174feb78e9e98b72274e79fb2eef1605c48464e

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/debugger/nodeDebugAdapter.d.ts

57lines · modepreview

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.

// These typings do not reflect the typings as intended to be used
// but rather as they exist in truth, so we can reach into the internals
// and access what we need.
declare module VSCodeDebugAdapterPackage {
    class DebugSession {
        public static run(debugSession: typeof DebugSession): void;
        // This is actually inherited from protocol server but we'll put it here
        public start(inStream: NodeJS.ReadableStream, outStream: NodeJS.WritableStream): void;
        public sendEvent(event: Event): void;
    }
    class InitializedEvent extends Event {
        constructor();
    }
    class OutputEvent extends Event {
        constructor(message: string, destination?: string);
    }
    class TerminatedEvent extends Event {
        constructor();
    }
    class Event {
        public event: string;
        public body: any;
    }
    interface Request {
        command: string;
        arguments?: any;
    }
}

declare module ChromeDebuggerCorePackage {
    abstract class ChromeDebugAdapter {
        protected _attachMode: boolean;
        protected doAttach(port: number, targetUrl?: string, address?: string, timeout?: number): Promise<void>;
    }

    interface IChromeDebugSessionOpts {
        logFilePath?: string;
        adapter: typeof ChromeDebugAdapter;
        extensionName: string;
    }

    class ChromeDebugSession extends VSCodeDebugAdapterPackage.DebugSession {
        protected _debugAdapter: any;
        constructor(debuggerLinesAndColumnsStartAt1?: boolean, isServer?: boolean, opts?: IChromeDebugSessionOpts);
        protected dispatchRequest(request: { command: string }): void;
    }
}

declare module Node2DebugAdapterPackage {
    class Node2DebugAdapter extends ChromeDebuggerCorePackage.ChromeDebugAdapter {
        protected doAttach(port: number, targetUrl?: string, address?: string, timeout?: number): Promise<void>;
    }
}