Build VS Code using TypeScript 3.1.1

Fixes #59757
This commit is contained in:
Matt Bierner 2018-10-01 10:54:54 -07:00
parent 0d0bfe8ddc
commit d37076a596
14 changed files with 28 additions and 26 deletions

View file

@ -14,7 +14,7 @@
"documentdb": "1.13.0",
"mime": "^1.3.4",
"minimist": "^1.2.0",
"typescript": "3.0.3",
"typescript": "3.1.1",
"xml2js": "^0.4.17",
"github-releases": "^0.4.1",
"request": "^2.85.0"

View file

@ -765,10 +765,10 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0:
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
typescript@3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8"
integrity sha512-kk80vLW9iGtjMnIv11qyxLqZm20UklzuR2tL0QAnDIygIUIemcZMxlMWudl9OOt76H3ntVzcTiddQ1/pAAJMYg==
typescript@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.1.tgz#3362ba9dd1e482ebb2355b02dfe8bcd19a2c7c96"
integrity sha512-Veu0w4dTc/9wlWNf2jeRInNodKlcdLgemvPsrNpfu5Pq39sgfFjvIIgTsvUHCoLBnMhPoUA+tFxsXjU6VexVRQ==
underscore@1.8.3, underscore@~1.8.3:
version "1.8.3"

View file

@ -23,7 +23,8 @@ export function hash(obj: any, hashVal = 0): number {
case 'number':
return numberHash(obj, hashVal);
case 'undefined':
return numberHash(obj, 937);
// TODO: TS 3.1 upgrade. Why are we passing undefined here?
return numberHash(obj as any, 937);
default:
return numberHash(obj, 617);
}

View file

@ -122,7 +122,7 @@
"source-map": "^0.4.4",
"ts-loader": "^4.4.2",
"tslint": "^5.9.1",
"typescript": "3.0.3",
"typescript": "3.1.1",
"typescript-formatter": "7.1.0",
"uglify-es": "^3.0.18",
"underscore": "^1.8.2",
@ -146,4 +146,4 @@
"windows-mutex": "^0.2.0",
"windows-process-tree": "0.2.2"
}
}
}

View file

@ -347,7 +347,7 @@ export class ListView<T> implements ISpliceable<T>, IDisposable {
@memoize get onMouseClick(): Event<IListMouseEvent<T>> { return filterEvent(mapEvent(domEvent(this.domNode, 'click'), e => this.toMouseEvent(e)), e => e.index >= 0); }
@memoize get onMouseDblClick(): Event<IListMouseEvent<T>> { return filterEvent(mapEvent(domEvent(this.domNode, 'dblclick'), e => this.toMouseEvent(e)), e => e.index >= 0); }
@memoize get onMouseMiddleClick(): Event<IListMouseEvent<T>> { return filterEvent(mapEvent(domEvent(this.domNode, 'auxclick'), e => this.toMouseEvent(e)), e => e.index >= 0 && e.browserEvent.button === 1); }
@memoize get onMouseMiddleClick(): Event<IListMouseEvent<T>> { return filterEvent(mapEvent(domEvent(this.domNode, 'auxclick'), e => this.toMouseEvent(e as MouseEvent)), e => e.index >= 0 && e.browserEvent.button === 1); }
@memoize get onMouseUp(): Event<IListMouseEvent<T>> { return filterEvent(mapEvent(domEvent(this.domNode, 'mouseup'), e => this.toMouseEvent(e)), e => e.index >= 0); }
@memoize get onMouseDown(): Event<IListMouseEvent<T>> { return filterEvent(mapEvent(domEvent(this.domNode, 'mousedown'), e => this.toMouseEvent(e)), e => e.index >= 0); }
@memoize get onMouseOver(): Event<IListMouseEvent<T>> { return filterEvent(mapEvent(domEvent(this.domNode, 'mouseover'), e => this.toMouseEvent(e)), e => e.index >= 0); }

View file

@ -99,10 +99,9 @@ export function ltrim(haystack?: string, needle?: string): string {
return haystack;
}
let offset = 0,
idx = -1;
let offset = 0;
while ((idx = haystack.indexOf(needle, offset)) === offset) {
while (haystack.indexOf(needle, offset) === offset) {
offset = offset + needleLen;
}
return haystack.substring(offset);

View file

@ -264,8 +264,9 @@ export class DefaultController implements _.IController {
}
private onKey(bindings: KeybindingDispatcher, tree: _.ITree, event: IKeyboardEvent): boolean {
const handler = bindings.dispatch(event.toKeybinding());
const handler: any = bindings.dispatch(event.toKeybinding());
if (handler) {
// TODO: TS 3.1 upgrade. Why are we checking against void?
if (handler(tree, event)) {
event.preventDefault();
event.stopPropagation();

View file

@ -134,8 +134,7 @@ suite('Splitview', () => {
let didLayout = false;
const layoutDisposable = view.onDidLayout(() => didLayout = true);
let didRender = false;
const renderDisposable = view.onDidGetElement(() => didRender = true);
const renderDisposable = view.onDidGetElement(() => void 0);
splitview.addView(view, 20);

View file

@ -82,7 +82,8 @@ suite('Async', () => {
const cancellablePromise = async.createCancelablePromise(token => {
order.push('in callback');
token.onCancellationRequested(_ => order.push('cancelled'));
return new Promise(c => setTimeout(c(1234), 0));
// TODO: TS 3.1 upgrade. Why are we passing void?
return new Promise(c => setTimeout((c as any)(1234), 0));
});
order.push('afterCreate');

View file

@ -88,7 +88,8 @@ export abstract class AbstractUpdateService implements IUpdateService {
return timeout(delay)
.then(() => this.checkForUpdates(null))
.then(update => {
if (update) {
// TODO: TS 3.1 upgrade. Why are we checking against void?
if (update as any) {
// Update found, no need to check more
return TPromise.as(null);
}

View file

@ -457,7 +457,8 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
private _delay(timeout: number, result: any): Promise<void> {
return new Promise(c => {
setTimeout(c(result), timeout);
// TODO: TS 3.1 upgrade. Why are we passing void?
setTimeout((c as any)(result), timeout);
});
}

View file

@ -216,7 +216,6 @@ suite('DecorationsService', function () {
test('Decorations not bubbling... #48745', function () {
let resolve: Function;
let reg = service.registerDecorationsProvider({
label: 'Test',
onDidChange: Event.None,
@ -224,7 +223,7 @@ suite('DecorationsService', function () {
if (uri.path.match(/hello$/)) {
return { tooltip: 'FOO', weight: 17, bubble: true };
} else {
return new Promise<IDecorationData>(_resolve => resolve = _resolve);
throw new Error('unexpected uri');
}
}
});

View file

@ -391,8 +391,8 @@ export class FileWalker {
cmd.on('close', (code: number) => {
// ripgrep returns code=1 when no results are found
let stderrText, displayMsg: string;
if (isRipgrep ? (!gotData && (stderrText = this.decodeData(stderr, encoding)) && (displayMsg = rgErrorMsgForDisplay(stderrText))) : code !== 0) {
let stderrText: string;
if (isRipgrep ? (!gotData && (stderrText = this.decodeData(stderr, encoding)) && rgErrorMsgForDisplay(stderrText)) : code !== 0) {
onData(new Error(`command failed with error code ${code}: ${this.decodeData(stderr, encoding)}`));
} else {
if (isRipgrep && this.exists && code === 0) {

View file

@ -8944,10 +8944,10 @@ typescript-formatter@7.1.0:
commandpost "^1.0.0"
editorconfig "^0.15.0"
typescript@3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8"
integrity sha512-kk80vLW9iGtjMnIv11qyxLqZm20UklzuR2tL0QAnDIygIUIemcZMxlMWudl9OOt76H3ntVzcTiddQ1/pAAJMYg==
typescript@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.1.tgz#3362ba9dd1e482ebb2355b02dfe8bcd19a2c7c96"
integrity sha512-Veu0w4dTc/9wlWNf2jeRInNodKlcdLgemvPsrNpfu5Pq39sgfFjvIIgTsvUHCoLBnMhPoUA+tFxsXjU6VexVRQ==
typescript@^2.6.2:
version "2.6.2"