apply_code_fix
Apply a code fix—returned by get_code_fixes—to a TypeScript file. Target by symbol name or file/line/column, optionally fix all occurrences in the file.
Instructions
Apply one of the fixes returned by get_code_fixes and write it to disk. Set applyToAll to fix every occurrence of the same problem in the file. Target it either by "symbol" name (preferred: no need to know coordinates) or by explicit file/line/column.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Path to the file (relative to project root) | |
| line | No | Line number (1-based) | |
| column | No | Column number (1-based) | |
| symbol | No | Name of the symbol to target, instead of line/column. Qualify as "Container.member" (e.g. "UserService.getUser") to disambiguate. Combine with "file" to restrict the search to one file. An ambiguous name returns an error listing the candidates. | |
| fixName | Yes | The fixName of the fix to apply, as returned by get_code_fixes. | |
| applyToAll | No | Apply the same fix to every occurrence in the file (default: false). Only available for fixes that report a fixAllDescription. |