Sanity-check decaffeinate ajax

This commit is contained in:
Simon Legner 2024-01-06 15:50:23 +01:00
parent 262a0b9d56
commit 04d167c9e0

View file

@ -1,19 +1,9 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS205: Consider reworking code to avoid use of IIFEs
* DS207: Consider shorter variations of null checks
* DS208: Avoid top-level this
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
const MIME_TYPES = {
json: "application/json",
html: "text/html",
};
this.ajax = function (options) {
function ajax(options) {
applyDefaults(options);
serializeData(options);
@ -30,7 +20,7 @@ this.ajax = function (options) {
} else {
return parseResponse(xhr, options);
}
};
}
ajax.defaults = {
async: true,