Answers for "how to declare arrow function in typescript"

7

generic arrow function typescript

const foo = <T extends unknown>(x: T) => x;
Posted by: Guest on April-29-2020
5

arrow function in typescript

//prototype 
const/let <FunctionName> = (params: type) :<ReturnType> =>{
  ....
};

const PrintName =  (name: string): string => {
  return console.log("my name is " , name) ;
}
Posted by: Guest on October-13-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language