4 ms·
TypeScript is so powerful at this point I think the only really big thing they're missing is typed exceptions. After that they maybe should just close it for ne
by felixfbecker 6y ago
TypeScript is so powerful at this point I think the only really big thing they're missing is typed exceptions. After that they maybe should just close it for new language features and just optimize performance and add editor features (more automatic refactors) :D
- barry27 6y agothey should add Traits too. and get rid of that woeful mixin rubbish.
- macca321 6y agoBetter to return a union of custom result types. Save exceptions for when stuff goes really wrong.
- emteycz 6y agoIt would be better to improve typing of Promise and try/catch than additional layers, IMHO
- eyelidlessness 6y agoUnfortunately that’s not idiomatic in many common JS/TS scenarios, and requires deep familiarity with the internals of any APIs or third party libraries that throw errors. Optional typed exceptions would be right in line with the TS approach of modeling real world JS usage, but for the syntactical question of exhaustive error handling. (Of course that could be addressed separately or not at all.)