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

type: add type null #37421

Merged
merged 2 commits into from Sep 6, 2022
Merged

type: add type null #37421

merged 2 commits into from Sep 6, 2022

Conversation

li-jia-nan
Copy link
Member

@li-jia-nan li-jia-nan commented Sep 6, 2022

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

type: add type null

Language Changelog
🇺🇸 English add type null
🇨🇳 Chinese 新增类型null

☑️ Self-Check before Merge

⚠️ Please check all items below before review. ⚠️

  • 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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2022

@li-jia-nan
Copy link
Member Author

ci 挂了是因为 rc 还没发

@codecov
Copy link

codecov bot commented Sep 6, 2022

Codecov Report

Merging #37421 (60f1283) into master (df98cbb) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master    #37421   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          443       443           
  Lines         8174      8174           
  Branches      2402      2402           
=========================================
  Hits          8174      8174           
Impacted Files Coverage Δ
components/input-number/index.tsx 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@li-jia-nan li-jia-nan closed this Sep 6, 2022
@li-jia-nan li-jia-nan reopened this Sep 6, 2022
@zombieJ zombieJ merged commit 7ca1362 into ant-design:master Sep 6, 2022
@li-jia-nan li-jia-nan deleted the esm branch September 6, 2022 09:01
@zheeeng
Copy link
Contributor

zheeeng commented Sep 28, 2022

这个有兼容性变更,应该发 minor 版本,input number 好像也没有传递 null 的情况,这个变更对下游的影响蛮大的,加了一堆 null 判断。是否可以考虑改回来。

@zheeeng
Copy link
Contributor

zheeeng commented Sep 28, 2022

@li-jia-nan @zombieJ @afc163

@li-jia-nan
Copy link
Member Author

这个有兼容性变更,应该发 minor 版本,input number 好像也没有传递 null 的情况,这个变更对下游的影响蛮大的,加了一堆 null 判断。是否可以考虑改回来。

可以给个复现吗?

@zheeeng
Copy link
Contributor

zheeeng commented Sep 28, 2022

tsconfig 开 strict null checking 就会有:

const handleChange = (value: number) => {}

<InputNumber onChange={handleChange} />

这段代码之前可以运行,现在就不行了。得 const handleChange = (value: number | null) => {}

@houxd1992
Copy link

是的,升个版本 要改好多地方。。。

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.

Incorrect type for InputNumber's onChange
4 participants