- TypeScript ensures type safety
Interview Question: How do we define integers or floats in typescript?
Hint We don't need to define, integers and float everything is just number It is redundent to write the type when declaring a number, because typescript is smart enough to detect it and automatically asings the type as number
- It is redundent to write the type when declaring a number, because typescript is smart enough to detecht it and automatically asinged the type as number
What is the best practice of type any? video
A better way to write function
Related to topic: What is void? Void a brief description
The never type represents values which are never observed. In a return type, this means that the function throws an exception or terminates execution of the program.