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
Merged

Conversation

chenshuai2144
Copy link
Contributor

@chenshuai2144 chenshuai2144 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

@netlify
Copy link

@netlify netlify bot commented Jun 14, 2019

Deploy preview for ant-design ready!

Built with commit 1cfba67

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

@chenshuai2144 chenshuai2144 changed the title fix eslint error fix eslint error and Descriptions.Item ts define Jun 14, 2019
components/descriptions/index.tsx Outdated Show resolved Hide resolved
@codecov
Copy link

@codecov codecov bot 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
Copy link
Contributor Author

@chenshuai2144 chenshuai2144 commented Jun 15, 2019

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

@chenshuai2144 chenshuai2144 merged commit ae26f76 into master Jun 16, 2019
28 of 30 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix-ts-warning branch Jun 16, 2019
@zombieJ zombieJ mentioned this pull request Jun 17, 2019
10 tasks
@afc163
Copy link
Member

@afc163 afc163 commented Jun 17, 2019

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

@ztplz
Copy link
Contributor

@ztplz ztplz 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants