Question Bank
3705 approved questions from the community
What command is used to compile TypeScript files into JavaScript?
In TypeScript, what is the difference between an interface and a type alias?
TypeScript interfaces can define index signatures to specify that an object can have any number of properties of a certain type.
What is the purpose of the `tsconfig.json` file?
What does the `readonly` modifier do in TypeScript?
What keyword is used in TypeScript to inherit from a parent class?
What is the purpose of the `super` keyword in TypeScript classes?
Static members in TypeScript classes belong to the class itself rather than to instances of the class.
What is the purpose of parameter properties in TypeScript constructors?
In TypeScript, const enums are completely removed during compilation and replaced with their literal values for better performance.
In TypeScript, you must explicitly call the parent class constructor using `super()` before accessing `this` in a derived class constructor.
Discuss _Abstract classes_ and their purposes in _TypeScript_.
In TypeScript, declaring a variable with `const` prevents any modifications to the variable, including changes to object properties or array elements.
What is the default access modifier for class members in TypeScript?
What are rest parameters in TypeScript functions?
What is the difference between `private` access modifier and the JavaScript `#` private field syntax in TypeScript?
What is the file extension for TypeScript source files?
Which keyword is used to define an abstract method in an abstract class?
What is the purpose of the `implements` keyword in TypeScript?
What does structural typing mean in TypeScript?