Files
codegraph/__tests__
Colby Mchenry ab6ec218ff fix(js,ts): a function value imported from the project links only to what its import binds (#2673)
A function passed as a value whose name the file imports from its own
project still fell back to the project's one function of that name
whenever the import resolver bound the name to something that is not a
function: outline's `isCloudHosted` constant landed on the server's
`isCloudHosted()` check, its `Star` model class on the `<Star>` icon,
`import * as Slack` on the Slack settings component, and topcoder's
`import TCO21 from './themes/TCO21.scss'` on a route component.

matchFunctionRef's unique cross-file fallback now also declines when a
project import binds the name to something else (importBindsOther): a
namespace import, an asset import (stylesheet, image, GraphQL, JSON,
font, media; judged by the specifier's extension), or an import the
import resolver binds to a node that is not a function or method. A
wrapper declared beside the namesake (`export default
styled(Disclosure)`) and a lazy loader (`lazy(() => import(...))`)
still lead to it, and an import the resolver can't follow at all keeps
the fallback.

Follow-up to #2671.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:43:16 +00:00
..