TypeScript | Type Annotation and Inference in TypeScript | Question6

Last Updated :
Discuss
Comments

What will be the inferred return type of this function?

TypeScript
function greet() {
  return "Hello, TypeScript!";
}


void

any

string

unknown

Share your thoughts in the comments