Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

es6 javascript return types

const testFunc = (param: string): Record<string, unknown> => {
  // this should return an object
}

// if its an async function

const testFunc = async (param: string): Promise<your type> => {
  // this should return your type
}
 
PREVIOUS NEXT
Tagged: #javascript #return #types
ADD COMMENT
Topic
Name
3+8 =