mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Merge pull request #17513 from leonard-thieu/jquery
[jquery] Update type definitions
This commit is contained in:
commit
ae6459f44a
1510
types/jquery/index.d.ts
vendored
1510
types/jquery/index.d.ts
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1202,14 +1202,13 @@ function examples() {
|
||||
// Attach a done, fail, and progress handler for the asyncEvent
|
||||
$.when(asyncEvent()).then(
|
||||
function(status) {
|
||||
status === 3;
|
||||
alert(status + ', things are going well');
|
||||
},
|
||||
function(status) {
|
||||
alert(status + ', you fail this time');
|
||||
},
|
||||
function(status) {
|
||||
// $('body').append(status);
|
||||
$('body').append(status);
|
||||
},
|
||||
);
|
||||
}
|
||||
@ -1233,9 +1232,7 @@ function examples() {
|
||||
// Use the object as a Promise
|
||||
_obj.done(function(name) {
|
||||
_obj.hello(name); // Will alert "Hello John"
|
||||
});
|
||||
/// TODO: This doesn't work even though .done() returns this
|
||||
// .hello('Karl'); // Will alert "Hello Karl"
|
||||
}).hello('Karl'); // Will alert "Hello Karl"
|
||||
}
|
||||
|
||||
function deferred_then_0() {
|
||||
@ -1392,7 +1389,7 @@ function examples() {
|
||||
function each_2() {
|
||||
$('button').click(function() {
|
||||
$('div').each(function(index, element) {
|
||||
// element == this
|
||||
// element == this;
|
||||
$(element).css('backgroundColor', 'yellow');
|
||||
if ($(this).is('#stop')) {
|
||||
$('span').text('Stopped at div index #' + index);
|
||||
@ -3757,13 +3754,13 @@ function examples() {
|
||||
|
||||
function offset_0() {
|
||||
var p = $('p:last');
|
||||
var offset = p.offset();
|
||||
var offset = p.offset()!;
|
||||
p.html('left: ' + offset.left + ', top: ' + offset.top);
|
||||
}
|
||||
|
||||
function offset_1() {
|
||||
$('*', document.body).click(function(event) {
|
||||
var offset = $(this).offset();
|
||||
var offset = $(this).offset()!;
|
||||
event.stopPropagation();
|
||||
$('#result').text(this.tagName +
|
||||
' coords ( ' + offset.left + ', ' + offset.top + ' )');
|
||||
|
||||
@ -2,8 +2,9 @@
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"ban-types": false,
|
||||
"no-misused-new": false,
|
||||
"callable-types": false,
|
||||
"no-empty-interface": false,
|
||||
"callable-types": false
|
||||
"no-misused-new": false,
|
||||
"space-before-function-paren": false
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user