Need Help with Bulk Refactoring of Deprecated .subscribe() in Angular 18 with RxJS 7.8.1 Hi RxJS Community #7539
yugandher2000
started this conversation in
Ideas / Feature request
Replies: 1 comment
-
Did you try |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm struggling with .subscribe() deprecation warnings across a large Angular 18 project using RxJS 7.8.1. Our codebase has thousands of instances of the old .subscribe() style:
I want to migrate to the new object-style .subscribe():
Manual refactoring isn't practical since it is used in thousands of functions. I've tried a few approaches, but nothing has worked so far:
TS-Morph: I attempted to write a custom script using TS-Morph for automated refactoring, but I faced errors like "Property 'getExpression' does not exist on type 'Node'" and "Unknown file extension '.ts'".
ESLint: I enabled eslint-plugin-rxjs and tried using "rxjs/no-deprecated" to catch these cases, but it didn't detect the .subscribe() deprecations.
Codemods: I searched for codemods or CLI-based tools to handle the refactor, but I didn't find a working solution.
What I'm Looking For:
Environment Details:
Angular 18
RxJS 7.8.1
TypeScript 5.x
Beta Was this translation helpful? Give feedback.
All reactions