diff --git a/package.json b/package.json index 049bfdb49..85e0d76b0 100644 --- a/package.json +++ b/package.json @@ -38,14 +38,14 @@ "grunt-replace": "~0.7.8", "grunt-saucelabs": "git+https://github.com/xirzec/grunt-saucelabs.git#debug", "grunt-shell": "~0.7.0", - "grunt-ts": "^1.11.6", + "grunt-ts": "~3.0.0", "http-post": "~0.1.1", "less": "^1.7.4", "load-grunt-tasks": "^0.6.0", "minimist": "0.2.0", "qunitjs": "~1.14.0", "text-table": "~0.2.0", - "typescript": "1.0.1", + "typescript": "1.4.1", "websocket": "^1.0.8", "seed-random": "^2.2.0" }, diff --git a/tasks/options/ts.js b/tasks/options/ts.js index 1c2f645b9..7df14b19d 100644 --- a/tasks/options/ts.js +++ b/tasks/options/ts.js @@ -25,7 +25,8 @@ sourceMap: false, noImplicitAny: true, declaration: false, - removeComments: false + removeComments: false, + suppressImplicitAnyIndexErrors: true } }, }; diff --git a/tests/TestLib/Helper.ts b/tests/TestLib/Helper.ts index 930ca6563..25a01e67d 100644 --- a/tests/TestLib/Helper.ts +++ b/tests/TestLib/Helper.ts @@ -45,19 +45,17 @@ module Helper { export function createPointerEvent(fallbackType: string) { // PointerEvent is already supported, so just use that + var e:any; if ((window).PointerEvent) { - var e = document.createEvent("PointerEvent"); - return e; + return document.createEvent("PointerEvent"); } else if ((window).MSPointerEvent) { // Fallback to the ms prefix version from IE 10 - var e = document.createEvent("MSPointerEvent"); - return e; + return document.createEvent("MSPointerEvent"); } else if (fallbackType === "mouse") { - var e = document.createEvent("MouseEvent"); - return e; + return document.createEvent("MouseEvent"); } else if (fallbackType === "touch") { - var e = document.createEvent("MouseEvent"); - (e).isTouch = true; + e = document.createEvent("MouseEvent"); + e.isTouch = true; return e; } } @@ -1716,7 +1714,7 @@ module Helper { export function forEach(array: Array, asyncCallbackFn: (value?, index?, array?) => any): WinJS.Promise { // Execute an asynchronous forEach loop over an array. The asynchronous forEach loop only applies asyncCallbackFn to each subsequent value in the array, // after the Promise returned by applying asyncCallbackFn to the previous array value completes. - // + // // Returns a Promise that completes when all promises that were returned by applying asyncCallbackFn to every value in the array have been completed. var p = WinJS.Promise.as(); array.forEach((value, index, array) => { diff --git a/tests/WWA-Application/application.ts b/tests/WWA-Application/application.ts index 0e1693f31..8ed4f17b5 100644 --- a/tests/WWA-Application/application.ts +++ b/tests/WWA-Application/application.ts @@ -3151,7 +3151,7 @@ module CorsicaTests { // Query the system for Localized "'x' of undefined or null reference" var errorText = "'x' of undefined or null reference"; - try { null.x(); } + try { thisVariableNotDefined.x(); } catch (e) { errorText = e.message; } @@ -3182,7 +3182,7 @@ module CorsicaTests { }) .done(function () { // next line is an intentional reference error - null.x(); + thisVariableNotDefined.x(); }) LiveUnit.Assert.areEqual(0, count);