1
votes

I started a new AngularCLI project in Visual Studio Code. I'm using rxjs Observables, however, Observable is missing a lot of definitions compared to another AngularCLI project. Both projects are using rxjs version 5.4.2. My new AngularCLI project shows only 3 definitions for Observable and is finding those definitions in node_module\rxjs\add\operator. However, my other AngularCLI project lists 127 definitions for Observable but finds them in node_module\rxjs\add\observable as well as node_module\rxjs\add\operator.

Here's an image of project with 3 definitions sourced from node_module\rxjs\add\operator:

enter image description here

Here's an image of project with 127 definitions sourced from node_module\rxjs\add\observable and node_module\rxjs\add\operator:

enter image description here

I've verified that node_module\rxjs\add\observable and node_module\rxjs\add\operator folders are the exact same in each project.

Why is one project pulling definitions from multiple locations? How do I get my project to find all of the definitions for an Observable?

Thanks for your help.

1

1 Answers

1
votes

It's very possible that in your larger project that you have imported the entire rxjs library by doing something like

import { Observable } from 'rxjs/Rx';

When it should be

import { Observable } from 'rxjs/Observable';

Without seeing all your usages of rxjs, this is my best guess.