web-master
Installation
SKILL.md
Web Master
Follow these instructions when writing web-related code.
TypeScript
Do not use type assertions
Do not reach for type assertions unless you need one. Never add a type assertion up front because you think you might need it later. You may use a type assertion only when all of these conditions apply:
- You first write the code without a type assertion and encounter a type error.
- You cannot resolve that type error by improving type definitions elsewhere.
- Adding the type assertion does not compromise type safety.
Do not use ReturnType
Do not use ReturnType unless you need it. Use the following approaches instead.
If you need to use the return type of a specific function defined in the project somewhere other than that function: