-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Fix JSDoc @import resolution in --moduleResolution bundler
#60011
Conversation
@typescript-bot test it |
@jakebailey Here are the results of running the user tests with tsc comparing Everything looks good! |
Hey @jakebailey, the results of running the DT tests are ready. Everything looks the same! |
@jakebailey Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
@jakebailey Here are the results of running the top 400 repos with tsc comparing Everything looks good! |
I think this can go in after the beta cut if needed, but either way, @sandersn feel free to merge for me upon approval. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to know whether this will make us start resolving @import
in TS files.
@@ -4617,12 +4617,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { | |||
? location | |||
: (isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : undefined)?.name || | |||
(isLiteralImportTypeNode(location) ? location : undefined)?.argument.literal || | |||
(isInJSFile(location) && isJSDocImportTag(location) ? location.moduleSpecifier : undefined) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it matter that we aren't checking isInJsFile
any more? Would we resolve an @import
inside a ts file now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed by changing the test to .ts instead. I'll add that as importTag22.ts and merge the PR.
Fixes #60007