This rule prevents the use of the static create
function in Observable
. Developers should use new
and the constructor instead.
Examples of incorrect code for this rule:
const answers = Observable.create(subscriber => {
subscriber.next(42);
subscriber.next(54);
subscriber.complete();
});
Examples of correct code for this rule:
const answers = new Observable<number>(subscriber => {
subscriber.next(42);
subscriber.next(54);
subscriber.complete();
});
This rule has no options.