| ▲ | Vinnl 5 hours ago | |
So then the user gets a type error in their face instead of the page loading? That doesn't really sound better than the developer getting that error while writing the code, which is what TypeScript currently does. | ||
| ▲ | lelanthran 3 hours ago | parent | next [-] | |
> So then the user gets a type error in their face instead of the page loading? The alternative is not "User sees no error", it's "user sees the error at runtime". In which case, yeah, having the user see the type error is vastly preferable to having the user see a runtime JS error. | ||
| ▲ | zdragnar 5 hours ago | parent | prev [-] | |
Not to mention the penalty of the browser having to re-execute the type checking every time the files aren't loaded from cache. | ||