使用 import.meta.glob 批量导入后,defineAsyncComponent typescript 报错

const modules = import.meta.glob("./*.vue");
const allComponent: Record<string, unknown> = {};
for (const path in modules) {
  const fileName = path.replace(/^\.\//, "").replace(/\.vue$/, "");
  if (fileName) {
    allComponent[fileName] = defineAsyncComponent(modules[path]);
  }
}

modulespath 提示下面错误

类型“() => Promise<unknown>”的参数不能赋给类型“AsyncComponentLoader<Component> | AsyncComponentOptions<Component>”的参数。
  不能将类型“() => Promise<unknown>”分配给类型“AsyncComponentLoader<Component>”。
    不能将类型“Promise<unknown>”分配给类型“Promise<AsyncComponentResolveResult<Component>>”。
      不能将类型“unknown”分配给类型“AsyncComponentResolveResult<Component>”。ts-plugin(2345)
const modules: Record<string, () => Promise<unknown>>
import.meta.glob<Component>

参考