Ari Bandong, javascripttypescript
Back

The Strong & Silent TypeScript

Photo

Last week, Microsoft introduced a proposal for types syntax in JavaScript.

This can be distilled down to two ways of thinking:

  1. TypeScript with no build step
  2. JavaScript with types

Types in JavaScript makes sense for a couple of reasons.

  1. Static Typing was the most requested language feature in the State of JS Survey in both 2020 and 2021.

  2. TypeScript is listed as the 4th most-used language in GitHub's State of the Octoverse.

From the Github repository:

ECMAScript proposal: Types as Comments

This proposal aims to enable developers to add type annotations to their JavaScript code, allowing those annotations to be checked by a type checker that is external to JavaScript. At runtime, a JavaScript engine ignores them, treating the types as comments.

© Ari Bandong.