Sector file // typescript
TYPESCRIPTDECODED.
Types, generics & inference
Easy
3 questionsMedium
13 questionsWhat is type narrowing and what are type guards?
Frontend · 1.1k views · narrowing, guards
What are assertion functions (asserts)?
Frontend · 1.1k views · asserts
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
How does TypeScript 5.5 infer type predicates for `Array.filter` automatically?
Frontend · 904 views · type-predicates, filter
What is the difference between void, undefined and never as return types?
Frontend · 809 views · void, never
What are `const` type parameters (`<const T>`) and why are they better than `as const`?
Frontend · 479 views · generics, const-type-parameters
How do you safely work with JSON of unknown shape?
Frontend · 450 views · unknown, type-safety
Hard
9 questionsHow do you use `infer` to build deep `Awaited`, `ReturnType` and `Unwrap` utilities?
Frontend · 709 views · infer, utility-types
What does `NoInfer<T>` do and when should you block inference?
Frontend · 704 views · infer, NoInfer
Why are conditional types distributive and how do you control it with `infer`?
Frontend · 624 views · conditional-types, infer
What are template literal types?
Frontend · 573 views · template-literal-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 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