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

fix: badge type error. #11421

Merged
merged 1 commit into from Jul 23, 2018

Conversation

Projects
None yet
3 participants
@zongzi531
Contributor

zongzi531 commented Jul 23, 2018

First of all, thank you for your contribution! :-)

Please makes sure that these checkboxes are checked before submitting your PR, thank you!

  • Make sure that you propose PR to right branch: bugfix for master, feature for latest active branch feature-x.x.
  • Make sure that you follow antd's code convention.
  • Run npm run lint and fix those errors before submitting in order to keep consistent code style.
  • Rebase before creating a PR to keep commit history clear.
  • Add some descriptions and refer relative issues for you PR.

Extra checklist:

if isBugFix :

  • Make sure that you add at least one unit test for the bug which you had fixed.

elif isNewFeature :

  • Update API docs for the component.
  • Update/Add demo to demonstrate new feature.
  • Update TypeScript definition for the component.
  • Add unit tests for the feature.
@ant-design-bot

This comment has been minimized.

ant-design-bot commented Jul 23, 2018

Deploy preview for ant-design ready!

Built with commit 9d3840b

https://deploy-preview-11421--ant-design.netlify.com

@zongzi531

This comment has been minimized.

Contributor

zongzi531 commented Jul 23, 2018

I am coding Typescript, but Failed to compile.

./src/components/NavTabs/index.ts
(31,13): error TS2345: Argument of type 'typeof Badge' is not assignable to parameter of type 'string | ComponentClass<BadgeProps> | StatelessComponent<BadgeProps>'.
  Type 'typeof Badge' is not assignable to type 'StatelessComponent<BadgeProps>'.
    Types of property 'defaultProps' are incompatible.
      Type '{ prefixCls: string; scrollNumberPrefixCls: string; count: null; showZero: boolean; dot: boolean;...' is not assignable to type 'Partial<BadgeProps> | undefined'.
        Type '{ prefixCls: string; scrollNumberPrefixCls: string; count: null; showZero: boolean; dot: boolean;...' is not assignable to type 'Partial<BadgeProps>'.
          Types of property 'count' are incompatible.
            Type 'null' is not assignable to type 'string | number | undefined'.

So, I try to fixed this bug.

@codecov

This comment has been minimized.

codecov bot commented Jul 23, 2018

Codecov Report

Merging #11421 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11421   +/-   ##
=======================================
  Coverage   91.83%   91.83%           
=======================================
  Files         199      199           
  Lines        5024     5024           
  Branches     1407     1407           
=======================================
  Hits         4614     4614           
- Misses        404      406    +2     
+ Partials        6        4    -2
Impacted Files Coverage Δ
components/badge/index.tsx 96.42% <ø> (ø) ⬆️
components/badge/ScrollNumber.tsx 98.27% <100%> (ø) ⬆️
components/transfer/index.tsx 87.41% <0%> (ø) ⬆️
components/time-picker/index.tsx 74.5% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f503b5...9d3840b. Read the comment docs.

@afc163 afc163 merged commit e29a88b into ant-design:master Jul 23, 2018

20 checks passed

WIP ready for review
Details
ci/circleci: compile Your tests passed on CircleCI!
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_es Your tests passed on CircleCI!
Details
ci/circleci: test_es_15 Your tests passed on CircleCI!
Details
ci/circleci: test_lib Your tests passed on CircleCI!
Details
ci/circleci: test_lib_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 91.83%)
Details
codecov/project 91.83% (+0%) compared to 0f503b5
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No manifest changes detected

bors bot added a commit to mozilla/delivery-console that referenced this pull request Jul 25, 2018

Merge #319
319: Update dependency antd to v3.7.2 r=magopian a=renovate[bot]

This Pull Request updates dependency [antd](https://github.com/ant-design/ant-design) from `v3.7.1` to `v3.7.2`



<details>
<summary>Release Notes</summary>

### [3.7.2](https://github.com/ant-design/ant-design/releases/3.7.2)
[Compare Source](ant-design/ant-design@3.7.1...3.7.2)
- DatePicker
  - 🐞 **Fix issue resulting in year and month can not be changed in control mode.** [b9992f4](ant-design/ant-design@b9992f4)
  - 🐞 Fix warning of `getDerivedStateFromProp`. [#&#8203;11398](`ant-design/ant-design#11398) [@&#8203;yoyo837]
- Drawer
  - 🐞 Fix close animation when setting `destroyOnClose`. [#&#8203;11307](`ant-design/ant-design#11307)
  - 🐞 Fix display issue when using a `vw` value as `width`. [#&#8203;11326](`ant-design/ant-design#11326)
  - 🐞 Fix `wrapClassName` now working.
- 🐞 Fix text overflow of Tooltip. [#&#8203;11402](`ant-design/ant-design#11402) [@&#8203;weidapao]
- 🐞 Fix style issue of dark theme Menu in Layout.Header. [#&#8203;11400](`ant-design/ant-design#11400) [@&#8203;hongxuWei]
- 🐞 Fix the arrow buttons of InputNumber showing wrong positon in a fixed table. [#&#8203;11408](`ant-design/ant-design#11408)
- 🐞 Fix issue resulting in Select.Option shows wrong border radius in Select.OptGroup. [6cb6f5c](ant-design/ant-design@6cb6f5c)
- 🐞 Fix issue resulting in `onChange` was trigged twice when click the filter icon of Table. [#&#8203;11164](`ant-design/ant-design#11164) [@&#8203;adybionka]
- 🐞 Fix issue resulting title of Model.confirm shows scrollbar on Firefox. [#&#8203;11432](`ant-design/ant-design#11432)
- TypeScript
  - 🐞 Fix type definition of Radio.Group. [#&#8203;11409](`ant-design/ant-design#11409) [@&#8203;eddiemoore]
  - 🐞 Fix type definition of TreeSelect. [#&#8203;11442](`ant-design/ant-design#11442) [@&#8203;JribiBelhassen]
  - 🐞 Fix type definition of Badge. [#&#8203;11421](`ant-design/ant-design#11421) [@&#8203;zongzi531]


---


- DatePicker
  - 🐞 **修复在受控模式下不能切换年月的问题。**[b9992f4](ant-design/ant-design@b9992f4)
  - 🐞 修复在 `getDerivedStateFromProp` 的警告。[#&#8203;11398](`ant-design/ant-design#11398) [@&#8203;yoyo837]
- Drawer
  - 🐞 修复使用 `destroyOnClose` 时没有关闭动画的问题。[#&#8203;11307](`ant-design/ant-design#11307)
  - 🐞 修复 `width` 以 `vw` 为单位时的显示错误。[#&#8203;11326](`ant-design/ant-design#11326)
  - 🐞 修复 `wrapClassName` 属性无效的问题。
- 🐞 修复 Tooltip 文字溢出的问题。[#&#8203;11402](`ant-design/ant-design#11402) [@&#8203;weidapao]
- 🐞 修复 Menu 在 `theme` 为 `dark` 是在 Layout.Header 里的样式问题。[#&#8203;11400](`ant-design/ant-design#11400) [@&#8203;hongxuWei]
- 🐞 修复 InputNumber 的箭头按钮在使用了固定列的 Table 里显示错位的问题。[#&#8203;11408](`ant-design/ant-design#11408)
- 🐞 修复 Select 使用分组时 Option 的圆角显示错误。[6cb6f5c](ant-design/ant-design@6cb6f5c)
- 🐞 修复 Table 第一次点击过滤按钮的时候 `onChange` 会被触发两次的问题。[#&#8203;11164](`ant-design/ant-design#11164) [@&#8203;adybionka]
- 🐞 修复 Model.confirm 的标题在 Firefox 下会显示滚动条的问题。[#&#8203;11432](`ant-design/ant-design#11432)
- TypeScript
  - 🐞 修复 Radio.Group 类型定义。[#&#8203;11409](`ant-design/ant-design#11409) [@&#8203;eddiemoore]
  - 🐞 修复 TreeSelect 类型定义。[#&#8203;11442](`ant-design/ant-design#11442) [@&#8203;JribiBelhassen]
  - 🐞 修复 Badge 类型定义。[#&#8203;11421](`ant-design/ant-design#11421) [@&#8203;zongzi531]

---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).

Co-authored-by: Renovate Bot <bot@renovateapp.com>

zongzi531 added a commit to zongzi531/react-to-do-list that referenced this pull request Jul 26, 2018

update: antd 3.7.1 to 3.7.2
Fix type definition of Badge.
Pull #11421: ant-design/ant-design#11421
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment