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

fix eslint error and Descriptions.Item ts define #17049

Merged
merged 1 commit into from Jun 16, 2019

Conversation

Projects
None yet
4 participants
@chenshuai2144
Copy link
Contributor

commented Jun 11, 2019

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

👻 What's the background?

用 eslint 跑了一遍发现类型有问题

💡 Solution

📝 Changelog

Language Changelog
🇺🇸 English fix TypeScript type error
🇨🇳 Chinese 修复 TypeScript 的类型错误

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@pr-triage pr-triage bot added the PR: unreviewed label Jun 11, 2019

@chenshuai2144 chenshuai2144 force-pushed the fix-ts-warning branch from 76e3ded to 503d01c Jun 14, 2019

@netlify

This comment has been minimized.

Copy link

commented Jun 14, 2019

Deploy preview for ant-design ready!

Built with commit 1cfba67

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

@chenshuai2144 chenshuai2144 referenced this pull request Jun 14, 2019

Closed

fix: Descriptions.Item ts define #17080

1 of 14 tasks complete

@chenshuai2144 chenshuai2144 changed the title fix eslint error fix eslint error and Descriptions.Item ts define Jun 14, 2019

@chenshuai2144 chenshuai2144 force-pushed the fix-ts-warning branch from 3de29da to 1cfba67 Jun 15, 2019

@codecov

This comment has been minimized.

Copy link

commented Jun 15, 2019

Codecov Report

Merging #17049 into master will decrease coverage by 0.01%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17049      +/-   ##
==========================================
- Coverage   95.96%   95.95%   -0.02%     
==========================================
  Files         263      263              
  Lines        7340     7341       +1     
  Branches     2009     2009              
==========================================
  Hits         7044     7044              
- Misses        294      295       +1     
  Partials        2        2
Impacted Files Coverage Δ
components/descriptions/index.tsx 98.63% <50%> (-1.37%) ⬇️

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 e8e81e2...1cfba67. Read the comment docs.

@chenshuai2144

This comment has been minimized.

Copy link
Contributor Author

commented Jun 15, 2019

换行了一下。测试覆盖率下去了

@chenshuai2144 chenshuai2144 merged commit ae26f76 into master Jun 16, 2019

24 of 30 checks passed

codecov/patch 50% of diff hit (target 95.96%)
Details
Semantic Pull Request add a semantic commit or PR title
Details
Header rules - ant-design No header rules processed
Details
Pages changed - ant-design 216 new files uploaded
Details
packtracker/css 481 KB — ▲ 0.02%
Details
packtracker/javascript 1.83 MB — No Change
Details
LGTM analysis: JavaScript No new or fixed alerts
Details
License Compliance All checks passed.
Details
Mixed content - ant-design No mixed content detected
Details
Redirect rules - ant-design 18 redirect rules processed
Details
WIP Ready for review
Details
ant-design.ant-design #ant design succeeded
Details
buildsize No change
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/project 95.95% (-0.02%) compared to e8e81e2
Details
netlify/ant-design/deploy-preview Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No manifest changes detected

@delete-merged-branch delete-merged-branch bot deleted the fix-ts-warning branch Jun 16, 2019

@zombieJ zombieJ referenced this pull request Jun 17, 2019

Merged

chore: 3.19.5 changelog #17133

1 of 10 tasks complete
@afc163

This comment has been minimized.

Copy link
Member

commented Jun 17, 2019

再次没有在 PR 和 commit message 中关联相关 issue:#16946

@afc163 afc163 referenced this pull request Jun 17, 2019

Closed

fix: DescriptionsItem typings modified #16946

5 of 14 tasks complete
@ztplz

This comment has been minimized.

Copy link
Collaborator

commented Jun 17, 2019

为啥你都用了static你还要
image
JSX.Element 实际上就是React.ReactElement, 用Item的时候children是string还是会挂吧
ReactNode的范围太广了 用ts的时候你基本写什么都不会错的 但是看代码 你又好像只想把它当element处理
image
typeof多余了 直接 React.SFC<DescriptionsItemProps>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.