FullStackFSCCafé
 
 
Sign in with GoogleSign in with Google. Opens in new tab
Kill Your Tech Interview
3877 Full-Stack, Algorithms & System Design Interview Questions
Answered To Get Your Next Six-Figure Job Offer
      
🤖 Having Machine Learning & DS Interview? Check  MLStack.Cafe - 1704 Data Science & ML Interview Questions & Answers!Having ML & DS Interview? Check 🤖 MLStack.Cafe - 1704 ML & DS Interview Questions and Answers

Top 91 TypeScript Interview Questions

Entry Junior Mid Senior Expert
Sign in with GoogleSign in with Google. Opens in new tab
Topic Progress:

Theoretical Questions

Q1:   

What is the difference between .ts and .tsx extensions in TypeScript?

  
Add to PDF   Entry 
Q2:   

List the built-in types in Typescript

  
Add to PDF   Entry 
Q3:   

How to call base class constructor from child class in TypeScript?

  
Add to PDF   Entry 
Q4:   

Do we need to compile TypeScript files and why?

  
Add to PDF   Entry 
Q5:   

What is TypeScript and why do we need it?

  
Add to PDF   Entry 
Q6:   

 What is TypeScript and why one should use it?

  
Add to PDF   Entry 
Q7:   

How to perform string interpolation in TypeScript?

  
Add to PDF   Entry 
Q8:   

What are Modules in Typescript?

  
Add to PDF   Entry 
Q9:   

What is TypeScript and why would I use it in place of JavaScript?

  
Add to PDF   Entry 
Q10:   

Explain generics in TypeScript

  
Add to PDF   Entry 
Q11:   

What are the benefits of TypeScript?

  
Add to PDF   Entry 
Q12:   

What is the difference between types String and string in TypeScript?

  
Add to PDF   Junior 
Q13:   

What is Type Erasure in TypeScript?

  
Add to PDF   Junior 
Q14:   

How could you check null and undefined in TypeScript?

  
Add to PDF   Junior 
Q15:   

Which access modifiers are implied when not specified?

  
Add to PDF   Junior 
Q16:   

Which object oriented terms are supported by TypeScript?

  
Add to PDF   Junior 
Q17:   

What are the difference beetween Typescript and JavaScript?

  
Add to PDF   Junior 
Q18:   

What is a TypeScript Map file?

  
Add to PDF   Junior 
Q19:   

Could we use TypeScript on backend and how?

  
Add to PDF   Junior 
Q20:   

What are assertion functions?

  
Add to PDF   Junior 
Q21:   

What is the purpose of Nullish Coalescing operator?

  
Add to PDF   Junior 
Q22:   

How do we create an enum with string values?

  
Add to PDF   Junior 
Q23:   

What does the pipe, | mean in TypeScript?

  
Add to PDF   Junior 
Q24:   

What is Optional Chaining in TypeScript?

  
Add to PDF   Junior 
Q25:   

Describe what are conditional types in TypeScript?

  
Add to PDF   Junior 
Q26:   

How to make Arrays that can only be read, TypeScript?

  
Add to PDF   Junior 
Q27:   

How can we use optional chaining in TypeScript?

  
Add to PDF   Junior 
Q28:   

What is Decorators in TypeScript?

  
Add to PDF   Junior 
Q29:   

When to use interfaces and when to use classes in TypeScript?

  
Add to PDF   Junior 
Q30:   

What is Interface in TypeScript?

  
Add to PDF   Junior 
Q31:   

How to implement class constants in TypeScript?

  
Add to PDF   Junior 
Q32:   

Does TypeScript support all object oriented principles?

  
Add to PDF   Junior 
Q33:   

What is getters/setters in TypeScript?

  
Add to PDF   Junior 
Q34:   

What is the difference between Classes and Interfaces in Typescript?

  
Add to PDF   Junior 
Q35:   

How to choose between never, unknown, and any in TypeScript?

  
 Add to PDF   Mid 
Q36:   

What are the use cases for a const assertion?

  
 Add to PDF   Mid 
Q37:   

What is Typings in Typescript?

  
 Add to PDF   Mid 
Q38:   

Explain Project References and its benefits

  
 Add to PDF   Mid 
Q39:   

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

  
 Add to PDF   Mid 
Q40:   

Explain how and why we could use property decorators in TS?

  
 Add to PDF   Mid 
Q41:   

How to make a readonly tuple type in TypeScript?

  
 Add to PDF   Mid 
Q42:   

What is the unique symbol is used for?

  
 Add to PDF   Mid 
Q43:   

What is the fundamental difference between Optional Chaining (?.) and Non-null assertion operator (!) in TypeScript?

  
 Add to PDF   Mid 
Q44:   

What does Short-Circuiting mean in TypeScript?

  
 Add to PDF   Mid 
Q45:   

List a few rules of private fields in TypeScript

  
 Add to PDF   Mid 
Q46:   

What are some use cases of template literal types in TypeScript?

  
 Add to PDF   Mid 
Q47:   

How to check the type of a variable or constant in TypeScript?

  
 Add to PDF   Mid 
Q48:   

How to add types to an interface from another interface or extend types in TypeScript?

  
 Add to PDF   Mid 
Q49:   

What is the difference between type and interface in TypeScript?

  
 Add to PDF   Mid 
Q50:   

What is the difference between enum and const enums?

  
 Add to PDF   Mid 
Q51:   

Does TypeScript supports function overloading?

  
 Add to PDF   Mid 
Q52:   

What are different components of TypeScript?

  
 Add to PDF   Mid 
Q53:   

How can you allow classes defined in a module to be accessible outside of the module?

  
 Add to PDF   Mid 
Q54:   

What is the difference between Private and Protected variables in TypeScript?

  
 Add to PDF   Mid 
Q55:   

Why do we need to use abstract keyword for classes and their methods in TypeScript?

  
 Add to PDF   Mid 
Q56:   

What is Structural Typing?

  
 Add to PDF   Mid 
Q57:   

How TypeScript is optionally statically typed language?

  
 Add to PDF   Mid 
Q58:   

What is Mixin Class in TypeScript?

  
 Add to PDF   Mid 
Q59:   

How to use external plain JavaScript libraries in TypeScript?

  
 Add to PDF   Mid 
Q60:   

How does override keyword works in TypeScript?

  
 Add to PDF   Senior 
Q61:   

Explain what is never datatype in TypeScript?

  
 Add to PDF   Senior 
Q62:   

Explain what is Currying in TypeScript?

  
 Add to PDF   Senior 
Q63:   

How to define a TypeScript class which has an index signature?

  
 Add to PDF   Senior 
Q64:   

Why we need Index Signature in TypeScript?

  
 Add to PDF   Senior 
Q65:   

What is Mixin Constructor Type?

  
 Add to PDF   Senior 
Q66:   

What is dynamic import expression?

  
 Add to PDF   Senior 
Q67:   

What is the difference between unknown and any type?

  
 Add to PDF   Senior 
Q68:   

How to exclude property from type in TypeScript?

  
 Add to PDF   Senior 
Q69:   

Why is the infer keyword needed in TypeScript?

  
 Add to PDF   Senior 
Q70:   

What is the difference between interface vs type statements?

  
 Add to PDF   Senior 
Q71:   

Explain the difference between declare enum vs declare const enum

  
 Add to PDF   Expert 
Q72:   

What is the need of --incremental flag in TypeScript?

  
 Add to PDF   Expert 
Q73:   

Explain when to use declare keyword in TypeScript

  
 Add to PDF   Expert 
Q74:   

What does the tsconfig option lib do?

  
 Add to PDF   Expert 
Q75:   

How to make a union type from a type alias or interface properties in TypeScript?

  
 Add to PDF   Expert 
Q76:   

Is it possible to generate TypeScript declaration files from JS library?

  
 Add to PDF   Expert 
Q77:   

What is the benefit of import assertions features in TypeScript?

  
 Add to PDF   Expert 
Q78:   

What are Ambients in TypeScripts and when to use them?

  
 Add to PDF   Expert 
Q79:   

What are the differences between the private keyword and private fields in TypeScript?

  
 Add to PDF   Expert 
Q80:   

What is one thing you would change about TypeScript?

  
 Add to PDF   Expert 
Q81:   

How the never datatype can be useful?

  
 Add to PDF   Expert 

Code Challenges

Q1:   

Is that TypeScript code valid? Explain why

  
  Add to PDF   Mid 
Q2:   

How to make an array with a specific length or array elements in TypeScript?

  
  Add to PDF   Mid 
Q3:   

Is there a way to check for both null and undefined in TypeScript?

  
  Add to PDF   Mid 
Q4:   

Are strongly-typed functions as parameters possible in TypeScript?

  
  Add to PDF   Mid 
Q5:   

What's wrong with that code?

  
  Add to PDF   Mid 
Q6:   

What will be result of this code execution?

  
  Add to PDF   Mid 
Q7:   

How would you overload a class constructor in TypeScript?

  
  Add to PDF   Senior 
Q8:   

In a?.b.c, if a.b is null, then a.b.c will evaluate to undefined, right?

  
  Add to PDF   Senior 
Q9:   

Explain why that code is marked as WRONG?

  
  Add to PDF   Senior 
Q10:   

What does the const assertion mean in TypeScript?

  
  Add to PDF   Senior 
 

Rust has been Stack Overflow’s most loved language for four years in a row and emerged as a compelling language choice for both backend and system developers, offering a unique combination of memory safety, performance, concurrency without Data races...

Clean Architecture provides a clear and modular structure for building software systems, separating business rules from implementation details. It promotes maintainability by allowing for easier updates and changes to specific components without affe...

Azure Service Bus is a crucial component for Azure cloud developers as it provides reliable and scalable messaging capabilities. It enables decoupled communication between different components of a distributed system, promoting flexibility and resili...

Cosmos DB has gained popularity among developers and organizations across various industries, including finance, e-commerce, gaming, IoT, and more. Follow along and learn the 24 most common and advanced Azure Cosmos DB interview questions and answers...
More than any other NoSQL database, and dramatically more than any relational database, MongoDB's document-oriented data model makes it exceptionally easy to add or change fields, among other things. It unlocks Iteration on the project. Iteration f...
Unit Tests and Test Driven Development (TDD) help you really understand the design of the code you are working on. Instead of writing code to do something, you are starting by outlining all the conditions you are subjecting the code to and what outpu...
Domain-Driven Design is nothing magical but it is crucial to understand the importance of Ubiquitous Language, Domain Modeling, Context Mapping, extracting the Bounded Contexts correctly, designing efficient Aggregates and etc. before your next DDD p...
At its core, Microsoft Azure is a public cloud computing platform - with solutions including Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS) that can be used for services such as analytics, virtual c...
As an asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications. Follow along to refresh your knowledge and explore the 52 most frequently asked and advanced Node JS Interview Questions and Answers every...
Dependency Injection is most useful when you're aiming for code reuse, versatility and robustness to changes in your problem domain. DI is also useful for decoupling your system. DI also allows easier unit testing without having to hit a database and...