viewState `padding` expected to be optional

未关闭
#2,133 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
typescript
领域
frontend

调研方向

首先比较 src/types/external.ts 中的 ViewState 定义与 src/mapbox/mapbox.ts:544-546 附近的实现。确认该实现允许缺少 padding,然后更新类型以匹配该行为;当报告的 TypeScript 错误不再出现时,此 issue 即完成。

由索引模型根据 Issue 内容生成。

描述

bug

Currently I'm experiencing a Property 'padding' is missing in type ... but required in type 'ViewState'. error. I'd expect this type to be optional based on this implementation:
https://github.com/visgl/react-map-gl/blob/109c334bdffaa5b2016c50bf6aaa119ce56082ce/src/mapbox/mapbox.ts#L544-L546

I believe the issue is in this type definition, which should define padding as optional.

https://github.com/visgl/react-map-gl/blob/109c334bdffaa5b2016c50bf6aaa119ce56082ce/src/types/external.ts#L30

I can open a PR to fix this if it should be optional.

主要语言
TypeScript
星标
8.5k
派生
1.3k
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

visgl/react-map-gl 的其他 Issue

查看 visgl/react-map-gl 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。