Narrows an unknown value to a string if it is type-compatible, or raises an error otherwise.
unknown
string
The value to test.
Optional
The error message to use if value is not type-compatible.
value
AssertionFailedError If the value was undefined.
Narrows an
unknown
value to astring
if it is type-compatible, or raises an error otherwise.