mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 19:43:20 +08:00
jquery: Fix tests (#25422)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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/>', {
|
||||
|
||||
Reference in New Issue
Block a user