TypeScript Developer Assessment Template
A ready-to-run TypeScript hiring test covering generics, conditional types, narrowing, and practical TSX application code.
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.
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.
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.
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.
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'`.
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.
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.
Related assessment templates
Other role-specific templates you might want to customize.
Launch Your TypeScript Assessment Today
Customize this template and invite candidates in minutes.