HomeExamsResourceTETAUIMPRFIC1014
TETAUIMPRFIC1014

Infosys Certified TypeScript Professional

Practice with real exam-pattern questions for Infosys Certified TypeScript Professional. Each question includes a detailed explanation to help you understand the concept, not just memorise the answer. Try 10 questions free — no login required.

BeginnerResource60 min
Free questions

10 Infosys Certified TypeScript Professional practice questions with answers

Real Lex exam-pattern multiple-choice questions for the Infosys Certified TypeScript Professional certification. Each question includes the correct answer. The full question bank is available to Premium members.

  1. Question 1

    TypeScript variables are classified into _________ and __________ datatypes.

    • Built-in and SimpleCorrect
    • BSimple and User-defined
    • CBuilt-in and User-defined
    • DSimple and Primitive
  2. Question 2

    What is the reason for the compiler throwing errors in the following TypeScript code snippet?

    function calculateArea(length:number, breadth:number) { 
    return length * breadth; 
    } 

    Assume that you provide “abc” and 5 as the input to the function calculateArea.

    • No error in the code.

      Correct
    • B

      Type Annotation Error.

    • C

      Function return type has to be mentioned.

    • D

      None of the options are correct.

  3. Question 3

    What is the purpose of the tsconfig.json file in a TypeScript project?

    • It is used to configure the TypeScript compiler settings.

      Correct
    • B

      It is used to list all the TypeScript files in the project.

    • C

      It is used to specify the version of TypeScript to use.

    • D

      It is used to define the project's dependencies.

  4. Question 4

    A TypeScript developer must declare a block-level scoped variable named – myVar in the application. Can you select the appropriate option that would help to achieve this requirement?

    1. var myVar:number = 123;
    2. let myVar:number = 123;
    3. const myVar:number =123;
    4. myVar:number=123;

    • a, b

      Correct
    • B

      b, c

    • C

      a, c

    • D

      b, d

  5. Question 5

    What should be added in Line 2 to get the output as 200?

    Line 1: let uniqueId: number[] | string = 'P1200';
    Line 2: _______;
    Line 3: console.log(uniqueId.pop());

    • let uniqueId = [1, 20, 90, 200]

      Correct
    • B

      uniqueId = [120, 20, 90, 200]

    • C

      var uniqueId = [200, 20, 90, 120]

    • D

      uniqueId = uniqueId.split('1')

  6. Question 6

    Given below is the content of the tsconfig.json file that a developer has written for their TypeScript application.

    {   
        "compilerOptions": {  
                "target": "es5",   
                "watch":true
            },   
        "files": [    
                "demo1.ts",	
                "demo2.ts"   
        ]
    }

    What will be the output when the developer runs the command ‘tsc’ on the terminal?

    • It will generate demo1.js and demo2.js.

      Correct
    • B

      It will throw error because ‘watch’ option can be specified only in command line.

    • C

      It will not throw any error nor generate js files, as file names are not mentioned in command line.

    • D

      It will generate demo1.js and demo2.js in the folder named ‘es5’

  7. Question 7

    Assume that a TypeScript application has two files – demo1.ts and demo2.ts in the root folder. The given below is the content of tsconfig.json file of that application.

    {
      "compilerOptions": {
        "target": "es5",
        "outDir": "Output",
      }
    }

    What will be the output when the developer enters the command ‘tsc’ on the command line?

    • Since the "files" field is not added in the tsconfig.json file, it will throw error.

      Correct
    • B

      It will not throw any error, but since the "files" field is not added in the file, it will neither transpile any file nor generate any output files.

    • C

      It will transpile all the files present in the folder and generate the output files in the ‘Output’ folder.

    • D

      It will transpile all the files present in the folder and generate the output files in the root folder.

  8. Question 8

    Given below is the content of the tsconfig.json file that a developer has written for their TypeScript application.

    {   
        "compilerOptions": {  
                "target": "es5",   
                "outDir": "Output",  
                "sourceMap": true,
            },   
        "files": [    
                "demo1.ts",	
                "demo2.ts"   
        ]
    }

    What will be the output when the developer runs the command ‘tsc’ on the terminal?

    • It will generate demo1.js, demo1.js.map, demo2.js and demo2.js.map in the ‘Output’ directory.

      Correct
    • B

      It will generate demo1.js and demo2.js in the ‘Output’ directory, and demo1.js.map and demo2.js.map in the current working directory.

    • C

      It will throw error because no filename is mentioned in the command line.

    • D

      It will generate demo1.js, demo2.js, demo1.js.map and demo2.js.map in the root directory.

  9. Question 9

    Assume that your team is developing a TypeScript application. Your team member is using the below command for transpiling the code.

    tsc demo.ts --module amd --target ES2015 --outDir output --sourceMap

    He finds it difficult that he has to enter all these configuration options each time he does the transpilation. Suggest a better way to help him achieve the requirement.

    • Create a package.json file and add all the compiler options to that.

      Correct
    • B

      Create a tsconfig.json file and all the compiler options to that.

    • C

      Create a config.ts file and add all the compiler options to that.

    • D

      Create a configs.json file and add all the compiler options to that.

  10. Question 10

    Predict the output of the following code.

    Line 1: let tempCounter = 0; 
    Line 2: function getStatusData() { 
    Line 3: var tempCounter = 10; 
    Line 4: tempCounter++ 
    Line 5: console.log(tempCounter >= 10 ? 'Active' : 'Inactive'); 
    Line 6: } 
    Line 7: console.log(tempCounter >= 10 ? 'Active' : 'Inactive'); 
    Line 8: getStatusData();

    • Error in Line 7Correct
    • B

      Active

      Inactive

    • C

      Inactive

      Active

    • DError in Line 5
Pricing

Pay once. Clear every cert this year.

One subscription, full Telegram channel access, every PDF posted during your membership.

Monthly
50% OFF
₹1,300₹2,600
Per month · cancel anytime
  • Full access to all 1,357+ certifications
  • Monthly updated question banks
  • Telegram private channel access
  • Cancel anytime
Get Monthly
POPULAR
Quarterly
44% OFF
₹1,800₹3,200
That's ₹600/mo · billed for 3 months
  • Everything in Monthly
  • Save ₹2,100 vs monthly billing
  • Priority answer key requests
  • Best for increasing DQ score fast
Get Quarterly
BEST VALUE
Lifetime
52% OFF
₹2,400₹5,000
One-time · lifetime access
  • Everything in Quarterly
  • Lifetime channel access — no renewals
  • All future certifications included
  • Priority response from admin team
Get Lifetime
FAQ

Common questions, straight answers.

A monthly-updated Telegram channel where we post real exam-pattern question banks and detailed answer keys for 1,357+ Infosys Lex certifications. You join once, you get every PDF posted during your membership.

Right after payment on our Graphy page, you'll receive a private invite link to the Telegram channel. Access is instant — usually under 30 seconds.

We compile question banks from the actual Lex test pattern, sourced and verified by 180K+ community members who've recently cleared these exams. Match rate is consistently 85–95%.

Every single month. When Infosys rolls out new versions of certifications, we post updated dumps within 7–10 days. You'll see channel activity weekly.

Clearing certifications is one of the highest-weighted DQ factors. Members typically clear 3–5 certifications in their first 3 months, which moves DQ scores up by a full band.

i
InfyLexDumps

Independent exam preparation platform for Infosys Lex certifications. Real exam-pattern question banks, monthly updates, 180K+ community members.

Join Premium Telegram
Contact
  • @prepflixadmin
  • admin@prepflix.net
This platform is an independent educational resource and is not affiliated with or endorsed by Infosys Ltd. All certification names referenced are property of their respective owners.
© 2026 InfyLexDumps
Join Premium Telegram