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 constraint does the type "auto" | string impose?
from Literal types
TypeScript 6
intermediate
2 min
What constraint does the type "auto" | string impose?
It accepts every string, so the literal adds no restriction.
It accepts only the exact string auto.
It accepts auto and non-empty strings only.
It creates a runtime set containing auto.
Check
Ask AI about this kata
Report an error
next kata
What is the usual inferred type of request.method in const request = { method: "GET" }?
Quiz
A new version is available
Reload