react-amap
react-amap copied to clipboard
typescript support?
- [x] 我已经搜索过 issue,没有类似的问题,或者类似的问题仍然没有解决方案。
- [x] 我已经搜索过文档,并且仍然没有找到解决方案。
- [x] 我写了个问题重现的例子,链接或者代码将会贴在下面。
Reproduce Example Link or Code Fragment
window.AMap.sth(sth)
// Property 'AMap' does not exist on type 'Window & typeof globalThis'.
What is Expected?
Create a package called '@types/amap' to fix problem like this.
What is actually happening?
typescript compiler seem very angry and block me do this :(
Like this:
// @ts-ignore
declare global {
interface Window {
AMap: typeof AMap;
}
}