Sector file // typescript
TYPESCRIPTDECODED.
Types, generics & inference
Easy
5 questionsHow does type inference work in TypeScript?
Frontend · 895 views · inference, basics
What is the difference between any and unknown?
Frontend · 759 views · any, unknown
What are the basic types in TypeScript?
Frontend · 674 views · types, basics
What is TypeScript and why use it over JavaScript?
Frontend · 666 views · typescript, basics
How do you type functions: optional, default and rest parameters?
Frontend · 525 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 · 948 views · enums
How do you type async functions and Promises?
Frontend · 783 views · async, promises
What are declaration files (.d.ts)?
Frontend · 728 views · declaration, dts
How do you migrate a JavaScript codebase to TypeScript?
Frontend · 661 views · migration, tooling
What does the 'strict' flag in tsconfig enable?
Frontend · 536 views · config, tsconfig
Hard
7 questionsHow do you type and compose multiple disposables with `DisposableStack` and `AsyncDisposableStack`?
Frontend · 729 views · using, DisposableStack
How do you use `infer` to build deep `Awaited`, `ReturnType` and `Unwrap` utilities?
Frontend · 709 views · infer, utility-types
How do you author library types that pass `isolatedDeclarations` for `oxc` / `tsdown` builds?
Frontend · 499 views · isolatedDeclarations, publishing
What does the infer keyword do?
Frontend · 382 views · infer
What are covariance and contravariance?
Frontend · 319 views · variance
What is `isolatedDeclarations` and how does it enable single-file transpilation for declaration emit?
Frontend · 286 views · isolatedDeclarations, declarations
What are conditional types?
Frontend · 234 views · conditional-types
Seen a TypeScript question that is not here? Add it and help the next candidate.
Share a question