You may also like - React.js Interview Questions
There are mainly two types of data types:
- Built-in: This includes number, string, boolean, void, null and undefined.
- User-defined: It includes enums, classes, interfaces, arrays, and tuple.
- It helps in code structuring
- Typescript is purely object oriented programming.
- It has a concept of namespace defined by a "module".
- Type checking
- Compile time error checking
- Code completion and intelligence
- tsc --init
- extends in tsconfig.json
- type vs interface
- Mapped Types
- Mixin classes
- object vs Object
- Transpiling async/await to ES5/ES3
- String valued enums
- allowJs, checkJs, // @ts-check
Modules are the way to organize code in TypeScript. Modules contains classes and interfaces. It is same like namespace in C#.
Types of Modules:
- Internal Modules
- External Modules
You may also like - Node.js Interview Questions
There are different types of components of TypeScript:
- Language Service
Yes, TypeScript does support function overloading but the implementation is a bit different if we compare it to OO languages.