fix: add type for importMetaGlob

This commit is contained in:
chenxuehai@alltuu.com committed 2023-03-10 11:23:06 +08:00
1 parent dc98b96ce2
commit 3d6465346c
4 files changed
+25 -11

No files matched your search

+5 -1
View File
@@ -1,6 +1,10 @@
import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer';
const modules = import.meta.glob('./**/*.ts', { eager: true });
interface IModuleType {
default: any[];
}
const modules = import.meta.glob<IModuleType>('./**/*.ts', { eager: true });
const mockModules: any[] = [];
Object.keys(modules).forEach((key) => {