TypeScript | Advanced Types in TypeScript | Question1

Last Updated :
Discuss
Comments

What does the following syntax represent in TypeScript?

TypeScript
let value: unknown = "Hello";
let strValue = value as string;


value is cast to string using a type guard.

value is asserted to be of type string.

value is converted to a string at runtime.

value is conditionally mapped to a string.

Share your thoughts in the comments