Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
TypeScript
/
Type inference
Why can extracting an inline map callback into const render = (item) => item.name introdu…
from Type inference
TypeScript 6
intermediate
3 min
Why can extracting an inline map callback into const render = (item) => item.name introduce an error under noImplicitAny?
The standalone function is checked before a later map call can provide contextual parameter types.
Arrow functions cannot receive contextual types.
map accepts only named function declarations.
const forces every parameter to become any.
Check
Ask AI about this kata
Report an error
next kata
What is the usual inferred type of config.mode in const config = { mode: "safe" }?
Quiz
A new version is available
Reload