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

Provide better error messages in TS compiler #6759

Closed
bartlomieju opened this issue Jul 15, 2020 · 1 comment
Closed

Provide better error messages in TS compiler #6759

bartlomieju opened this issue Jul 15, 2020 · 1 comment
Assignees

Comments

@bartlomieju
Copy link
Member

bartlomieju commented Jul 15, 2020

@bartlomieju it is compiling .js without checkJs on that is the problem. So there is actually nothing to emit, which isn't actually unexpected. Clearly we shouldn't panic, but I am not 100% sure what the right response in this situation is. Maybe a throw in JS land? Something like:

Error: The compilation did not emit anything.  Are you sure your configuration is valid?

Also, maybe we turn checkJs: true by default on the compiler APIs?

@sdhoward in your particular case, you aren't telling the compiler to actually check JavaScript. I suspect if you did set the compiler option to checkJs: true you would get a more meaningful error as a work around for now.

Originally posted by @kitsonk in #6747 (comment)

There are a few asserts in TS compiler that do not have meaningful error messages. We should update each assert with elaborate description suggesting what might be the problem.

@bartlomieju bartlomieju self-assigned this Jul 15, 2020
@bartlomieju
Copy link
Member Author

Not relevant in light of #7225

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

No branches or pull requests

1 participant