TypeScript Online Coding Test

  • Junior, senior or expert
  • Question bank or custom questions
  • Updated

A CoderPad TypeScript coding test is an online test you build in CoderPad Screen with questions on static types, generics and union types, from the CoderPad question bank or your own, for junior, senior or expert developers. CoderPad Screen scores each answer and records a replay of the code.

What can your TypeScript coding test cover?

The CoderPad question bank includes TypeScript questions on interfaces, generics, union types and strict null checks, suited to TypeScript, full-stack and Node.js back-end developers. Build your test from these questions, your own, or both. Junior questions cover typing functions, and expert questions cover designing types that block invalid data at compile time.

TypeScript skills to assess
  • Interfaces and type annotations
  • Union types and type narrowing
  • Generics
  • Strict compiler settings (strictNullChecks)
  • Typing async functions and Promises
Jobs using TypeScript
Question typesMultiple choice, coding exercises
LevelsJunior, Senior, Expert
QuestionsFrom the CoderPad question bank, your own questions, or both
Test lengthSet by the questions you choose

Sign up free to explore the question bank and try the candidate experience

Sample TypeScript coding question: Temperature closest to zero

Analyze a set of temperature readings to find the one closest to zero. Implement the TypeScript function closestToZero so it returns the temperature in the array ts that is closest to 0.

  • If ts is empty, return 0.
  • If two readings are equally close to zero, return the positive one. For example, if ts contains -5 and 5, return 5.
  • Temperatures are floating point numbers from -273 to 5526.
function closestToZero(ts: number[]): number
Bar chart of 15 sample temperatures between -12 and +13. The reading -1.7, highlighted in red, is the closest to zero.

What a good solution shows

  • Returns 0 for an empty array before reading any element.
  • Compares absolute values and returns the positive reading on a tie, such as 5 over -5.
  • Reads each value once, so the TypeScript function stays fast on large arrays.

Preview a sample coding test report

How is a TypeScript coding test scored?

CoderPad Screen auto-grades each candidate's answers and gives you a scored report. The report shows each candidate's strengths and weaknesses and compares their skills with others who took similar assessments.

Code playback shows how each candidate thinks:

  • See how they approach a problem and build their solution.
  • Note areas to explore further in later interviews.
  • Spot questionable or concerning behavior.
Code playback replays how a candidate wrote their answer.

How CoderPad prevents cheating in TypeScript tests

Code playback shows whether a TypeScript answer was written in the editor or pasted in whole. To confirm they understand it, add a video follow-up question that asks them to explain their solution and the main decisions behind it.

  • Code playback

    See how candidates wrote their code or text.

  • Plagiarism detection

    Flags when a previous candidate's exact code is reused.

  • Copy/paste tracking

    Shows when code may have come from elsewhere.

  • AI follow-up questions

    Check candidates understand their code.

How building a TypeScript coding test works

  1. Build the test

    Pick TypeScript questions from the CoderPad question bank, write your own, or combine both.

  2. Invite candidates

    Send each candidate a link to the test by email.

  3. Candidates take the test

    They code in the browser, with nothing to install.

  4. Review results

    Read the scored report and watch the code playback.

Create and send coding assessments in 60 seconds, even if you're not techy. Choose the level and the number of questions, and add your own coding exercises whenever you need them.

How do you test TypeScript skills before hiring?

Give TypeScript candidates a coding test, read a strict-mode project they maintain, and talk through a type error with them live. Years of TypeScript can still hide a habit of typing everything as any.

Questions to ask and signals to look for at each step:

  • Portfolio

    Ask for a project with "strict": true in tsconfig.json and few any types. It shows a candidate who lets the compiler catch mistakes.

  • Code on GitHub

    Published type definitions or contributions to DefinitelyTyped are strong signals.

  • Coding test level

    Use the senior level for most TypeScript roles and the expert level for the engineer who will own shared types in a large codebase.

  • Live interview

    Ask the reverseArray generics question from CoderPad's TypeScript interview questions.

How should you screen TypeScript candidates?

  • Send the TypeScript test before the technical phone screen, so that call can go deeper on architecture.
  • Choose questions at the role's level, and tell candidates how long the test takes.
  • Say in the job ad that applying leads to an online TypeScript test.

We had no unified approach or tool to assess technical ability. Today, CoderPad Screen enables us to test against a wide selection of languages and is continually updated.

CoderPad code interview all

Trusted by 4,000+ customers worldwide

Security and compliance

  • SSO / SAML

    Okta, Azure AD, Google and other SAML 2.0 providers, on the Enterprise plan.

  • SOC 2 Type 2

    SOC 2 Type 2 report available.

  • GDPR compliant

    GDPR and CCPA compliant.

Read about CoderPad security

Hire TypeScript developers with CoderPad

Request a demo