Skip to content

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

Merged
vladima merged 2 commits into
masterfrom
liftDtsOnlyRestriction
Oct 12, 2015
Merged

extend the list of extensions for module file names in node_modules f…#4911
vladima merged 2 commits into
masterfrom
liftDtsOnlyRestriction

Conversation

@vladima

@vladima vladima commented Sep 21, 2015

Copy link
Copy Markdown
Contributor

…older

@mhegazy

mhegazy commented Sep 21, 2015

Copy link
Copy Markdown
Contributor

//cc: @sheetalkamat

@mhegazy

mhegazy commented Sep 21, 2015

Copy link
Copy Markdown
Contributor

👍

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
Copy Markdown
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
Copy Markdown

@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

mhegazy commented Oct 13, 2015

Copy link
Copy Markdown
Contributor

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

@basarat

basarat commented Oct 21, 2015

Copy link
Copy Markdown
Contributor

@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