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

Consider changing the default value of TSIMP_DIAG to error #16

Open
ItsHarper opened this issue Apr 25, 2024 · 2 comments
Open

Consider changing the default value of TSIMP_DIAG to error #16

ItsHarper opened this issue Apr 25, 2024 · 2 comments

Comments

@ItsHarper
Copy link

ItsHarper commented Apr 25, 2024

As is evidenced by the original version of this issue, I was very surprised to learn that by default, tsimp will run the script even if there are compilation errors. I think this is a poor default that should be reconsidered.

Original title and description

simp runs the script even when there is a compilation error

Here's what the output looks like:

> node --import=tsimp/import src/scripts/validate-json.ts

src/scripts/validate-json.ts:56:24 - error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.

56 console.log(parseFloat(3));
                          ~

<Regular program output>
@ItsHarper ItsHarper changed the title tsimp continued execution even though there was a compilation error tsimp ran the script even though there was a compilation error Apr 25, 2024
@ItsHarper ItsHarper changed the title tsimp ran the script even though there was a compilation error tsimp runs the script even when there is a compilation error Apr 25, 2024
@gspetrou
Copy link

Ctrl+F the README for TSIMP_DIAG

@ItsHarper ItsHarper changed the title tsimp runs the script even when there is a compilation error Consider changing the default value of TSIMP_DIAG to errort May 22, 2024
@ItsHarper
Copy link
Author

Thanks! I've reworked the issue title and description to be a suggestion for changing the default value.

@ItsHarper ItsHarper changed the title Consider changing the default value of TSIMP_DIAG to errort Consider changing the default value of TSIMP_DIAG to error May 22, 2024
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

2 participants