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

Remove portability error when emitting declarations for incremental mode #49565

Conversation

weswigham
Copy link
Member

Fixes #37960

Copy link
Member

@sheetalkamat sheetalkamat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think we need this change.. The test case you have will give exact same result atleast with nightly with or without your change

@evelant
Copy link

evelant commented Sep 15, 2022

@sheetalkamat This still seems to be an issue as of ts 4.8.3 when working with a pnpm mono repo.

@MaximSagan
Copy link

@weswigham Is there a blocker for getting this merged? There are still repos that are needing to patch TypeScript (as described in #37960) to get around this issue.

@sandersn
Copy link
Member

sandersn commented Dec 4, 2023

@weswigham can you confirm whether this PR changes behavior with respect to main? Sounds like at least a couple of people are still seeing it.

@weswigham
Copy link
Member Author

After looking into this again, I just don't think this is a good idea - while the declaration files for incremental aren't necessarily there to be shipped, they can be, and the original issue requestors weren't even using incremental in the first place. IMO, this error is just a known caveat of using incremental or composite (or declarations), and the correct fix is just doing what is asked in the error and adding an explicit type annotation at the indicated location (in so doing, you usually are forced to realize the transitive typing dependency yourself and choose how to resolve it!). If we ever swap our incremental metadata from declaration files to something less-human-consumable, maybe we can relax this rule then.

@weswigham weswigham closed this Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Allow configuration of NodeBuilderFlags.AllowNodeModulesRelativePaths for un-distributed mono repos
6 participants