Closed mpellegrini closed 3 months ago
From a Tuesday Typescript email from Matt Pocock TypeScript Method Shorthand Syntax is Bad
interface Obj { // Method shorthand syntax version1(param: string): void; // Object property syntax version2: (param: string) => void; }
They look very innocuous. But there's a subtle difference between the two. And thanks to a tweet from my friend Andarist, I can now say that method shorthand syntax should be avoided in almost all cases.
From a Tuesday Typescript email from Matt Pocock TypeScript Method Shorthand Syntax is Bad
They look very innocuous. But there's a subtle difference between the two. And thanks to a tweet from my friend Andarist, I can now say that method shorthand syntax should be avoided in almost all cases.