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 main effect of const cfg = { retry: 3 } satisfies { retry: 0 | 1 | 2 | 3 }?
from Literal types
TypeScript 6
intermediate
3 min
What is the main effect of const cfg = { retry: 3 } satisfies { retry: 0 | 1 | 2 | 3 }?
It checks that 3 is allowed while retaining the useful specific type of cfg.retry.
It freezes cfg at runtime.
It validates future JSON assigned to cfg.
It converts retry to a string union.
Check
Ask AI about this kata
Report an error
previous kata
Review generated job event parser
Review AI code
next kata
Spot the bug in Mode parsing
Spot the bug
A new version is available
Reload