Fix type errors and type mismatches in strongly-typed languages
Help me resolve type errors in my {{LANGUAGE}} code.
**Type error message:**
```
{{ERROR_MESSAGE}}
```
**Code with type error:**
```{{LANGUAGE}}
{{CODE}}
```
**Type definitions involved:**
```{{LANGUAGE}}
{{TYPE_DEFINITIONS}}
```
**What I'm trying to achieve:** {{GOAL}}
Please provide:
1. **Error Explanation**: What does this type error mean?
2. **Type Mismatch Analysis**: Show exactly what types are conflicting
3. **Fix Options**: Multiple ways to resolve the type error
4. **Type Assertion/Casting**: When and how to safely cast types
5. **Generic Solutions**: Use generics if applicable
6. **Type Guard Implementation**: Add type guards if needed
7. **Best Practice Fix**: The most type-safe solutionOr press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{LANGUAGE][{ERROR_MESSAGE][{CODE][{TYPE_DEFINITIONS][{GOAL]