jquery: Fix tests (#25422)

This commit is contained in:
Andy
2018-04-30 11:09:12 -07:00
committed by John Reilly
parent cd3e69c4db
commit 620ed4b696
2 changed files with 3 additions and 3 deletions

View File

@@ -655,9 +655,9 @@ function JQueryStatic() {
}
function isNumeric() {
function type_guard(obj: boolean) {
function type_guard(obj: boolean | number) {
if ($.isNumeric(obj)) {
// $ExpectType (true & number) | (false & number)
// $ExpectType number
obj;
} else {
// $ExpectType boolean

View File

@@ -1437,7 +1437,7 @@ function longdesc() {
$.getJSON('ajax/test.json', function(data) {
var items: string[] = [];
$.each(data, function(key, val) {
items.push('<li id=\'' + key + '\'>' + val + '</li>');
items.push('<li id=\'' + (key as string) + '\'>' + val + '</li>');
});
$('<ul/>', {