Question Bank
3705 approved questions from the community
In TypeScript, the `any` type completely bypasses type checking and should be avoided when possible.
TypeScript interfaces can include both optional properties and readonly properties.
In TypeScript, `let` provides block-level scoping while `var` provides function-level or global scoping.
TypeScript's type inference automatically determines variable types from their values, eliminating the need for explicit type annotations in many cases.
Abstract classes in TypeScript can be instantiated directly.
Function overloading in TypeScript allows you to define multiple function signatures with different parameter types for the same function name.
Every valid JavaScript code is also valid TypeScript code.
TypeScript code can run directly in web browsers without compilation.
What are accessor functions (`get` and `set`) used for in TypeScript?
Which of the following are valid ways to declare arrays in TypeScript? (Select all that apply)
Which of the following are benefits of using TypeScript over JavaScript? (Select all that apply)
What is the purpose of call signatures in TypeScript interfaces?
Which compiler options in `tsconfig.json` help enforce stricter type checking? (Select all that apply)
Which of the following statements about TypeScript enums are correct? (Select all that apply)
Which keyword in TypeScript is used to declare a variable with block-level scope that cannot be reassigned?
What is the return type of a function that doesn't return any value in TypeScript?
What symbol is used to denote an optional parameter in a TypeScript function?
Which access modifier restricts member access to the declaring class and its subclasses in TypeScript?
What is the `never` type used for in TypeScript?
What is a tuple in TypeScript?