create arrow function in typescript code example
Example 1: generic arrow function typescript
const foo = <T extends unknown>(x: T) => x;
Example 2: arrow function in ts
// ES6: With arrow function
var getResult = (username: string, points: number): string => {
return `${ username } scored ${ points } points!`;
};
getResult('joyous jackal' , 100);