flexbox-react
flexbox-react copied to clipboard
@types/react/index.d.ts compile failure
When I compile a project depending on the latest version of flexbox-react (4.4.0), the compile fails with a lot of error messages like this:
h1: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
~~
node_modules/flexbox-react/node_modules/@types/react/index.d.ts(3452,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'h1'
must be of type 'DetailedHTMLProps<HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>', but here has type 'DetailedHTMLProps<HTMLAttributes<HTMLHeadingEleme
nt>, HTMLHeadingElement>'.
I'm using Typescript 2.4.2.
The react I have in my own application is 16.0.2, although I don't think that should be relevant.
I'm still relatively new to Typescript and npm, so it may be not a problem with flexbox-react but something I do wrong.
I am having an identical issue, in which it is "redeclared with a different type," despite identical types.
(3514,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'textarea' must be of type 'DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>', but here has type 'DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>'.
Same errors for me. Typescript 2.5 fails, 2.4 works for me. Upgrading the @types/react typings to v16 works for me, v15.6 still fails. I guess these lines need an update https://github.com/nachoaIvarez/flexbox-react/blob/0b0a46c2ca34c29cb29af0d2f60076c13e5060de/package.json#L37-L38