Author : MD TAREQ HASSAN | Updated : 2020/10/26
What is TypeScript?
- Open-source programming language developed and maintained by Microsoft
- Designed for development of large applications
Benefits of TypeScript
- Static types: variables, parameters, return types etc.
- Organization: class module, namespaces, interfaces
- Tooling: static analysis, instant errors, detect unused/unreachable code etc
Static analysis means that regardless of whether you explicitly define types or not, TypeScript looks through your code, doing its best to guess or infer what type any given object could be.
abc() property is a function.
Declaration files == Type definition files
The repository for high quality TypeScript type definitions.
We can use DefinitelyTyped:
lid.d.ts and lib will be available to our app as if that lib were written in TypeScript
In Visual Studio, drag and drop
<reference path="lib.d.ts"> will be added