Answers for "why can't define generic function in tsx file"

0

why can't define generic function in tsx file

const f = <T1, _>(arg1: T1) => {
   return { arg1 };
};

// or just adding a comma
const g = <T1,>(arg1: T1) => {
   return { arg1 };
};
Posted by: Guest on April-13-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language