Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong typings configuration in 5.5 #2857

Closed
cyrilletuzi opened this issue Sep 24, 2017 · 6 comments
Closed

Wrong typings configuration in 5.5 #2857

cyrilletuzi opened this issue Sep 24, 2017 · 6 comments

Comments

@cyrilletuzi
Copy link

cyrilletuzi commented Sep 24, 2017

RxJS version:
5.5.0-beta.0

Code to reproduce:
In TypeScript, use any RxJS class (like Observable) or new lettable operators, and use the TypeScript quick fix to auto-import the class or method (in VS Code for example).

Expected behavior:
Should propose :

  • Import Observable from "rxjs/Observable"
  • Import map from "rxjs/operators"

Actual behavior:
In 5.5.0-beta.0, it now proposes :

  • Import Observable from "rxjs/_typings"
  • Import map from "rxjs/_typings/operators"

Additional information:
It was OK before 5.5.

@benlesh
Copy link
Member

benlesh commented Sep 25, 2017

Both of those above require brackets:

Import { Observable } from "rxjs/Observable"
Import { map } from "rxjs/operators"

@kwonoj
Copy link
Member

kwonoj commented Sep 25, 2017

So problem in here is about module resolution path. With named import still, module resolution doesn't look up into actual but one depth to our package.json for typings placed so TS language server resolves path like below:

image

Means user no longer able to use auto fix or similar to resolve correct path to each import. Technically I guess import to /_typings/* wouldn't make differences but also it can be confusing.

@cyrilletuzi
Copy link
Author

@benlesh Yes, the real imports will have the brackets, it's just the TS quick fix message which is patterned that way, not the issue here.

The problem with multiple levels of exports and re-exports was resolved in TS 2.5. There was similar problems with Angular imports, but everything is OK since TS 2.5. It means it's a RxJS problem.

Again, it was working before RxJS 5.5. So it means there was a modification of how the typings are configured, in a non-standard way.

@jasonaden
Copy link
Collaborator

@cyrilletuzi I think we have a fix for this. Hopefully pushing a beta.1 that will correct this issue. Coming shortly.

@benlesh
Copy link
Member

benlesh commented Sep 27, 2017

This should be fixed now in 5.5.0-beta.1 and beta.2

@benlesh benlesh closed this as completed Sep 27, 2017
@lock
Copy link

lock bot commented Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants