eslint-plugin-rxjs-angular icon indicating copy to clipboard operation
eslint-plugin-rxjs-angular copied to clipboard

Support es2022 private properties in prefer-takeuntil

Open Michsior14 opened this issue 3 years ago • 0 comments

Current behavior

The following code throws error ("Forbids calling subscribe without an accompanying takeUntil") in the current version:

@Component()
class Test {
  #destroyer = new Subject();
  
  public ngOnInit(): void {
    someStream.pipe(takeUntil(this.#destroyer)).subscribe();
  }
}

Expected behavior

The # prefixed variables can be used within takeUntil when prefer-takeuntil rule is enabled.

Michsior14 avatar Jun 24 '22 10:06 Michsior14