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

Odd behavior on commonjs modules not inside node_modules folders #4849

Closed
weswigham opened this issue Sep 18, 2015 · 1 comment
Closed

Odd behavior on commonjs modules not inside node_modules folders #4849

weswigham opened this issue Sep 18, 2015 · 1 comment
Labels
By Design Deprecated - use "Working as Intended" or "Design Limitation" instead

Comments

@weswigham
Copy link
Member

Consider the package:

  • /mylib
    • package.json
    • index.d.ts
    • /sublib
      • package.json
      • index.d.ts
      • other.d.ts

We correctly find and import the .d.tss in mylib and sublib, but we do not apply the restrictions applied in #4738, despite being within an external package.

Repo with repro: https://github.com/weswigham/ts-4849-repro

@vladima vladima added the By Design Deprecated - use "Working as Intended" or "Design Limitation" instead label Sep 18, 2015
@vladima
Copy link
Contributor

vladima commented Sep 18, 2015

this is by design, currently it is assumed that external module typings is something that is referred by non-relative name is resolved from node_modules folder. Rationale: such modules are not authored by user so user cannot control what is inside. There if of course another aspect of it when external module typings use relative module name to imports something from the same package. this is another bug when we don't propagate import resolution context when loading transitive imports, I think it is currently tracked by #4667

@vladima vladima closed this as completed Sep 18, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
By Design Deprecated - use "Working as Intended" or "Design Limitation" instead
Projects
None yet
Development

No branches or pull requests

2 participants