You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check if updating to the latest Preact version resolves the issue
Describe the bug
The React namespace in preact/compat is missing a definition for MemoExoticComponent so users who rely on that and use preact/compat's types instead of React's run into the issue where their components are typed as any.
Describe the bug
The React namespace in
preact/compat
is missing a definition forMemoExoticComponent
so users who rely on that and usepreact/compat
's types instead of React's run into the issue where their components are typed asany
.https://twitter.com/Sawtaytoes/status/1625959909752709121
To Reproduce
The following example React library will generate the following types:
If we were to alias
react
topreact/compat
using"paths"
in atsconfig.json
in a consumer of the above library, that would essentially become this:However, as there is no
MemoExoticComponent
,MyMemoComponent
becomes typed asany
.Interestingly, TS doesn't throw an error when an aliased path is missing a member.
Expected behavior
Should distribute
MemoExoticComponent
The text was updated successfully, but these errors were encountered: