xripcsu / rxjs-watcher

270 stars 11 forks source link

type issue with rxjs 7 #11

Open mhamri opened 2 years ago

mhamri commented 2 years ago

hi, this is a very great extension to debug big apps, wanted to have a post about it in my blog but noticed that the sample shows some error with latest rxjs

I'm getting this error:

Argument of type 'OperatorFunction<number, number>' is not assignable to parameter of type 'OperatorFunction<number, unknown>'.
  Types of parameters 'source' and 'source' are incompatible.
    Type 'Observable<number>' is missing the following properties from type 'Observable<number>': _isScalar, _trySubscribe, _subscribets(2345)

image

I can pass the bug with to casting the function to any, but that's not a nice solution. look like the operatorFunction has only one generic type in the rxjs

this is my rxjs version "rxjs": "7.5.5",

xripcsu commented 2 years ago

Hi, I published new version to npm, run 'npm install rxjs-watcher@latest' and it should work

Ragers commented 2 years ago

Hi this seem to still be an issue, I am using current latest version 1.2.1 of rxjs-watcher with rxjs version 7.4.0.


  Types of parameters 'source' and 'source' are incompatible.
    Type 'import("node_modules/rxjs/dist/types/internal/Observable").Observable<number>' is not assignable to type 'import("node_modules/rxjs-watcher/node_modules/rxjs/dist/types/internal/Observable").Observable<number>'.
      The types of 'source.operator.call' are incompatible between these types.
        Type '(subscriber: import("node_modules/rxjs/dist/types/internal/Subscriber").Subscriber<any>, source: any) => import("node_modules/rxjs/dist/types/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("node_modules/rxjs-watcher/node_modules/rxjs/dist/types/internal/Subscriber").Subscriber<any>, source: any) => import("node_modules/rxjs-watcher/node_m...'.
          Types of parameters 'subscriber' and 'subscriber' are incompatible.
            Property '_teardowns' is missing in type 'import("node_modules/rxjs-watcher/node_modules/rxjs/dist/types/internal/Subscriber").Subscriber<any>' but required in type 'import("node_modules/rxjs/dist/types/internal/Subscriber").Subscriber<any>'.ts(2345)
Subscription.d.ts(27, 13): '_teardowns' is declared here.
xripcsu commented 2 years ago

Hi, version 1.2.1 supports rxjs version 7.5.5, error will disappear when you set up skipLibCheck to true in tsconfig or you will update your rxjs to version 7.5.5

Ragers commented 1 year ago

this is still not solved. using rxjs 7.8.0 and rxjs-watcher 1.2.1

xripcsu commented 1 year ago

I uploaded new version to npm which should be compatible with rxjs 7.8.0