GithubHelp home page GithubHelp logo

Comments (5)

RyanCavanaugh avatar RyanCavanaugh commented on April 28, 2024

We're going to need an actual repo to investigate. Speculating, the problem is in the package.json - auto-import will not offer modules that aren't explicitly in your dependencies or devDependencies list, since it's incorrect to depend on a transitive dependency.

from typescript.

kebeclibre avatar kebeclibre commented on April 28, 2024

Hello, thanks for your answer
I made a mock repo here: https://github.com/kebeclibre/TypeScriptIssue-57762

I explain the steps I take in the commits

I could not reproduce my original problem on our production repo, since the two projects are in two separate repositories and one of them is private.

from typescript.

RyanCavanaugh avatar RyanCavanaugh commented on April 28, 2024

I don't see a dependency or other hint for to indicate that loading the other project for analysis is valid. Auto-import can only offer imports from files it knows about, and there's no reason it should suspect the peer folder is one it should be looking at.

from typescript.

kebeclibre avatar kebeclibre commented on April 28, 2024

Yes, precisely.
But when an import preexists in project_b, even if it points to something in project_a that it is not supposed to be aware of, I have a suggestion for that import, and, when hitting F12 to see the definition, it does open the right file.

I'm not sure if it is VSCode or Typescript though.

Cheers anyway and thanks for looking at this

from typescript.

RyanCavanaugh avatar RyanCavanaugh commented on April 28, 2024

Right. TS isn't scanning your entire hard drive looking for files that might possibly be part of your project; there is obviously some limit. The limit is what you saw. But once you have an import into some other set of files, those files are available for analysis. That's the intended scoping mechanic.

from typescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.