5 ms·
> [TypeScript] is not very consistent and uses a lot of "special cases" or "special features" to solve specific problems. That's very interesting. Could you pl
by nuerow 5y ago
> [TypeScript] is not very consistent and uses a lot of "special cases" or "special features" to solve specific problems.
That's very interesting. Could you please provide an example that showcases that inconsistency?
- valenterry 5y agoThis very post is a good example. Typescript has destructuring and control-flow analysis/refinement. But as you can see from the issues that are fixed by this PR, these two things haven't worked together very well. This comes from trying to fix 1) compiler errors in conditions where the code is safe but the compiler can't understand that and 2) destructuring products/co-products. Even if both features work on their own and help in certain cases, combining them leads to undesired results.
- bryanrasmussen 5y ago>as you can see from the issues that are fixed by this PR, should there be a link to a PR in there somewhere?
- nextaccountic 5y agoThe PR is the article submitted in this thread, https://github.com/microsoft/TypeScript/pull/46266 https://github.com/microsoft/TypeScript/pull/46266
- bryanrasmussen 5y agoah ok, thanks. The phrase 'this PR' confused me.