precise-any-variants
CommunityNarrow any usage to preserve type safety.
Authorluyi985
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This skill helps developers manage the unsafe and overly broad use of TypeScript's any type by guiding them toward precise variants that preserve type safety.
Core Features & Use Cases
- Recommends specific variants for common scenarios: use any[] for arrays, Record<string, any> for objects, and () => any for functions to retain structure while accommodating dynamic data.
- Encourages safer alternatives like unknown for truly unknown data and provides concrete examples across data parsing, API integration, and dynamic data handling.
- Helps teams maintain consistent typing discipline during migrations from JavaScript or dynamic sources, reducing runtime errors and improving maintainability.
Quick Start
Choose the most specific any variant for the given use case and annotate your function signatures accordingly.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: precise-any-variants Download link: https://github.com/luyi985/lyi-bash/archive/main.zip#precise-any-variants Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.