imp(core): use.operator type inference
MODIFY
packages/core/src/operators/use/use.operator.ts
packages/core/src/operators/use/use.operator.ts
@@ -3,9 +3,9 @@ import { switchMap } from 'rxjs/operators';
import { Middleware } from '../../effects/effects.interface';
import { HttpRequest, HttpResponse } from '../../http.interface';
-export const use = <T extends HttpRequest>
- (middleware: Middleware<HttpRequest, T>, res?: HttpResponse) =>
- (source$: Observable<HttpRequest>): Observable<T> =>
+export const use = <I extends HttpRequest, O extends HttpRequest>
+ (middleware: Middleware<I, O>, res?: HttpResponse) =>
+ (source$: Observable<I>): Observable<O> =>
source$.pipe(
switchMap(req => middleware(of(req), res!, {}))
);

imp(core): use.operator type inference