Fix class method export detection for JavaScript/TypeScript#1246
Merged
misrasaurabh1 merged 3 commits intomainfrom Feb 2, 2026
Merged
Fix class method export detection for JavaScript/TypeScript#1246misrasaurabh1 merged 3 commits intomainfrom
misrasaurabh1 merged 3 commits intomainfrom
Conversation
When checking if a function is exported for reference finding, the is_function_exported() method now accepts an optional class_name parameter. For class methods, it checks whether the containing class is exported (either as a named export or default export). This fixes the issue where class methods like `BloomFilter.getHashValues` would incorrectly show "Function getHashValues is not exported from..." warnings when the BloomFilter class was actually exported. Changes: - treesitter_utils.py: Extended is_function_exported() to check class exports when class_name parameter is provided - find_references.py: Added class_name parameter throughout the call chain to pass class context - support.py: Pass function.class_name when calling find_references - Added tests for class method export detection scenarios Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
is_function_exported()method now accepts an optionalclass_nameparameter to check if the containing class is exportedBloomFilter.getHashValuesTest plan
🤖 Generated with Claude Code