mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
[jquery] Fix implicit 'any' type on variable in callback (occurs in 2.4-rc).
This commit is contained in:
@@ -46,14 +46,14 @@ function examples() {
|
||||
|
||||
function add_class_2() {
|
||||
$('div').addClass(function(index, currentClass) {
|
||||
var addedClass;
|
||||
var addedClass = '';
|
||||
|
||||
if (currentClass === 'red') {
|
||||
addedClass = 'green';
|
||||
$('p').text('There is one green div');
|
||||
}
|
||||
|
||||
return addedClass!;
|
||||
return addedClass;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user