What is TypeScript?
Why Interviewers Ask This
Interviewers use this question to quickly assess whether a candidate has the foundational knowledge required for TypeScript development. It reveals whether you understand the building blocks that more complex concepts rely on.
Answer
TypeScript is a strongly typed, compiled superset of JavaScript developed and maintained by Microsoft. It adds optional static typing, interfaces, generics, enums, and other features on top of JavaScript. TypeScript code is compiled (transpiled) to plain JavaScript that runs in any browser or Node.js environment. The key benefit is catching type errors at compile time rather than at runtime — this dramatically reduces bugs in large codebases. TypeScript is fully compatible with existing JavaScript: any valid JavaScript file is also a valid TypeScript file. It was released in 2012 and has become the industry standard for large-scale JavaScript applications, with frameworks like Angular, NestJS, and many React projects adopting it by default.
Pro Tip
Demonstrate both theoretical understanding and practical experience. Say what it is, then give an example of how you actually used it in a TypeScript codebase.