delete_symbol
Remove a TypeScript/JavaScript symbol (variable, function, class) and its references from a file. Input the root directory, file path, line number, and symbol name to clean up code efficiently.
Instructions
Delete a TypeScript/JavaScript symbol (variable, function, class, etc.) and all its references
Input Schema
Name | Required | Description | Default |
---|---|---|---|
filePath | Yes | File path containing the symbol (relative to root) | |
line | Yes | Line number (1-based) or string to match in the line | |
removeReferences | No | Also delete all references to the symbol | |
root | Yes | Root directory for resolving relative paths | |
symbolName | Yes | Name of the symbol to delete |