Skip to content

Support es2022 private properties in prefer-takeuntil #11

@Michsior14

Description

@Michsior14

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions