You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have migrated our codebase from 6.6.6 to 7.2.0 and have a an issue for mapTo(true) operator from eslint:
ESLint: Unsafe argument of type `OperatorFunction<any, boolean>` assigned to a parameter of type `OperatorFunction<DeleteResult, boolean>`.(@typescript-eslint/no-unsafe-argument)
export function mapTo<R>(value: R): OperatorFunction<any, R>;
/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */
export function mapTo<T, R>(value: R): OperatorFunction<T, R>;
Current Behavior
ESLint error is shown, without providing generics for mapTo operator.
Expected behavior
No ESLint errors, without additional generics for mapTo operator.
Reproduction
mapTo(true)
Environment
Runtime: Node v16.1.0
RxJS version: 7.2.0
Possible Solution
Seems like the problem is with any, changing the type to use generics, fixes the issue, and you can use it in your code without specifying them: