async arrow function typescript code example
Example 1: async arrow function
const foo = async () => {
// do something
}
Example 2: arrow function in typescript
//prototype
const/let <FunctionName> = (params: type) :<ReturnType> =>{
....
};
const PrintName = (name: string): string => {
return console.log("my name is " , name) ;
}
Example 3: async await arrow function
YourAsyncFunctionName = async (value) => {
/* Code goes here */
}