This tag is for questions specific to developing for SharePoint with TypeScript. It is not used for general JavaScript questions. TypeScript is a statically typed superset of JavaScript created by Microsoft that adds optional types, classes, interfaces, enums, generics, async/await, and many other features, and compiles to plain JavaScript.

TypeScript is a typed superset of that compiles to plain JavaScript. It adds optional types, classes, interfaces, and modules to JavaScript. It was developed by Microsoft and is open source.

  • TypeScript offers classes, modules, and interfaces to help developers build robust components.
  • TypeScript types let developers define interfaces between software components and to gain insight into the behavior of existing JavaScript libraries.
  • TypeScript starts from the syntax and semantics that millions of JavaScript developers know today.
  • With TypeScript, developers can use existing JavaScript code, incorporate popular JavaScript libraries, and be called from other JavaScript code.
  • TypeScript compiles to JavaScript code which runs on any browser, in , or in any other ES3-compatible environment.
  • TypeScript as a language extension adds (amongst others) the following features:
    • Type annotations and compile-time type checking
    • Namespaces
    • Interfaces
    • Enums (to define a set of named constants)
    • Generics (classes, types, and functions that can work over a variety of types)
    • Await (suspends the execution until an asynchronous function return promise is fulfilled)
    • Abbreviated "arrow" syntax for anonymous functions
    • Optional parameters and default parameters