News for hackers. Stuff that matters.
Re:Why if TYPE_CHECKING? by tomn on Thursday December 21, 2023 @08:17PM (#38729679)
If you want type checking, run mypy.

If you don't want type checking, don't run mypy.

I don't see what's so difficult. If it was technically possible to run programs that have type errors in other languages, they would have the option to ignore type errors too, because it's convenient.

Typescript also ignores errors (generating js output for you to run) by default, so what's the point if it's not enforced?

Re:Why if TYPE_CHECKING? by bruce343434 on Friday December 22, 2023 @06:31AM (#38733192)
Typescript does not ignore type errors by default. Type error = fail to compile
Re:Why if TYPE_CHECKING? by tomn on Friday December 22, 2023 @07:17AM (#38733425)
Try it, it produces output by default. You have to add a flag/option to change this https://www.typescriptlang.org/tsconfig/#noEmitOnError