-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
[nightly][regression] Some emitted imports are syntactically invalid #58159
Comments
Ok I have a repro. It actually demonstrates an even more egregious behavior export declare const d: {
e: {
f: (foo: import({e};
).Foo) => boolean;
};
}; This is even less syntactically valid! |
FWIW https://www.npmjs.com/package/every-ts may be useful in the future if you're already able to use nightly TS (and can bisect instead). |
@jakebailey that's how I found the offending commit :). BTW could I put in a quick feature request for a command to rebuild TS in the current branch? Bisecting took extra work because there was an unrelated bad commit that I had to revert on every commit I was testing, so my flow was like: every-ts bisect good
git revert ...
# copy the current revision with the revert
git checkout HEAD^ # have to switch otherwise every-ts won't rebuild TypeScript
every-ts switch <copied revision with revert> What I'd want is something like every-ts bisect good
git revert ...
every-ts rebuild # or alternatively something like `every-ts switch ... --rebuild` |
Oh, oops, I didn't even see that you bisected it; I skipped straight to the end.
At the moment, I'm not intending for anyone to be modifying the TS repo that |
π Search Terms
import, declaration, empty
π Version & Regression Information
β― Playground Link
No response
π» Code
π Actual behavior
A type referenced in a declaration file is sometimes emitted as
import().SomeType
and sometimes asimport(<actual_import_path>).SomeType
π Expected behavior
The type is always emitted as
import(<actual_import_path>).SomeType
Additional information about the issue
It's not easy for me to provide a self-contained reproduction, as it involves the composition of a lot of our private code, but I figure since it's already known which PR introduced the regression, it should hopefully be easier for someone on the TS team to spot how an import could possibly be empty. I can patch speculative fixes or add some debug logs if requested.
The text was updated successfully, but these errors were encountered: