Preact: Compilation problem with ts 2.4.0

Created on 22 Jun 2017  路  7Comments  路  Source: preactjs/preact

Trying to compile a project with preact as a dependency and get the following error:

node_modules/preact/dist/preact.d.ts(48,17): error TS2559: Type 'Component<PropsType, StateType>' has no properties in common with type 'ComponentLifecycle<PropsType, StateType>'.

This only happens with ts 2.4.0, 2.3.x works file

Most helpful comment

Waiting for this one too.

All 7 comments

It looks like it has to do with the introduction of Weak types

ComponentLifecycle should have at least one overlapping property with Component

This is likely already fixed by https://github.com/developit/preact/pull/730 (merged yesterday)

Yup, that fix will go out in 8.2.

Feel free to close this then :)

there's a workaround: fix your typescript version to 2.3.4 until Preact 8.2 published.

Waiting for this one too.

getting error still

Was this page helpful?
0 / 5 - 0 ratings