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

throw Error if file not found #1

Merged
merged 1 commit into from
Feb 5, 2018
Merged

Conversation

jtlapp
Copy link
Contributor

@jtlapp jtlapp commented Feb 3, 2018

No exception was being thrown when a specified .ts file was not found. This PR throws the exception. It includes tests for .ts file not found and tsconfig.json not found.

The Typescript compiler does of course detect that the .ts was not found, and it reports it in diagnostics. I spent more time than I should have trying to figure out how to pull the error out of diagnostics without also pulling out the errors that would be handled in later code.

So I opted to just throw an fs.existsSync(file) in there. Easy peasy, done.

Thanks for this awesome tool. I can't believe that its use isn't mandatory for all typings!

@jtlapp
Copy link
Contributor Author

jtlapp commented Feb 3, 2018

I'm noticing something strange. Your double quoted strings were converted to single quoted strings. I ran the linter, wonder if it did that.

Yeah, had to be the linter. There's also some reformatting.

@aikoven
Copy link
Owner

aikoven commented Feb 5, 2018

Thanks!

I'll make a release shortly.

The reformatting is probably due to Prettier or something alike embedded in your editor.

@aikoven aikoven merged commit 7a6910b into aikoven:master Feb 5, 2018
@aikoven
Copy link
Owner

aikoven commented Feb 5, 2018

Just published typings-tester@0.3.1.

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

Successfully merging this pull request may close these issues.

2 participants