Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug?]: Types are not inferred correctly for dependency if type is from nested dependency #6456

Open
1 task
agarwalvaibhav0211 opened this issue Aug 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@agarwalvaibhav0211
Copy link

Self-service

  • I'd be willing to implement a fix

Describe the bug

When a package using a type from nested dependency is used, it exposes any type instead of the correct type.

To reproduce

Created a minimal Reproduction at https://github.com/agarwalvaibhav0211/yarn-bug-nested-type-repro

We can see that type of createObjectID2 from lib package is not being inferred correctly in Main package

Environment

System:
    OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
  Binaries:
    Node: 20.12.0 - /tmp/xfs-742959c5/node
    Yarn: 4.4.0 - /tmp/xfs-742959c5/yarn
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.0/bin/npm

Additional context

image

image

@agarwalvaibhav0211 agarwalvaibhav0211 added the bug Something isn't working label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant