typescript - 在打字稿中导入超集群时出错(TypeError:无法设置未定义的属性“选项”)
问题描述
当我在打字稿中导入超集群时,我遇到了这个错误。请随意发表评论。
ExceptionsManager.js:86 TypeError: Cannot set property 'options' of undefined
This error is located at:
in App (at renderApplication.js:40)
in RCTView (at View.js:35)
in View (at AppContainer.js:98)
in RCTView (at View.js:35)
in View (at AppContainer.js:115)
in AppContainer (at renderApplication.js:39)
更新
当程序执行以下函数时,我得到了异常(ios模拟器中的警报)。
const cluster = supercluster({
radius: 40,
maxZoom: 16,
});
解决方案
幸运的是,安装@types/supercluster后,错误消失了。
yarn add @types/supercluster
or
npm install --save @types/supercluster
推荐阅读
- python - 在 Python CVXPY 中,变量矩阵中是否有针对不同元素的计数函数?
- python - 如何使用 tkinter 创建两个按钮,当用户单击正确的按钮时,它将运行另一个窗口
- java - 是否有可替代颤振的 createNotificationChannels() 方法?
- python - 将带有索引的numpy数组转换为字符串
- python - 如何使用python将4个灰度图像组合成单个灰度图像
- reactjs - Redux / Thunk / slice 函数不返回参数调用的数据
- azure-devops - 在 linux app Service azure 上部署 react js web app
- c# - 如何使用 FIXML 请求 .ashx 作为请求数据?
- c# - 日期时间自定义格式
- google-chrome - chrome 扩展 - 显示带有按钮的通知 - 设置按钮不起作用