Skip to content

Allow relative imports of '.js' files when --noImplicitAny is disabled#18489

Merged
2 commits merged into
masterfrom
allow_js
Sep 19, 2017
Merged

Allow relative imports of '.js' files when --noImplicitAny is disabled#18489
2 commits merged into
masterfrom
allow_js

Conversation

@ghost

@ghost ghost commented Sep 14, 2017

Copy link
Copy Markdown

Fixes #18359

We already allow importing a '.js' file on node_modules; this just extends that rule to anywhere.
This also removes the diagnostic recommending to use --allowJs, since it is now allowed to have a JS file even without --allowJs. The difference is that without --allowJs we won't compile the file.

A potential downside of this change is that people who forget to add --allowJs will notice that none of their JavaScript is being transpiled -- previously we would have specifically told them to set that option.

@mhegazy mhegazy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

baselines for tests are missing

@ghost ghost merged commit 0ae42ea into master Sep 19, 2017
@ghost ghost deleted the allow_js branch September 19, 2017 19:42
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This pull request was closed.
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.

2 participants