hosseinmd / react-signalr

MIT License
43 stars 14 forks source link

Error with @microsoft/signalr 7.0.10 #28

Closed fdcastel closed 1 year ago

fdcastel commented 1 year ago

When using @microsoft/signalr 7.0.10 I'm getting this error on build.

error TS2322: Type 'signalR.HubConnection | null' is not assignable to type 'import("C:/TestProject/node_modules/@microsoft/signalr/dist/esm/HubConnection").HubConnection | null'.
  Type 'signalR.HubConnection' is not assignable to type 'import("C:/TestProject/node_modules/@microsoft/signalr/dist/esm/HubConnection").HubConnection'.
    Types have separate declarations of a private property '_cachedPingMessage'.

Reverting to @microsoft/signalr 6.0.21 the problem doesn't occur.

hosseinmd commented 1 year ago

Is it just a type check? Did you test this package by @microsoft/signalr 7.0.10 ?

i think if you want to work with new version we should update react-signalr

fdcastel commented 1 year ago

Is it just a type check?

To the best of my understanding, yes.

Did you test this package by @microsoft/signalr 7.0.10 ?

Exactly.

It's the latest version installed when you do not specify any constraints (npm i @microsoft/signalr)

New users of react-signalr (like me 😉) will have the same problem.

hosseinmd commented 1 year ago

fixed: v0.2.18