When optimizing TypeScript class methods that call other methods from the
same class, the helper methods were being appended OUTSIDE the class
definition. This caused syntax errors because class-specific keywords like
`private` are only valid inside a class body.
Changes:
- Add _find_same_class_helpers() method to identify helper methods belonging
to the same class as the target method
- Modify extract_code_context() to include same-class helpers inside the
class wrapper and filter them from the helpers list
- Fix all JavaScript/TypeScript tests by adding export keywords to test code
so functions can be discovered by discover_functions()
- Add comprehensive tests for same-class helper extraction
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix field name mismatches: .name → .function_name, .start_line → .starting_line,
.end_line → .ending_line, .start_col → .starting_col, .end_col → .ending_col
- Fix circular imports by creating function_types.py with FunctionParent
- Add lazy language registration via _ensure_languages_registered()
- Fix macOS symlink path resolution in ImportResolver
- Update all affected code and tests to use correct FunctionToOptimize attributes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>