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

extend the list of extensions for module file names in node_modules f… #4911

Merged
merged 2 commits into from
Oct 12, 2015

Conversation

vladima
Copy link
Contributor

@vladima vladima commented Sep 21, 2015

…older

@mhegazy
Copy link
Contributor

mhegazy commented Sep 21, 2015

//cc: @sheetalkamat

@mhegazy
Copy link
Contributor

mhegazy commented Sep 21, 2015

👍

vladima added a commit that referenced this pull request Oct 12, 2015
extend the list of extensions for module file names in node_modules f…
@vladima vladima merged commit c8ba166 into master Oct 12, 2015
@vladima vladima deleted the liftDtsOnlyRestriction branch October 12, 2015 21:48
@weswigham
Copy link
Member

Errrr, wasn't the reason we had this restriction in the first place because we thought people generally wouldn't want to be inadvertently emitting the TS files we found in their node_modules directory? I understand that in the example in #5225 he wanted, explicitly, to effectively just use his ts files directly for type information, but as it stands right now, if we find a library with both an index.ts and an index.d.ts, we'll find the script file first and (try to) reemit the library on compilation (rather than use any potential existing definitions).

@s-panferov
Copy link

@vladima @mhegazy thanks for the fast reaction, this is awesome! The solution is great, but, as @weswigham said, we may want to change the order of extensions here to use a .d.ts first if it is available and than fallback to .ts and .tsx, because it is backwards compatible with previous behaviour.

@mhegazy
Copy link
Contributor

mhegazy commented Oct 13, 2015

@vladima has a validation tool, that package authors should run. @vladima can you share your tool?

@basarat
Copy link
Contributor

basarat commented Oct 21, 2015

@s-panferov just for your info, a .ts file linked from typings will error out till #5278 is resolved 🌹

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants