Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-bmapgl/types/bmapgl/index.d.ts”不是模块 #60

Open
kangkang1995 opened this issue Sep 16, 2022 · 6 comments
Open

react-bmapgl/types/bmapgl/index.d.ts”不是模块 #60

kangkang1995 opened this issue Sep 16, 2022 · 6 comments

Comments

@kangkang1995
Copy link

我目前开发环境时react+typescript,然后报ts错误,node_modules/react-bmapgl/types/bmapgl/index.d.ts”不是模块

相关包版本:
"react-bmapgl": "^0.2.7",
"@types/bmapgl": "^0.0.5",

感觉官方支持不完善,不清楚有什么好的解决方案;
目前我用的是:
*. declare module "react-bmapgl"; 这种就不太好,缺少了类型
*. 到react-bmapgl的package.json里面的types,把types/bmapgl/index.d.ts 改成 dist/index.d.ts;感觉这种也不好,如果这种可以的话,那官方为什么处理一下呢,而手动改也不好。
求解决方案

@yifanwww
Copy link

relates to my issue #55

@sunnhann
Copy link

后来的解决方案是啥?

@YonJey
Copy link

YonJey commented Dec 21, 2022

declare module "react-bmapgl"

@lyh543
Copy link
Contributor

lyh543 commented Apr 22, 2023

import { Map } from 'react-bmapgl/dist'; 可以临时解决

@lyh543
Copy link
Contributor

lyh543 commented May 8, 2023

#67 改了 package.jsontypes,等官方下次发版吧

@Leidianfawangck
Copy link

我现在遇到了这个问题,好像官方还是没有修复,有什么更优雅地解决方法吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants