Which fix removes the bug?
function shout(text: any): string {
return text.toUpperCase();
}
- Type the parameter
string - Return
textwithout a call - Mark the function
async - Rename the parameter
str
any disables checking, so a number argument crashes only at runtime.