Question Bank

3705 approved questions from the community

What command is used to compile TypeScript files into JavaScript?

EASY
SINGLE CHOICE
25s
TypeScript
by Mohamed

In TypeScript, what is the difference between an interface and a type alias?

HARD
SINGLE CHOICE
40s
TypeScript
by Mohamed

TypeScript interfaces can define index signatures to specify that an object can have any number of properties of a certain type.

MEDIUM
TRUE FALSE
30s
TypeScript
by Mohamed

What is the purpose of the `tsconfig.json` file?

MEDIUM
SINGLE CHOICE
30s
TypeScript
by Mohamed

What does the `readonly` modifier do in TypeScript?

MEDIUM
SINGLE CHOICE
30s
TypeScript
by Mohamed

What keyword is used in TypeScript to inherit from a parent class?

EASY
SINGLE CHOICE
25s
TypeScript
by Mohamed

What is the purpose of the `super` keyword in TypeScript classes?

MEDIUM
SINGLE CHOICE
30s
TypeScript
by Mohamed

Static members in TypeScript classes belong to the class itself rather than to instances of the class.

EASY
TRUE FALSE
25s
TypeScript
by Mohamed

What is the purpose of parameter properties in TypeScript constructors?

HARD
SINGLE CHOICE
35s
TypeScript
by Mohamed

In TypeScript, const enums are completely removed during compilation and replaced with their literal values for better performance.

HARD
TRUE FALSE
35s
TypeScript
by Mohamed

In TypeScript, you must explicitly call the parent class constructor using `super()` before accessing `this` in a derived class constructor.

MEDIUM
TRUE FALSE
30s
TypeScript
by Mohamed

Discuss _Abstract classes_ and their purposes in _TypeScript_.

MEDIUM
SINGLE CHOICE
30s
TypeScript
by Mohamed

In TypeScript, declaring a variable with `const` prevents any modifications to the variable, including changes to object properties or array elements.

MEDIUM
TRUE FALSE
30s
TypeScript
by Mohamed

What is the default access modifier for class members in TypeScript?

EASY
SINGLE CHOICE
25s
TypeScript
by Mohamed

What are rest parameters in TypeScript functions?

MEDIUM
SINGLE CHOICE
30s
TypeScript
by Mohamed

What is the difference between `private` access modifier and the JavaScript `#` private field syntax in TypeScript?

HARD
SINGLE CHOICE
40s
TypeScript
by Mohamed

What is the file extension for TypeScript source files?

EASY
SINGLE CHOICE
20s
TypeScript
by Mohamed

Which keyword is used to define an abstract method in an abstract class?

MEDIUM
SINGLE CHOICE
30s
TypeScript
by Mohamed

What is the purpose of the `implements` keyword in TypeScript?

HARD
SINGLE CHOICE
35s
TypeScript
by Mohamed

What does structural typing mean in TypeScript?

MEDIUM
SINGLE CHOICE
35s
TypeScript
by Mohamed
PreviousPage 111 of 186Next