precise-any-variants
Installation
SKILL.md
Prefer More Precise Variants of any to Plain any
Overview
If you must use any, make it as specific as possible.
Plain any accepts everything. But any[], Record<string, any>, or () => any are narrower and still provide some type checking.
When to Use This Skill
- Forced to use any for some reason
- Writing functions that accept "anything"
- Dealing with truly dynamic data
- Migrating from JavaScript