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
Encountering the following TypeScript error with the latest Preact 10.11.1 that supports SignalLike<T> type:
error TS2430: Interface 'HTMLAttributes<RefType>' incorrectly extends interface 'ClassAttributes<RefType>'.
Types of property 'default' are incompatible.
Type 'boolean | SignalLike<boolean> | undefined' is not assignable to type'boolean | undefined'.
Type 'SignalLike<boolean>' is not assignable to type'boolean | undefined'.
671 export interface HTMLAttributes<RefType extends EventTarget = EventTarget>~~~~~~~~~~~~~~
Found 1 error in node_modules/preact/src/jsx.d.ts:671
Upon investigation, the error was caused by RoutableProps which is documented here in preact-router when skipLibCheck: true in tsconfig.json.
Describe the bug
Encountering the following TypeScript error with the latest Preact 10.11.1 that supports
SignalLike<T>
type:Upon investigation, the error was caused by RoutableProps which is documented here in
preact-router
whenskipLibCheck: true
intsconfig.json
.To Reproduce
Pre-requisites:
[email protected]
,[email protected]
[email protected]
Steps to reproduce the behavior:
npm create vite@latest my-vue-app -- --template preact-ts
npm i [email protected] [email protected]
npm i -D [email protected]
skipLibCheck: false
intsconfig.json
app.tsx
:Expected behavior
RoutableProps which is documented here should be updated to follow the same typing as
HTMLAttributes['default']
which supports Preact signals.Possible solution(s)
RoutableProps['default']
to supportSignalLike
because it is a prop ofRouter
that can possibly accept a signal value:defaultRoute
The text was updated successfully, but these errors were encountered: