Which of the following declares a function type in TypeScript?

TypeScript Associate Easy

TypeScript Associate — Easy

Which of the following declares a function type in TypeScript?

Key points

  • Arrow function syntax is used to declare function types in TypeScript.
  • The format (x: number) => number specifies the input parameter type and return type.
  • Option A uses the function keyword, which is not the correct syntax for declaring function types in TypeScript.

Ready to go further?

Related questions