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
What is the usual inferred type of config.mode in const config = { mode: "safe" }?
from Type inference
TypeScript 6
beginner
2 min
What is the usual inferred type of config.mode in const config = { mode: "safe" }?
string, because the property remains mutable
The literal type "safe", because config uses const
"safe" | "fast", inferred from likely future values
never, because no reassignment appears
Check
Ask AI about this kata
Report an error
previous kata
Why can extracting an inline map callback into const render = (item) => item.name introdu…
Quiz
next kata
What does this program print?
Predict the output
A new version is available
Reload