LearningTypeScript / projects

Hands-on real world projects that will help you exercise your knowledge of TypeScript.
https://learningtypescript.com/projects
226 stars 151 forks source link

🐛 Bug: [02-clown-availability] <Missing type> #278

Open Dorfieeee opened 9 months ago

Dorfieeee commented 9 months ago

Bug Report Checklist

Expected

I expected the L11 to be let lastClown: string;.

https://github.com/LearningTypeScript/projects/blob/4bf708c250f1ff32f2ba2a6f4a6e38d3ca8e6298/projects/the-type-system/system-of-a-clown/02-clown-availability/solution.ts#L11C15-L11C15

Actual

let lastClown; => type any anything can be assign to it which would eventually blow when .toUpperCase() is called.

Impacted Project

02-clown-availability .../projects/the-type-system/system-of-a-clown/02-clown-availability

Additional Info

No response

JoshuaKGoldberg commented 9 months ago

Heh, I think I'd left this out because evolving anys aren't necessarily issues. But if you want to add a : string I think that it makes sense. Thanks for the report!