TypeScript allows you to specify the types of both the input and output values of functions.
Parameter Type Annotations When you declare a function, you can add type annotations after each parameter to declare what types of parameters the function accepts.
Type annotation for multiple parameters
Return Type Annotations You can also add return type annotations. Return type annotations appear after the parameter list: