-
Notifications
You must be signed in to change notification settings - Fork 3k
[v7] TS automatic imports in VSCode default to wrong path #6067
Copy link
Copy link
Closed
Labels
bugConfirmed bugConfirmed bug
Description
Bug Report
Current Behavior
When using operators in VSCode, the suggested import defaults to rxjs/dist/types/operators, failing in runtime.
This wasn't happening in v6, starts happening after upgrading to v7.
Expected behavior
VSCode imports from the correct rxjs/operators path
Reproduction
- create a simple playground
mkdir rxjs-playground
cd rxjs-playground
npm init -y
npm i rxjs@next- open that folder in VSCode
- create a file foo.ts
interval(1000).pipe( // Correctly suggests `import { interval } from 'rxjs'`
map(v => v*2) // Doesn't suggest any valid import, that's fine - it used to do that. Manually import it from `rxjs/operators`
)- create a file bar.ts and type in:
interval(1000).pipe( // Correctly suggests `import { interval } from 'rxjs'`
map(v => v*2) // Wrongly suggests `import { map } from 'rxjs/dist/types/operators'`
)Environment
- RxJS version: 7.0.0-beta.12
- VSCode: 1.53.2
- Node: 12.18.3
- Typescript: 4.1.5
Additional context/Screenshots
Note that after correcting it to rxjs/operators it correctly suggests adding the import from the right place
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed bugConfirmed bug

