Argument of type 'QueueingSubject<{}>' is not assignable to parameter of type 'Observable<any>'
See original GitHub issueWith rxjs-websockets 1.1.0, queueing-subject 0.1.1 & typescript 2.4.2 I have the following code:
import Rx from "rxjs/Rx";
import { QueueingSubject } from "queueing-subject";
import websocketConnect, {Connection} from "rxjs-websockets";
const queuingSubject = new QueueingSubject();
// ...
const connection: Connection = websocketConnect(
myUrl,
queuingSubject,
myWebSocket
);
After upgrading from rxjs 5.4.2 to 5.4.3 I get the following type error in the webSocketConnect call:
error TS2345: Argument of type 'QueueingSubject<{}>' is not assignable to parameter of type 'Observable<any>'.
Property 'source' is protected but type 'Observable<T>' is not a class derived from 'Observable<T>'.
I cleaned the cache (I’m using yarn), deleted node_modules and reinstalled but still get this error…
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Argument of type 'QueueingSubject<{}>' is not assignable to ...
You need to add a type parameter to the queueing subject and ensure you have a single rxjs module in your node_modules (by...
Read more >angular - Type 'Observable<any>' is not assignable to type '[]'
I am pretty new in Angular2/TypeScript so please excuse me if I am doing some stupid mistake. What I am trying to do...
Read more >type 'observable<object>' is not assignable to type
above code gives me Argument of type '(payload: any) => void' is not assignable to parameter of type '(value: any, index: number) =>...
Read more >Typescript Error: Type 'Observable<any[]>' is not assignable to ...
in my app, this value's type is Feed.interface.ts type. But return value from firebase is any. and console error happened. I tried to...
Read more >Argument of type 'string' is not assignable to parameter of type
I'm new to Typescript and trying to do a project with it to get better, but I've been unable to solve this issue...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Great! Thanks James
Relying on npm dependency duplication as I had advised isn’t a good idea at all… in a previous package I was told by someone I was handling dependencies wrong and they misinformed me and I never bothered to verify. I’ve taken the time to understand peer dependencies fully now and can see it is the right choice for this project.
Released version 4.0.0 with the fix, sorry for the confusion!