Upgrade to TS 1.6
This commit is contained in:
Родитель
355b246347
Коммит
232311695c
|
@ -18,7 +18,7 @@
|
|||
"gulp-typescript": "^2.8.0",
|
||||
"gulp-util": "^3.0.5",
|
||||
"tsd": "^0.6.3",
|
||||
"typescript": "1.5.3"
|
||||
"typescript": "^1.6.2"
|
||||
},
|
||||
"contributes": {
|
||||
"debugAdapter": [
|
||||
|
|
|
@ -296,7 +296,7 @@ class SourceMap {
|
|||
*/
|
||||
public originalPositionFor(line: number, column: number, bias: Bias = Bias.GREATEST_LOWER_BOUND): SourceMap.MappedPosition {
|
||||
|
||||
const mp = this._smc.originalPositionFor({
|
||||
const mp = this._smc.originalPositionFor(<any>{
|
||||
line: line,
|
||||
column: column,
|
||||
bias: bias
|
||||
|
|
|
@ -6,6 +6,12 @@ import WebSocket = require('ws');
|
|||
import http = require('http');
|
||||
import {EventEmitter} from 'events';
|
||||
|
||||
interface IMessageWithId {
|
||||
id: number;
|
||||
method: string;
|
||||
params?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements a Request/Response API on top of a WebSocket for messages that are marked with an `id` property.
|
||||
* Emits `message.method` for messages that don't have `id`.
|
||||
|
@ -67,7 +73,7 @@ class ResReqWebSocket extends EventEmitter {
|
|||
/**
|
||||
* Send a message which must have an id. Ok to call immediately after attach. Messages will be queued until the websocket actually attaches.
|
||||
*/
|
||||
public sendMessage(message: { id: number }): Promise<any> {
|
||||
public sendMessage(message: IMessageWithId): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this._pendingRequests.set(message.id, resolve);
|
||||
this._wsAttached.then(ws => {
|
||||
|
|
|
@ -78,7 +78,7 @@ export class WebKitDebugSession extends DebugSession {
|
|||
this._scriptsById = new Map<WebKitProtocol.Debugger.ScriptId, WebKitProtocol.Debugger.Script>();
|
||||
this._scriptsByUrl = new Map<string, WebKitProtocol.Debugger.Script>();
|
||||
this._committedBreakpointsByScriptId = new Map<WebKitProtocol.Debugger.ScriptId, WebKitProtocol.Debugger.BreakpointId[]>();
|
||||
this._setBreakpointsRequestQ = Promise.resolve<void>();
|
||||
this._setBreakpointsRequestQ = Promise.resolve();
|
||||
}
|
||||
|
||||
private clearClientContext(): void {
|
||||
|
@ -101,15 +101,17 @@ export class WebKitDebugSession extends DebugSession {
|
|||
super.sendResponse(response);
|
||||
}
|
||||
|
||||
protected initializeRequest(response: DebugProtocol.InitializeResponse, args: IInitializeRequestArgs): void {
|
||||
if (args.sourceMaps) {
|
||||
this._sourceMaps = new SourceMaps(args.generatedCodeDirectory);
|
||||
protected initializeRequest(response: DebugProtocol.InitializeResponse, _args: DebugProtocol.InitializeRequestArguments): void {
|
||||
const initArgs = <IInitializeRequestArgs>_args;
|
||||
if (initArgs.sourceMaps) {
|
||||
this._sourceMaps = new SourceMaps(initArgs.generatedCodeDirectory);
|
||||
}
|
||||
|
||||
this.sendResponse(response);
|
||||
}
|
||||
|
||||
protected launchRequest(response: DebugProtocol.LaunchResponse, args: ILaunchRequestArgs): void {
|
||||
protected launchRequest(response: DebugProtocol.LaunchResponse, _args: DebugProtocol.LaunchRequestArguments): void {
|
||||
const args = <ILaunchRequestArgs>_args;
|
||||
this._clientCWD = args.workingDirectory;
|
||||
const chromeExe = args.runtimeExecutable || Utilities.getBrowserPath();
|
||||
|
||||
|
@ -249,7 +251,8 @@ export class WebKitDebugSession extends DebugSession {
|
|||
|
||||
}
|
||||
|
||||
protected attachRequest(response: DebugProtocol.AttachResponse, args: IAttachRequestArgs): void {
|
||||
protected attachRequest(response: DebugProtocol.AttachResponse, _args: DebugProtocol.AttachRequestArguments): void {
|
||||
const args = <IAttachRequestArgs>_args;
|
||||
if (args.address !== 'localhost') {
|
||||
response.success = false;
|
||||
response.message = 'Remote debugging is not supported';
|
||||
|
|
Загрузка…
Ссылка в новой задаче