Javascript Can';t导入google maps包中的加载程序类型

Javascript Can';t导入google maps包中的加载程序类型,javascript,typescript,google-maps,npm,interface,Javascript,Typescript,Google Maps,Npm,Interface,我正在使用动态加载vue项目中的GMAPSAPI(使用quasar v2框架)。在模块文档中,它说类型已经与版本>=4.0.0的包一起发布(我使用的是4.3.3),但我正在尝试导入Loader类,在上面的代码中出现以下错误 import { defineComponent } from 'vue' import { Loader, LoaderOptions } from 'google-maps' export default defineComponent({ async setup

我正在使用动态加载vue项目中的GMAPSAPI(使用quasar v2框架)。在模块文档中,它说类型已经与版本>=4.0.0的包一起发布(我使用的是4.3.3),但我正在尝试导入Loader类,在上面的代码中出现以下错误

import { defineComponent } from 'vue'
import { Loader, LoaderOptions } from 'google-maps'

export default defineComponent({
  async setup () {
    const options: LoaderOptions = {/* todo */}
    const loader = new Loader('my-api-key', options) // Unsafe assignment of an `any` value.eslint@typescript-eslint/no-unsafe-assignment)
                                                     // Unsafe construction of an any type value.eslint@typescript-eslint/no-unsafe-call)
  }
})
我搜索了模块文件,找到了这个文件

node_modules/googlemaps/lib/types/loader.d.ts

我不明白为什么LoaderOptions类型导入正确而Loader不正确

import { google } from './types';
export declare interface LoaderOptions {
    /* ... */
}
export declare class Loader {
    /* ... */
}