QuizNot attempted
satisfies
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
- It checks the value against the type but keeps the narrower inferred type (routes.home is still known as a key)
satisfieschecks the value against the type but keeps the narrower inferred type, soroutes.homeis still a known key androutes.nopeis an error.- Not 'casts like as':
asskips the check,satisfiesenforces it. - Not readonly: that is
as constorReadonly<>. - Not an alias for ':': an annotation widens to
Record<string, string>, losing the literal keys.