3 ms·
That's a pattern I use in a lot of Typescript, it's pretty useful!
by mxz3000 6y ago
That's a pattern I use in a lot of Typescript, it's pretty useful!
- genuine_smiles 6y agoWe’ve got to write argument names twice when we do it in typescript though: function foo({ bar }: { bar: string }) { Still a great pattern, but I’d probably use it a lot more if I only had to write the variable names once.