There are also some other types of libraries that help with this type of organized structure such as coffee script out there.
Some Typescript Features:
- Works in any browser.
- Works on Any host.
- Works with node.js.
- Works on any operating system.
- Open Source.
- Tool support; can catch errors, and help with many other functions
- Works with IDE's such as sublime and visual studio, Intellisense and syntax checking
- Provides static typing
- Encapsulates through classes and modules
- Support for constructors, properties, and functions
Keywords and operators
- class: contains for properties and functions
- constructor: providies initialization functionality in a class
- exports: export a member from a module
- extends: extend a class
- implements: implement an interface
- imports: import a module
- interface: defines code contract that can be implemented by types
- module / namespace: container for classes and other code
- public / private: member visibility modifiers
- ...: rest parameter, pass a comma separated list of items
- => : arraow syntax used with definitions and functions
- typeName: characters used to cast / convert between types
- ":" : separator between variable / parameter names and types
Modules / Namespace -> will contain Class -> classes can have fields, constructors, properties, functions