New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After upgrade to 7.2.0 mapTo(true) violates and shows @typescript-eslint/no-unsafe-argument error #6536
Comments
|
@cartant are we tracking the change for |
So what is the solution here, why is this closed? No matter which signature I'd use, I'll get an ESlint warning, either for deprecation or for unsafe arguments. |
Its clunky, but you can use a type assertion to specify the return type as switchMapTo(this.service.isAlive()) with switchMapTo(this.service.isAlive()) as OperatorFunction<unknown, boolean> |
Does |
Bug Report
We have migrated our codebase from 6.6.6 to 7.2.0 and have a an issue for
mapTo(true)
operator from eslint:Investigating the sources:
Current Behavior
ESLint error is shown, without providing generics for mapTo operator.
Expected behavior
No ESLint errors, without additional generics for mapTo operator.
Reproduction
Environment
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:The text was updated successfully, but these errors were encountered: