use-readonly
Installation
SKILL.md
Use readonly to Avoid Errors Associated with Mutation
Overview
readonly signals intent and lets TypeScript catch accidental mutations.
Mutation is a common source of bugs. readonly helps TypeScript catch them at compile time and documents your intent to other developers.
When to Use This Skill
- Passing arrays or objects to functions
- Debugging unexpected data changes
- Designing function signatures
- Working with shared state
- Creating APIs that shouldn't mutate inputs