Basic Types interview questions

18 Basic Types questions from the TypeScript bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

1. What is any?

Junior
  1. A.a type that opts out of type checking — assignable to and from any other type, disabling safety
  2. B.the type of values that never occur, such as a function that always throws or an exhausted union
  3. C.the absence of a return value — the type of a function that returns nothing
  4. D.an array type with a fixed length and a known type at each position

Answer + AI explanation with Pro

2. Which term means: "a type that opts out of type checking — assignable to and from any other type, disabling safety"?

Junior
  1. A.tuple
  2. B.never
  3. C.unknown
  4. D.any

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.any — a type-safe counterpart to any: you must narrow it before you can use the value
  2. B.any — a named set of constant values, numeric by default, compiled to a real runtime object
  3. C.any — a type that opts out of type checking — assignable to and from any other type, disabling safety
  4. D.any — the absence of a return value — the type of a function that returns nothing

Answer + AI explanation with Pro

4. What is unknown?

Mid
  1. A.an array type with a fixed length and a known type at each position
  2. B.a type-safe counterpart to any: you must narrow it before you can use the value
  3. C.a type that opts out of type checking — assignable to and from any other type, disabling safety
  4. D.the absence of a return value — the type of a function that returns nothing

Answer + AI explanation with Pro

5. Which term means: "a type-safe counterpart to any: you must narrow it before you can use the value"?

Mid
  1. A.tuple
  2. B.enum
  3. C.never
  4. D.unknown

Answer + AI explanation with Pro

6. Which statement is correct?

Mid
  1. A.unknown — a named set of constant values, numeric by default, compiled to a real runtime object
  2. B.unknown — a type that opts out of type checking — assignable to and from any other type, disabling safety
  3. C.unknown — an array type with a fixed length and a known type at each position
  4. D.unknown — a type-safe counterpart to any: you must narrow it before you can use the value

Answer + AI explanation with Pro

7. What is never?

Mid
  1. A.the type of values that never occur, such as a function that always throws or an exhausted union
  2. B.a named set of constant values, numeric by default, compiled to a real runtime object
  3. C.a type that opts out of type checking — assignable to and from any other type, disabling safety
  4. D.an array type with a fixed length and a known type at each position

Answer + AI explanation with Pro

8. Which term means: "the type of values that never occur, such as a function that always throws or an exhausted union"?

Mid
  1. A.any
  2. B.tuple
  3. C.never
  4. D.unknown

Answer + AI explanation with Pro

9. Which statement is correct?

Mid
  1. A.never — a type that opts out of type checking — assignable to and from any other type, disabling safety
  2. B.never — an array type with a fixed length and a known type at each position
  3. C.never — the absence of a return value — the type of a function that returns nothing
  4. D.never — the type of values that never occur, such as a function that always throws or an exhausted union

Answer + AI explanation with Pro

10. What is void?

Junior
  1. A.a type that opts out of type checking — assignable to and from any other type, disabling safety
  2. B.an array type with a fixed length and a known type at each position
  3. C.a type-safe counterpart to any: you must narrow it before you can use the value
  4. D.the absence of a return value — the type of a function that returns nothing

Answer + AI explanation with Pro

11. Which term means: "the absence of a return value — the type of a function that returns nothing"?

Junior
  1. A.void
  2. B.any
  3. C.tuple
  4. D.never

Answer + AI explanation with Pro

12. Which statement is correct?

Junior
  1. A.void — the absence of a return value — the type of a function that returns nothing
  2. B.void — a type-safe counterpart to any: you must narrow it before you can use the value
  3. C.void — a named set of constant values, numeric by default, compiled to a real runtime object
  4. D.void — the type of values that never occur, such as a function that always throws or an exhausted union

Answer + AI explanation with Pro

13. What is tuple?

Junior
  1. A.a type-safe counterpart to any: you must narrow it before you can use the value
  2. B.a type that opts out of type checking — assignable to and from any other type, disabling safety
  3. C.an array type with a fixed length and a known type at each position
  4. D.the absence of a return value — the type of a function that returns nothing

Answer + AI explanation with Pro

14. Which term means: "an array type with a fixed length and a known type at each position"?

Junior
  1. A.any
  2. B.never
  3. C.unknown
  4. D.tuple

Answer + AI explanation with Pro

15. Which statement is correct?

Junior
  1. A.tuple — an array type with a fixed length and a known type at each position
  2. B.tuple — the type of values that never occur, such as a function that always throws or an exhausted union
  3. C.tuple — a type that opts out of type checking — assignable to and from any other type, disabling safety
  4. D.tuple — a type-safe counterpart to any: you must narrow it before you can use the value

Answer + AI explanation with Pro

16. What is enum?

Junior
  1. A.the type of values that never occur, such as a function that always throws or an exhausted union
  2. B.a named set of constant values, numeric by default, compiled to a real runtime object
  3. C.a type that opts out of type checking — assignable to and from any other type, disabling safety
  4. D.an array type with a fixed length and a known type at each position

Answer + AI explanation with Pro

17. Which term means: "a named set of constant values, numeric by default, compiled to a real runtime object"?

Junior
  1. A.enum
  2. B.tuple
  3. C.unknown
  4. D.never

Answer + AI explanation with Pro

18. Which statement is correct?

Junior
  1. A.enum — the absence of a return value — the type of a function that returns nothing
  2. B.enum — a named set of constant values, numeric by default, compiled to a real runtime object
  3. C.enum — a type-safe counterpart to any: you must narrow it before you can use the value
  4. D.enum — an array type with a fixed length and a known type at each position

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Basic Types question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers