TypeScript Developer Assessment Template

A ready-to-run TypeScript hiring test covering generics, conditional types, narrowing, and practical TSX application code.

Duration
60 minutes
Questions
11
Level
Mid-Level
Passing Score
70%

What this template measures

Every skill needed for a typescript developer hire, covered across MCQ, coding, and essay questions.

Generics

Generic functions, classes, constraints, default params.

Conditional & Mapped Types

Distributive types, infer keyword, key remapping.

Narrowing

Type guards, discriminated unions, never type.

Utility Types

Pick, Omit, Partial, Required, ReturnType, and composition.

Applied Code

TSX, Zod, tRPC, or similar — real application patterns.

Strict Mode

noImplicitAny, strictNullChecks, exactOptionalPropertyTypes.

Sample questions from this template

A preview of the questions you'll see when you use this template.

Multiple ChoiceMediumQuestion 1

What does `type A = string extends 'foo' ? true : false;` evaluate to?

  • A.true
  • B.false
  • C.never
  • D.boolean

Hint: It's the distribution over the general type.

CodingMediumTypeScriptQuestion 2

Write a utility type `DeepReadonly<T>` that recursively makes every property of T readonly (including nested objects). Include a test case using a nested interface.

CodingHardTypeScriptQuestion 3

Implement a `safeParse<T>(schema: Schema<T>, input: unknown): Result<T>` function where Schema is a simple object like `{ name: 'string', age: 'number' }`. Return `{ ok: true, value }` or `{ ok: false, errors }`. Types must narrow correctly at call-sites.

CodingHardTypeScriptQuestion 4

Given an object type with string-literal keys, write a utility `KeysOfType<T, V>` that returns the keys of T whose values extend V. Example: `KeysOfType<{ a: string; b: number; c: string }, string>` → `'a' | 'c'`.

EssayMediumQuestion 5

When should you reach for a union type vs a discriminated union vs an enum? Provide one example of each.

Scoring rubric

How candidates are evaluated on this template.

Dimension
Description
Weight
Correctness
Types compile and narrow correctly at call sites.
40%
Type Design
Uses generics, utility types, and narrowing idiomatically.
30%
Applied Work
TSX and real-world usage patterns.
15%
Strict Mode Compliance
Clean under strict null checks and noImplicitAny.
10%
Code Quality
Readable, well-structured, tested.
5%

Frequently asked questions

Does this cover React TSX specifically?+

Some questions use TSX. For pure React hiring, use the React Developer template which emphasizes components and hooks.

Can I customize this template?+

Yes. Every question, time limit, weighting, and rubric dimension is fully editable. Use the template as a starting point and tailor it to your role and seniority level.

Does this template include AI cheat detection?+

Yes. All ClarityHire assessment templates ship with code coherence AI, keystroke biometrics, and paste detection enabled by default. You can dial integrity level per role.

Can candidates see sample questions before starting?+

Yes. Each template supports unscored practice questions so candidates warm up before the real assessment begins. That way you measure skill, not test anxiety.

Launch Your TypeScript Assessment Today

Customize this template and invite candidates in minutes.