3 ms·
I've been waiting for TypeScript to solve the problem of param destructuring, but surely this is not it? Param destructuring is one of the absolute best featur
by andrewstuart 8y ago
I've been waiting for TypeScript to solve the problem of param destructuring, but surely this is not it?
Param destructuring is one of the absolute best features of ES2015. TypeScript breaks it.
Reading this page I can't actually tell if param destructuring is even being addressed but I can see alot of at first glance weird and obtuse looking code.
Not an obvious up front win.
- wereHamster 8y agoCan you give an example?
- johnny_reilly 8y agoParameter destructuring works. `funcName({ param1, param2 }: { param1: number; param2: string; }) { ... }`
- joshuacc 8y agoWhat problem? TypeScript has supported param destructuring for a while.