ecmascript-over-typescript-features
Installation
SKILL.md
Prefer ECMAScript Features to TypeScript Features
Overview
TypeScript includes features like enum and namespace that are specific to TypeScript and don't exist in JavaScript. Prefer standard ECMAScript features when possible - they're more portable, better understood by the JavaScript ecosystem, and won't lock you into TypeScript-specific patterns.
This doesn't mean avoid TypeScript entirely - use its type system fully. But for runtime features, prefer standard JavaScript.
When to Use This Skill
- Choosing between TypeScript and ECMAScript features
- Writing portable code that might be used without TypeScript
- Considering enum, namespace, or parameter properties
- Targeting multiple JavaScript environments
- Writing library code for broad consumption
The Iron Rule
Prefer standard ECMAScript features over TypeScript-specific runtime features. Use TypeScript for types, JavaScript for runtime behavior.