Home / CSE MCQs / TypeScript ::

CSE MCQs :: TypeScript

  1. Which are the different Data Types supported by Typescript?
  2. A.
    Boolean var bValue: boolean = false
    B.
    Number var age: number = 16
    C.
    String var name: string = "jon"
    D.
    All of the above mentioned

  3. Which statements are true regarding JSX modes?
  4. A.
    These modes only affect the emit stage - type checking is unaffected
    B.
    The output of react mode will have a .jsx file extension
    C.
    The react mode will emit React.addElement
    D.
    The preserve mode will keep the JSX as part of the output to be further consumed by another transform step

  5. What are variables in Typescript?
  6. A.
    A variable name should contain alphabets and numeric digits
    B.
    It cannot contain spaces and special characters except underscore (_) and dollar ($) sign
    C.
    A variable name cannot begin with a digit
    D.
    All

  7. What are the variable scopes available in TypeScript?
  8. A.
    Global Scope
    B.
    Class Scope
    C.
    Local Scope
    D.
    All of the above

  9. What are the benefits of Typescript?
  10. A.
    It helps in code structuring
    B.
    Use class based object oriented programming
    C.
    Impose coding guidelines
    D.
    All of the above

  11. Which object oriented terms are supported by Typescript?
  12. A.
    Modules
    B.
    Classes
    C.
    Interfaces
    D.
    All of these

  13. List some features of Typescript?
  14. A.
    Typescript can be compiled to all major versions of Javascript(ES3,ES5,ES6,ES7)
    B.
    Typescript can be used for cross "“browser development and is an open source project
    C.
    Typescript is a superset of JavaScript that provides typed nature to your code
    D.
    All of the above

  15. What are the components of TypeScript?
  16. A.
    TypeScript Language
    B.
    TypeScript Compiler
    C.
    TypeScript Language Service
    D.
    All of these

  17. What are the types of access modifiers supported by TypeScript?
  18. A.
    Public
    B.
    Private
    C.
    Protected
    D.
    All of these

  19. When was the first time TypeScript was made public?
  20. A.
    December 2012
    B.
    October 2012
    C.
    October 2013
    D.
    November 2013