Skip to content
Zhuohuan LI edited this page Nov 3, 2016 · 2 revisions

Typescript is JavaScript that scales. It comes from Microsoft and is the most popular language in Google Angular.

Benefits from Typescript

Wechaty is fully typed by TypeScript since v0.5, 12th Oct 2016. And got benefits as the following:

  1. Better async coding style: async/await (now we use co module)
  2. Strong type definition/checking for data structure
  3. Auto-completion/Static syntax check with VSCode IDE
  4. Static variable that can initialize inside class
  5. Public/private setting for methods/member variables
  6. other benefits...

The lastest javascript version is: v0.4.0(2016/10/9)

Reference

  1. The Future of Declaration Files
  2. What's new in TypeScript
  3. Why we decided to move from plain JavaScript to TypeScript for Babylon.js
  4. Migrating from JavaScript

VSCode is highly recommended as developing IDE for Wechaty with TypeScript because we can get the benefit of intelligent code completion, parameter info, and member lists.