Skip to content
tezvyn:

TypeScript & Web APIs

TypeScript, browser APIs, WebAssembly, PWAs

32 bites

Test yourself: Top 30 advanced TypeScript & Web APIs interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Advanced interview questions in TypeScript & Web APIs, page 2

advanced2 min read

Implement recursive DeepReadonly<T> for nested objects and arrays

Tests recursive mapped types and conditional type narrowing. A strong answer uses a conditional to split arrays into ReadonlyArray, objects into readonly mapped types, and leaves primitives untouched.

advanced2 min read

Write a generic CreateSetters<T> that maps properties to setter methods

This tests TypeScript mapped types with key remapping and template literals. It iterates keyof T, remaps via as set plus Capitalize of string and K, and types values as setter methods. Red flag: manually typing setters or omitting string and K in Capitalize.

How do you add a new index to an existing IndexedDB store?
advanced2 min read

How do you add a new index to an existing IndexedDB store?

Tests production schema migration discipline. Bump the integer version in open(), handle onupgradeneeded before onsuccess, use event.oldVersion for incremental changes, and guard against duplicate index creation.

How do you query IndexedDB products by price range?
advanced2 min read

How do you query IndexedDB products by price range?

Tests IndexedDB indexing and range query APIs. You need a price index created in onupgradeneeded, then IDBKeyRange.bound(50, 100) with index.getAll or openCursor. Red flag: fetching all records and filtering in JavaScript.

Why access IndexedDB exclusively from a Web Worker?
advanced2 min read

Why access IndexedDB exclusively from a Web Worker?

Tests whether you know IndexedDB in workers keeps the main thread free from serialization and transaction overhead, while recognizing that postMessage copying and request-response coordination add real architectural complexity.

advanced2 min read

Dedicated vs Shared vs Service Workers compared

Dedicated worker serves one page for offloading CPU; Shared worker is one instance across same-origin contexts via ports; Service worker is a network proxy for caching and push, event-driven and killable.

Design a Service Worker caching strategy for a news app
advanced2 min read

Design a Service Worker caching strategy for a news app

Cache First for the app shell, Stale-While-Revalidate for static assets, and Network First for article APIs.

In WebGL, what is the difference between attributes and uniforms?
advanced2 min read

In WebGL, what is the difference between attributes and uniforms?

Tests per-vertex versus per-draw-call data flow. Attributes vary per vertex from buffers; uniforms are constant per draw call. Cite vertex positions as attributes and an MVP matrix as uniform.

advanced2 min read

WebRTC signaling: SDP, ICE, and the signaling server

Peers exchange SDP offer and answer describing media via an out-of-band signaling server, then trade ICE candidates to find a network path using STUN and TURN.

advanced2 min read

What isolatedModules enforces and why bundlers need it

IsolatedModules forbids features needing cross-file type info because Babel and esbuild compile each file alone; const enums, certain re-exports, and namespace tricks are flagged.

advanced2 min read

How do you configure a dual ESM/CommonJS package?

Use exports.require for .cjs and exports.import for .mjs, keep type unset or explicit, and compile separate artifacts.

advanced2 min read

Explain TypeScript Project References in a monorepo and their configuration

This tests monorepo build scaling. Good answers: split into composite projects with references arrays, use tsc --build for incremental compilation, and consume .d.ts outputs for boundaries. Red flag: calling it path mapping or omitting --build.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles