Sector file // typescript
TYPESCRIPTDECODED.
Types, generics & inference
Easy
5 questionsHow does type inference work in TypeScript?
Frontend · 898 views · inference, basics
What is the difference between any and unknown?
Frontend · 761 views · any, unknown
What are the basic types in TypeScript?
Frontend · 676 views · types, basics
What is TypeScript and why use it over JavaScript?
Frontend · 668 views · typescript, basics
How do you type functions: optional, default and rest parameters?
Frontend · 526 views · functions, basics
Medium
15 questionsWhat are generic constraints?
Frontend · 1.1k views · generics, constraints
What do ReturnType and Parameters do?
Frontend · 1.0k views · returntype, parameters
What are generics and why are they useful?
Frontend · 1.0k views · generics
What are enums and what are their trade-offs?
Frontend · 949 views · enums
How do you type async functions and Promises?
Frontend · 785 views · async, promises
What are declaration files (.d.ts)?
Frontend · 730 views · declaration, dts
How do you migrate a JavaScript codebase to TypeScript?
Frontend · 663 views · migration, tooling
What does the 'strict' flag in tsconfig enable?
Frontend · 539 views · config, tsconfig
Hard
7 questionsHow do you type and compose multiple disposables with `DisposableStack` and `AsyncDisposableStack`?
Frontend · 730 views · using, DisposableStack
How do you use `infer` to build deep `Awaited`, `ReturnType` and `Unwrap` utilities?
Frontend · 710 views · infer, utility-types
How do you author library types that pass `isolatedDeclarations` for `oxc` / `tsdown` builds?
Frontend · 501 views · isolatedDeclarations, publishing
What does the infer keyword do?
Frontend · 384 views · infer
What are covariance and contravariance?
Frontend · 321 views · variance
What is `isolatedDeclarations` and how does it enable single-file transpilation for declaration emit?
Frontend · 289 views · isolatedDeclarations, declarations
What are conditional types?
Frontend · 236 views · conditional-types
Seen a TypeScript question that is not here? Add it and help the next candidate.
Share a question