-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
unify file extension resolution logic #3032
Conversation
|
||
const extensitionsToRemove = [".d.ts", ".ts", ".js"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extensionsToRemove
@@ -1974,7 +1974,7 @@ | |||
"category": "Error", | |||
"code": 6053 | |||
}, | |||
"File '{0}' must have extension '.ts' or '.d.ts'.": { | |||
"File '{0}' has unsupported extension. The only supported extensions are {1}.": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an unsupported extension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did that,, then felt too hard to read; this is still grammatically correct and gives the same meaning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OR, keep it the same and make it
"File '{0}' has unsupported extension '{1}'. The only supported extensions are {2}."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather switch back to the old message then, at least it had the "or".. :D
Ping 🔔 @CyrusNajmabadi , @DanielRosenwasser and @vladima any more comments? |
👍 LGTM |
unify file extension resolution logic
We explicitly list ".ts" and ".d.ts" files every time we resolve files or modules. This change puts the two extensions in a list of supported extensions, and uses it everywhere. This allows for easy addition to supported extensions, e.g. the work @CyrusNajmabadi and @fdecampredon are doing.