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
<Router>{/* Type 'typeof ClassComponent' is not assignable to type 'AnyComponent<{ path: string; component: typeof ClassComponent; }> & (typeof ClassComponent | undefined)'. */}<Routepath="/class"component={ClassComponent}/>{/* works ok */}<Routepath="/fc"component={FunctionComponent}/></Router>
It works at runtime, but the typing has an error.
The text was updated successfully, but these errors were encountered:
Found the issue, but I think this should be corrected upstream. If you're willing to patch in the meantime (patch-package or pnpm patch are great for this sort of thing), you can do this:
// node_modules/preact/src/index.d.ts
export type AnyComponent<P = {}, S = {}> =
| FunctionComponent<P>
- | Component<P, S>;+ | ComponentConstructor<P, S>;
It works at runtime, but the typing has an error.
The text was updated successfully, but these errors were encountered: