TypeScript Senior
What is transpilation?
Select the correct answer
Transpilation is the process of converting TypeScript code to JavaScript code.
Transpilation is the process of minifying JavaScript code.
Transpilation is the process of bundling multiple JavaScript files into one.
Transpilation is the process of debugging TypeScript code.
What is a generic type in TypeScript?
Select the correct answer
A generic type in TypeScript is a type that can only be a string or number.
A generic type in TypeScript is used for error handling.
A generic type in TypeScript is used to define specific types of variables.
A generic type in TypeScript allows a type to be a parameter when defining classes, interfaces, and functions.
What are triple-slash directives?
Select the correct answer
Triple-slash directives in TypeScript are comments for declaring global variables.
Triple-slash directives in TypeScript are comments that contain a single XML tag used to provide additional information to the compiler.
Triple-slash directives in TypeScript are used to handle errors.
Triple-slash directives in TypeScript are used for defining types.
What is an abstract class in TypeScript, and how is it different from a regular class?
Select the correct answer
An abstract class in TypeScript is used for defining interfaces.
An abstract class in TypeScript is a class that has only static methods.
An abstract class in TypeScript is a class that cannot extend other classes.
An abstract class in TypeScript is a class that cannot be instantiated and is meant to be subclassed.
Explain "module resolution" in TypeScript.
Select the correct answer
Module resolution in TypeScript is the process of managing state.
Module resolution in TypeScript is the process the compiler uses to find the actual location of modules.
Module resolution in TypeScript is the process of defining module types.
Module resolution in TypeScript is the process of handling async operations.
Explain the symbol type in TypeScript.
Select the correct answer
The symbol type in TypeScript is a data type for storing numbers.
The symbol type in TypeScript is used for defining arrays.
The symbol type in TypeScript is used for string manipulation.
The symbol type in TypeScript is a primitive data type that represents a unique identifier.
What is the difference between extends and implements in TypeScript?
Select the correct answer
The extends keyword in TypeScript is used for creating arrays, whereas implements is used for object creation.
The extends keyword in TypeScript is used for variable declaration, whereas implements is used for function declarations.
The extends keyword in TypeScript is used for function overloading, whereas implements is used for type assertions.
The extends keyword in TypeScript is used for class inheritance, whereas implements is used to implement interfaces.
What are namespaces in TypeScript?
Select the correct answer
Namespaces in TypeScript are used to organize code into logical groups and prevent name collisions.
Namespaces in TypeScript are used for error handling.
Namespaces in TypeScript are used to create modules.
Namespaces in TypeScript are used to define new types.
Name the two primary types of modules in TypeScript?
Select the correct answer
The two primary types of modules in TypeScript are class modules and function modules.
The two primary types of modules in TypeScript are synchronous modules and asynchronous modules.
The two primary types of modules in TypeScript are global modules and local modules.
The two primary types of modules in TypeScript are ES6 modules and CommonJS modules.
Explain modules in TypeScript.
Select the correct answer
Modules in TypeScript are used to define types.
Modules in TypeScript are used for error handling.
Modules in TypeScript are a way to declare variables.
Modules in TypeScript are used to organize code into reusable pieces.