Search⌘ K

Definition

Explore how TypeScript defines functions, including named and anonymous functions, fat arrow syntax, and function scope. Understand how TypeScript enhances functions with strong type signatures and scope management similar to JavaScript.

Functions and TypeScript #

Functions are at the core of JavaScript. The language is function-scoped. TypeScript doesn’t make any changes in this regard and embraces the use of a class to delimit scope, which is also a feature of ECMAScript 2015.


In this chapter, you will:

  • Review how you can define functions in TypeScript and draw parallels
...