This commit is contained in:
2022-07-18 02:50:52 +00:00
parent befd344ab0
commit 06181b34d6
8569 changed files with 818704 additions and 352705 deletions
+4 -7
View File
@@ -1,10 +1,9 @@
import {errorMessage, isFunction, loadResources} from './utils';
import {Loader, LoaderCallback} from '.';
import type {Loader, LoaderCallback} from '.';
/* eslint-disable no-invalid-this */
const loader: Loader = function(source) {
this.cacheable && this.cacheable();
const loader: Loader = function (source) {
this.cacheable();
const callback = this.async();
@@ -17,9 +16,7 @@ const loader: Loader = function(source) {
throw new Error(errorMessage.impossible);
}
/* eslint-disable-next-line @typescript-eslint/no-floating-promises */
loadResources(this, source, callback);
void loadResources(this, source, callback);
};
/* eslint-enable no-invalid-this */
export default loader;