05. Any vs Unknown/Elaboration

Break Any Vs Unknown
👨‍💼 You understand the difference between any and unknown!
You learned:
  • 🚨 any disables type checking—dangerous!
  • 🛡️ unknown requires narrowing—safe!
  • Best practice: Use unknown for external data
🦉 When you encounter any in code, ask:
  • Can this be unknown instead?
  • What type should this actually be?
  • Is there a more specific type available?
Every any is a potential bug waiting to happen. Prefer unknown and narrow it properly.
🎉 Congratulations! You've completed the Type Safety workshop. You can now design types that make illegal states unrepresentable!

Test Your Knowledge

Retrieval practice helps solidify learning by actively recalling information. Use this prompt with your AI assistant to quiz yourself on what you've learned.

Please quiz me on exercise 5 using the epicshop MCP server. Call the get_quiz_instructions tool with exerciseNumber "5" to get the quiz instructions, then quiz me one question at a time.

Learn how to set up the epicshop MCP server

Loading Any vs Unknown Elaboration form