type error with react 16.3.1 #9931
Comments
happens to me too.
for the time being I edited |
@whtsky I don't see codes in your repo. |
Hello @whtsky. Please provide a online reproduction by forking this link https://u.ant.design/codesandbox-repro. Issues labeled by |
@yesmeck It is antd's type definition (specifically, IMO boolean value |
@yesmeck We don't need any code to reproduce this problem. Simply import |
@yesmeck same error to me. |
same here. changing |
happens to me too. |
@yesmeck are you planning to issue a patch release? |
@afc163 isn't it urgent? it is impossible to compile TS+react+antd app |
You can try |
@afc163 downgrading doesn't work if I have some for example |
@alesdrobysh You can try to modify |
Happens to me. |
yes, the problem does exist |
same here |
It happens to me too. |
Is this an urgent issue? |
According to their schedule they ought to do a release at the end of each week, so we would rather wait a bit |
as a temporary solution it works to add skipLibCheck flag to tsconfig |
* a known issue with antd ant-design/ant-design#9931
我理解的更新之后的版本和新版的react可能不兼容,所以你可以将版本降下去,我的版本是@AntD 3.2.0, @types/react 16.0.25 |
Version
3.3.3
Environment
@types/react 16.3.4
, antd 3.4.0Reproduction link
https://github.com/whtsky/antd-react-16.3.1-type
Steps to reproduce
npx tsc
What is expected?
compile
What is actually happening?
node_modules/antd/lib/badge/ScrollNumber.d.ts(28,81): error TS2344: Type '{ className: string; style: { transition: string | boolean; msTransform: string; WebkitTransform:...' does not satisfy the constraint 'HTMLAttributes'.
Types of property 'style' are incompatible.
Type '{ transition: string | boolean; msTransform: string; WebkitTransform: string; transform: string; }' is not assignable to type 'CSSProperties'.
Types of property 'transition' are incompatible.
Type 'string | boolean' is not assignable to type 'string'.
Type 'true' is not assignable to type 'string'.
node_modules/antd/lib/badge/ScrollNumber.d.ts(38,77): error TS2344: Type '{ className: string; style: { transition: string | boolean; msTransform: string; WebkitTransform:...' does not satisfy the constraint 'HTMLAttributes'.
Types of property 'style' are incompatible.
Type '{ transition: string | boolean; msTransform: string; WebkitTransform: string; transform: string; }' is not assignable to type 'CSSProperties'.
Types of property 'transition' are incompatible.
Type 'string | boolean' is not assignable to type 'string'.
Type 'true' is not assignable to type 'string'.
The text was updated successfully, but these errors were encountered: