mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix types
This commit is contained in:
1 parent
d27a1499d2
commit
1c3dc161b6
13 files changed
+48
-62
No files matched your search
@@ -31,7 +31,8 @@ function locateFile(basePath: string, filenames: string[]) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const getLoader = (type: string, filename: string) => async function loader(pending: string[], fail: string[], ctx: Context) {
|
||||
type LoadTask = 'handler' | 'model' | 'addon' | 'lib' | 'script' | 'service';
|
||||
const getLoader = (type: LoadTask, filename: string) => async function loader(pending: string[], fail: string[], ctx: Context) {
|
||||
for (const i of pending) {
|
||||
const p = locateFile(i, [`${filename}.ts`, `${filename}.js`]);
|
||||
if (p && !fail.includes(i)) {
|
||||
|
||||
Reference in new issue
Block a user