Given code like this:
const pipeMethods: OperatorFunction<any, any>[] = [];
return of(req).pipe(...pipeMethods);
I get an error that says A spread argument must either have a tuple type or be passed to a rest parameter
Doing return of(req).pipe.apply(null, pipeMethods); instead gets me
Argument of type 'OperatorFunction<any, any>[]' is not assignable to parameter of type '[op1: OperatorFunction<AjaxConfig, unknown>, op2: OperatorFunction<unknown, unknown>, op3: OperatorFunction<unknown, unknown>, op4: OperatorFunction<unknown, unknown>, op5: ... 5 more ..., op6: OperatorFunction<...>]'.
When using a ts-ignore all my code functions fine. I'm having trouble understanding the error here.