Someone else wrote the extension. It surfaces the ajax progress events with a syntax like this:
$.ajax(url)
.progress(function(e) {
// tracking downloading
})
.uploadProgress(function(e) {
// tracking uploading
// if (e.lengthComputable) {
// var percentage = Math.round((e.loaded * 100) / e.total);
// console.log(percentage);
//}
});
TypeScript complains that these new methods don't exist.
It seems to me that I need to somehow add them to JQueryXHR
which is defined in jquery.d.ts from DefinitelyTyped. This being a third party library I don't want to edit it - that would interfere with updates.
How do I go about adding a method to a TypeScript interface that has already been defined in a file that I don't want to edit?