expand-code
Expands TypeScript macros and @derive decorators to show generated code with diagnostics for debugging and understanding transformations.
Instructions
Expands Macroforge macros in TypeScript code and returns the transformed result.
Shows:
The fully expanded TypeScript code with all generated methods
Any diagnostics (errors, warnings, info) with line/column locations
Help text for fixing issues (when available)
Useful for:
Seeing what code the macros generate
Understanding how @derive decorators transform your classes
Debugging macro expansion issues
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | TypeScript code with @derive decorators to expand | |
| filename | No | Filename for the code (default: input.ts) |