IntelliJ IDEA does not find operators of Observable in rxjs5

Viewed 3171

I just installed rxjs 5 beta 3 via npm i rxjs@5.0.0-beta.3.

I have the following example code:

import {Observable} from "rxjs"

new Observable(o => o.next(42)).filter(() => true);

This code compiles perfectly well when using ts-node for example.

But when looking at this code inside IntelliJ IDEA, the filter() operator is not found.

When using operators on an Observable instance, they are not found either.

The suggested static members of Observable are:

  • create()
  • if()
  • throw()

The suggested members of an instance of Observable are:

  • _isScalar()
  • forEach()
  • lift()
  • subscribe()

I also tried to import only what I need, but still my IDE tells me that filter() does not exist on the Observable instance:

import {Observable} from "rxjs/Observable"
import "rxjs/add/operator/filter"

new Observable(o => o.next(42)).filter(() => true);

Any suggestions how to make IntelliJ IDEA know about the operators?

3 Answers
Related