This PR adds a new method that issues an AJAX request after aborting the existing ongoing request if one exists. This is a pattern I've seen a lot, it seemed worth adding a utility function to core.
Usage:
defineComponent({
methods: {
performRequest: oneAtATime<ResponseType>('MyPlugin.myMethod'),
doSomething() {
this.performRequest({ idSite, period, ... }).then(() => {
// ...
});
},
},
});