Skip to content

TypeScript find refs is too sensitive to import paths, omits many references

Created by: sqs

Find references on useConnection only shows references where it is imported by a relative import path.

import { useConnection } from '../../../components/FilteredConnection/hooks/useConnection'

image

A search for useConnection, however, shows other places where it is imported like:

import { useConnection } from '@sourcegraph/web/src/components/FilteredConnection/hooks/useConnection'

image


In VS Code, Find references correctly shows references from both ways of importing:

image