Interfaces & Types interview questions

18 real Interfaces & Types questions from the TypeScript bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is interface?

Junior
  1. A.interfaces merge across declarations and are object-focused; type aliases don't merge but can express unions and primitives
  2. B.a named contract describing the shape of an object, open to declaration merging
  3. C.a property that can be set when the object is created but not reassigned afterward
  4. D.a property marked with ? that may be absent from the object
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.interface — a property that can be set when the object is created but not reassigned afterward
  2. B.interface — a named contract describing the shape of an object, open to declaration merging
  3. C.interface — a [key: string]: T declaration describing objects with arbitrary keys mapping to a value type
  4. D.interface — interfaces merge across declarations and are object-focused; type aliases don't merge but can express unions and primitives
Reveal the answer + AI explanation — free account

4. What is type alias?

Junior
  1. A.a [key: string]: T declaration describing objects with arbitrary keys mapping to a value type
  2. B.a named contract describing the shape of an object, open to declaration merging
  3. C.a property that can be set when the object is created but not reassigned afterward
  4. D.a name for any type — unions, primitives, tuples — that cannot be reopened or merged
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Junior
  1. A.type alias — a property marked with ? that may be absent from the object
  2. B.type alias — a [key: string]: T declaration describing objects with arbitrary keys mapping to a value type
  3. C.type alias — a named contract describing the shape of an object, open to declaration merging
  4. D.type alias — a name for any type — unions, primitives, tuples — that cannot be reopened or merged
Reveal the answer + AI explanation — free account

7. What is interface vs type alias?

Mid
  1. A.a name for any type — unions, primitives, tuples — that cannot be reopened or merged
  2. B.a named contract describing the shape of an object, open to declaration merging
  3. C.a [key: string]: T declaration describing objects with arbitrary keys mapping to a value type
  4. D.interfaces merge across declarations and are object-focused; type aliases don't merge but can express unions and primitives
Reveal the answer + AI explanation — free account

8. Which term means: "interfaces merge across declarations and are object-focused; type aliases don't merge but can express unions and primitives"?

Mid
  1. A.optional property
  2. B.index signature
  3. C.readonly property
  4. D.interface vs type alias
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.interface vs type alias — a property marked with ? that may be absent from the object
  2. B.interface vs type alias — a named contract describing the shape of an object, open to declaration merging
  3. C.interface vs type alias — interfaces merge across declarations and are object-focused; type aliases don't merge but can express unions and primitives
  4. D.interface vs type alias — a property that can be set when the object is created but not reassigned afterward
Reveal the answer + AI explanation — free account

10. What is optional property?

Junior
  1. A.a property that can be set when the object is created but not reassigned afterward
  2. B.a [key: string]: T declaration describing objects with arbitrary keys mapping to a value type
  3. C.a named contract describing the shape of an object, open to declaration merging
  4. D.a property marked with ? that may be absent from the object
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Junior
  1. A.optional property — a property marked with ? that may be absent from the object
  2. B.optional property — interfaces merge across declarations and are object-focused; type aliases don't merge but can express unions and primitives
  3. C.optional property — a property that can be set when the object is created but not reassigned afterward
  4. D.optional property — a named contract describing the shape of an object, open to declaration merging
Reveal the answer + AI explanation — free account

13. What is readonly property?

Junior
  1. A.a property that can be set when the object is created but not reassigned afterward
  2. B.a named contract describing the shape of an object, open to declaration merging
  3. C.interfaces merge across declarations and are object-focused; type aliases don't merge but can express unions and primitives
  4. D.a property marked with ? that may be absent from the object
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Junior
  1. A.readonly property — interfaces merge across declarations and are object-focused; type aliases don't merge but can express unions and primitives
  2. B.readonly property — a property that can be set when the object is created but not reassigned afterward
  3. C.readonly property — a [key: string]: T declaration describing objects with arbitrary keys mapping to a value type
  4. D.readonly property — a name for any type — unions, primitives, tuples — that cannot be reopened or merged
Reveal the answer + AI explanation — free account

16. What is index signature?

Mid
  1. A.a [key: string]: T declaration describing objects with arbitrary keys mapping to a value type
  2. B.a name for any type — unions, primitives, tuples — that cannot be reopened or merged
  3. C.interfaces merge across declarations and are object-focused; type aliases don't merge but can express unions and primitives
  4. D.a property marked with ? that may be absent from the object
Reveal the answer + AI explanation — free account

18. Which statement is correct?

Mid
  1. A.index signature — a property marked with ? that may be absent from the object
  2. B.index signature — a [key: string]: T declaration describing objects with arbitrary keys mapping to a value type
  3. C.index signature — a name for any type — unions, primitives, tuples — that cannot be reopened or merged
  4. D.index signature — interfaces merge across declarations and are object-focused; type aliases don't merge but can express unions and primitives
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Interfaces & Types free