Skip to main content
Frontend
Interviews
.dev
Problems
736. TypeScript Type Predicate Guard
Medium
•
...
Select the best answer.
function
isString
(
x
:
unknown
)
:
x
is
string
{
return
typeof
x
===
'string'
;
}
What does predicate return type enable?
Decorator support
Control-flow narrowing
Runtime casting
Macro expansion
Submit Answer
Reveal Answer
Select an option and submit your answer.
Next Problem
Auto-advance on correct answer