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
/
Literal types
What is the usual inferred type of request.method in const request = { method: "GET" }?
from Literal types
TypeScript 6
beginner
2 min
What is the usual inferred type of request.method in const request = { method: "GET" }?
string, because the property remains mutable
The literal type "GET", because request uses const
"GET" | "POST", inferred from common HTTP methods
never, because no reassignment is shown
Check
Ask AI about this kata
Report an error
previous kata
What constraint does the type "auto" | string impose?
Quiz
next kata
What does this program print?
Predict the output
A new version is available
Reload