Give better error message for using import as type#24979
Closed
rwaskiewicz wants to merge 1 commit into
Closed
Conversation
262580a to
129b168
Compare
mhegazy
reviewed
Jul 3, 2018
| "code": 1339 | ||
| }, | ||
| "Module '{0}' does not refer to a type, but is used as a type here.": { | ||
| "Did you mean \"typeof import('{0}')\"?": { |
Contributor
There was a problem hiding this comment.
We need this to be an elaboration and not a substitue. in other words, the original error message should still be there, and then add a trailing did you mean to use 'typeof import...'
mhegazy
suggested changes
Jul 3, 2018
Contributor
mhegazy
left a comment
There was a problem hiding this comment.
You also need to update the test baselines, that is run the tests (jake runtests-parallel) then accept the baselines (jake baseline-accept).
Author
|
Looks like this was fixed in #25433 - thanks for taking the time to review! 🙂 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #24839
Changes:
Did you mean "typeof import('@my_import')"?in DiagnosticMessagesSeparate commit - found a missing semicolon while figuring out what I was doing wrong from a build perspective (or, VS Code found it - woo!). Kept as a separate commit to be left out/included at reviewers discretionLooks like this was fixed between opening this PR and nowThis is the first PR I have for TS, so if there's anything I can improve on (in this PR or otherwise), please feel free to let me know 🙂