TypeScript Basics
This test evaluates your foundational knowledge of TypeScript, covering type annotations, interfaces, basic classes, and compiling to JavaScript. To strengthen your TypeScript basics, explore TypeScript Handbook: 5 Minute Tutorial, practice with TypeScript Tutorials on TutorialsTeacher, and watch this beginner-friendly TypeScript Crash Course on YouTube.
1
What is TypeScript?
2
Which command compiles TypeScript to JavaScript?
3
What is the correct file extension for TypeScript files?
4
Which keyword is used to declare a variable with a fixed type in TypeScript?
5
What is the type of a variable that can be either string or number?
6
How do you define an interface in TypeScript?
7
What is the purpose of the 'any' type?
8
How do you make a property optional in an interface?
9
What is the type of an array of numbers?
10
How do you define a function type in TypeScript?