question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rxjs-all-subjects-private addition

See original GitHub issue

Wrote a rule rxjs-all-subjects-private to enforce that the access level modifier of subjects which are class properties to be private, based off the rxjs-finnish rule.

e.g.

class Mock {
  public propertySubject$ = new Rx.Subject<any>();
         ~~~~~~~~~~~~~~~~     [Subject 'propertySubject$' must be private.]
}

Would this be something of interest to integrate?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
cartantcommented, Jan 23, 2019

Sure. If you want to open a PR, that would be great. Please be sure to include some tests, though.

1reaction
cartantcommented, Jan 23, 2019

If you want you could consider renaming the rule (again … sorry) to something like rxjs-no-exposed-subjects?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Subject - RxJS
An RxJS Subject is a special type of Observable that allows values to be multicasted to many Observers. While plain Observables are unicast...
Read more >
On The Subject Of Subjects (in RxJS) | by Ben Lesh - Medium
Subjects in RxJS are often misunderstood. ... The advantage here is that all Subjects then have the same operators and methods available to...
Read more >
RxJs Subjects: A tutorial - Angular Training
This article is going to focus on a specific kind of observable called Subject. Subjects are observables themselves but what sets them apart...
Read more >
Angular rxjs private subject + public observable setup
I'd like the subject to be private so only the service can .next() it. The last caveat is, when something subscribes to the...
Read more >
Subject RxJS — Angular Example - JavaScript in Plain English
A Subject sends data to all subscribed observers. Any previously emitted data is not sent to new observers. You only get the data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found