tapjs / tsimp

https://tapjs.github.io/tsimp/
Other
494 stars 11 forks source link

Consider changing the default value of `TSIMP_DIAG` to `error` #16

Open NoahAndrews opened 4 months ago

NoahAndrews commented 4 months ago

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>
gspetrou commented 4 months ago

Ctrl+F the README for TSIMP_DIAG

NoahAndrews commented 3 months ago

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