More work to move to TS 2.0.x

This commit is contained in:
Dirk Baeumer
2016-09-21 15:16:58 +02:00
parent 5266f764cb
commit 16ba6ba4a2
5 changed files with 13 additions and 10 deletions
+3 -3
View File
@@ -65,7 +65,7 @@
"gulp-replace": "^0.5.4",
"gulp-shell": "^0.5.2",
"gulp-sourcemaps": "^1.6.0",
"gulp-tsb": "^1.10.1",
"gulp-tsb": "^2.0.0-beta.1",
"gulp-tslint": "^4.3.0",
"gulp-uglify": "^2.0.0",
"gulp-util": "^3.0.6",
@@ -88,12 +88,12 @@
"sinon": "^1.17.2",
"source-map": "^0.4.4",
"tslint": "^3.3.0",
"typescript": "^1.8.10",
"typescript": "^2.0.2",
"uglify-js": "2.4.8",
"underscore": "^1.8.2",
"vinyl": "^0.4.5",
"vinyl-fs": "^2.4.3",
"vscode-nls-dev": "^1.0.0"
"vscode-nls-dev": "^2.0.0-beta.1"
},
"repository": {
"type": "git",
+2 -2
View File
@@ -109,10 +109,10 @@ function _renderHtml(content: IHTMLContentElement, options: RenderOptions = {}):
// but update the node with the real result later.
const id = defaultGenerator.nextId();
TPromise.join([value, withInnerHTML]).done(values => {
let [value] = values;
let strValue = values[0] as string;
let span = element.querySelector(`span[data-code="${id}"]`);
if (span) {
span.innerHTML = value;
span.innerHTML = strValue;
}
}, err => {
// ignore
+1 -1
View File
@@ -11,7 +11,7 @@ export function clone<T>(obj: T): T {
return obj;
}
if (obj instanceof RegExp) {
// @dirk TS(2.0.2) - check after answer from TS team.
// See https://github.com/Microsoft/TypeScript/issues/10990
return obj as any;
}
var result = (Array.isArray(obj)) ? <any>[] : <any>{};
@@ -269,7 +269,7 @@ export class FindModelBoundToEditorModel {
private _moveToNextMatch(nextMatch: Range): void
private _moveToNextMatch(after: Position): void
private _moveToNextMatch(arg: any): void {
// @alex TS(2.0.2) - Adding cast to keep semantic. Necessary since the test are for interface but the code expects
// @sandeep TS(2.0.2) - Adding cast to keep semantic. Necessary since the test are for interface but the code expects
// implemations.
let nextMatch = Range.isIRange(arg) ? arg : Position.isIPosition(arg) ? this._getNextMatch(arg as Position) : null;
if (nextMatch) {
@@ -142,7 +142,8 @@ export class WorkbenchEditorService implements IWorkbenchEditorService {
protected doOpenEditor(input: EditorInput, options?: EditorOptions, sideBySide?: boolean): TPromise<IEditor>;
protected doOpenEditor(input: EditorInput, options?: EditorOptions, position?: Position): TPromise<IEditor>;
protected doOpenEditor(input: EditorInput, options?: EditorOptions, arg3?: any): TPromise<IEditor> {
// @dirk TS(2.0.2) - This is very likely a bug in TS.
// @ben TS(2.0.2) - See https://github.com/Microsoft/TypeScript/issues/7294
// For now I opt we make the signatures the same if possible
return (this.editorPart as any).openEditor(input, options, arg3);
}
@@ -159,7 +160,8 @@ export class WorkbenchEditorService implements IWorkbenchEditorService {
position: editors[index].position
};
});
// @dirk TS(2.0.2) - This is very likely a bug in TS.
// @ben TS(2.0.2) - See https://github.com/Microsoft/TypeScript/issues/7294
// For now I opt we make the signatures the same if possible
return (this.editorPart as any).openEditors(typedInputs);
});
}
@@ -178,7 +180,8 @@ export class WorkbenchEditorService implements IWorkbenchEditorService {
options
};
});
// @dirk TS(2.0.2) - This is very likely a bug in TS.
// @ben TS(2.0.2) - See https://github.com/Microsoft/TypeScript/issues/7294
// For now I opt we make the signatures the same if possible
return (this.editorPart as any).replaceEditors(typedReplacements);
});
});