Function Signatures and the void Keyword

Learn how to use type annotations in TypeScript to strongly type function signatures.

Function signatures in TypeScript

One of the best features of using type annotations in TypeScript is that they can also be used to strongly type function signatures.

To explore this feature a little further, let’s write a JavaScript function to perform a calculation as follows:

Get hands-on with 1400+ tech skills courses.