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

v 8.4.1 Typing Issues #1268

Closed
pmkroeker opened this issue Dec 7, 2018 · 2 comments
Closed

v 8.4.1 Typing Issues #1268

pmkroeker opened this issue Dec 7, 2018 · 2 comments

Comments

@pmkroeker
Copy link
Contributor

I just updated preact to the latest version and I got a new slew of typescript problems (typings were updated so I figured I would get a few). But the curious thing I encountered was that some of the errors were being generated by the preact.d.ts file itself. It works fine when I build without preact-redux, but it throws the below errors when I do.

ERROR in [at-loader] ./node_modules/preact/dist/preact.d.ts:1:1
    TS6200: Definitions of the following identifiers conflict with those in another file: ClipboardEventHandler, CompositionEventHandler, DragEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, TouchEventHandler, UIEventHandler, WheelEventHandler, AnimationEventHandler, TransitionEventHandler, GenericEventHandler, PointerEventHandler

ERROR in [at-loader] ./node_modules/preact/dist/preact.d.ts:138:13
    TS2320: Interface 'Element' cannot simultaneously extend types 'VNode<any>' and 'VNode<any>'.
  Named property 'children' of types 'VNode<any>' and 'VNode<any>' are not identical.

ERROR in [at-loader] ./node_modules/preact/dist/preact.d.ts:138:13
    TS2320: Interface 'Element' cannot simultaneously extend types 'VNode<any>' and 'VNode<any>'.
  Named property 'nodeName' of types 'VNode<any>' and 'VNode<any>' are not identical.

ERROR in [at-loader] ./node_modules/preact/dist/preact.d.ts:141:13
    TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, any>' and 'Component<any, any>'.
  Named property 'render' of types 'Component<any, any>' and 'Component<any, any>'
are not identical.

ERROR in [at-loader] ./node_modules/preact/dist/preact.d.ts:421:13
    TS2320: Interface 'DOMAttributes' cannot simultaneously extend types 'PreactDOMAttributes' and 'PreactDOMAttributes'.
  Named property 'children' of types 'PreactDOMAttributes' and 'PreactDOMAttributes' are not identical.

ERROR in [at-loader] ./node_modules/preact/dist/preact.d.ts:609:13
    TS2320: Interface 'HTMLAttributes' cannot simultaneously extend types 'ClassAttributes<any>' and 'ClassAttributes<any>'.
  Named property 'key' of types 'ClassAttributes<any>' and 'ClassAttributes<any>' are not identical.

ERROR in [at-loader] ..\node_modules\preact\dist\preact.d.ts:1:1
    TS6200: Definitions of the following identifiers conflict with those in another file: ClipboardEventHandler, CompositionEventHandler, DragEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, TouchEventHandler, UIEventHandler, WheelEventHandler, AnimationEventHandler, TransitionEventHandler, GenericEventHandler, PointerEventHandler

Might these errors get thrown from within other parts of my code? Going to work through some of the other problems right now, so I might fix them during the process. Will report back if I manage to solve the issue.

@pmkroeker
Copy link
Contributor Author

It seems that the issue is with the typings in preact-redux. Currently preact-redux and preact v8.3.1 are compatible, but upgrading to preact v8.4.1 causes some errors to pop up.

@pmkroeker
Copy link
Contributor Author

Closing as I did some file cleanup and forgot to update preact in a parent environment.

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

No branches or pull requests

1 participant