Skip to content

Commit

Permalink
Adopt TypeScript 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
xirzec committed Feb 12, 2015
1 parent 4c12bab commit 9cf8ad2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -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"
},
Expand Down
3 changes: 2 additions & 1 deletion tasks/options/ts.js
Expand Up @@ -25,7 +25,8 @@
sourceMap: false,
noImplicitAny: true,
declaration: false,
removeComments: false
removeComments: false,
suppressImplicitAnyIndexErrors: true
}
},
};
Expand Down
16 changes: 7 additions & 9 deletions tests/TestLib/Helper.ts
Expand Up @@ -45,19 +45,17 @@ module Helper {

export function createPointerEvent(fallbackType: string) {
// PointerEvent is already supported, so just use that
var e:any;
if ((<any>window).PointerEvent) {
var e = document.createEvent("PointerEvent");
return e;
return document.createEvent("PointerEvent");
} else if ((<any>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");
(<any>e).isTouch = true;
e = document.createEvent("MouseEvent");
e.isTouch = true;
return e;
}
}
Expand Down Expand Up @@ -1716,7 +1714,7 @@ module Helper {
export function forEach(array: Array<any>, asyncCallbackFn: (value?, index?, array?) => any): WinJS.Promise<any> {
// 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) => {
Expand Down
4 changes: 2 additions & 2 deletions tests/WWA-Application/application.ts
Expand Up @@ -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;
}
Expand Down Expand Up @@ -3182,7 +3182,7 @@ module CorsicaTests {
})
.done(function () {
// next line is an intentional reference error
null.x();
thisVariableNotDefined.x();
})

LiveUnit.Assert.areEqual(0, count);
Expand Down

0 comments on commit 9cf8ad2

Please sign in to comment.