Closed
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
Steps to reproduce
Create <Slider>
with prop step={null}
and typescript yields an error that "null" is not an acceptable value.
What is expected?
That "null" value IS an acceptable value.
According to the docs it has a special meaning, and there's even an example in the AntD site with it - https://codesandbox.io/s/jxny9
What is actually happening?
In #26884 (v4.6.6) the ts definition was wrongly changed from step?: number | null
to step?: number
.
Environment | Info |
---|---|
antd | 4.6.6 |
React | 16.13.1 |
System | MacOS |
Browser | Chrome |
🔔 Probably was undetected since the error appears for --strictnullchecks
/strict: true
in tsconfig.json.