This competency area includes data types, Variables Declaration, Variables Scoping, Hoisting and Destructuring, Array and Tuples, Type annotations, Interface and assertions, Functions, classes, and inheritance.
- Data Types - Use multiple data types for variables. One can ask the compiler to ignore the type to take advantage of dynamic types. TS has support for ‘any’ type, primitive data types like number, boolean, string, void, null, undefined, enum.
- Variables Scoping, Hoisting, and Destructuring - Define rules for scopes of defined variables and how they can be used.
- Array and Tuples - Use arrays of either specific or generic types. Use tuples which are arrays in which we can define the data type of each element in the array.
- Type annotations, Interface, and assertions - Use specific types for each variable defined.
- Functions - Use functions for performing a set of actions. Create functions with typed parameters, return type annotations, function overloads, default parameter values, rest parameters. Create named functions and anonymous functions.
- Class - Use of object-oriented class-based approach to creating objects.
- Inheritance - Use of Inheritance to receive the features, interactions, and behaviors of a class by another class.