ts arrow function generic type code example
Example 1: generic arrow function typescript
const foo = <T extends unknown>(x: T) => x;
Example 2: typescript arrow function
let sum = (x: number, y: number): number => {
return x + y;
}
sum(10, 20); //returns 30