Typescript

  • Typescript is a language that compiles to JavaScript
  • Includes "type information" in your code
  • When it compiles, it checks that your declared types match your code
  • Lets IDEs provide suggestions for your code
function addNumbers(a: number, b: number): number {
    return a + b;
}

addNumbers(1,2) // This is allowed
addNumbers("a", { name: "bob" }) // This does not compile

7 / 10