Skip to content

(fix #50725, #50710) add file extensions in import statements - #51702

Merged
Isabel Duan (iisaduan) merged 7 commits into
microsoft:mainfrom
iisaduan:fix50725
Dec 6, 2022
Merged

Isabel Duan (iisaduan) merged 7 commits into
microsoft:mainfrom
iisaduan:fix50725

Conversation

@iisaduan

Copy link
Copy Markdown
Member

Fixes #50725
Fixes #50710

@typescript-bot TypeScript Bot (typescript-bot) added the For Milestone Bug PRs that fix a bug with a specific milestone label Nov 30, 2022
@iisaduan Isabel Duan (iisaduan) changed the title Fix50725 (fix #50725, #50710) add file extensions in import statements Nov 30, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was going to suggest a couple simplifications, but as I was reading through the code I think I spotted some other unrelated bugs that will run up against those simplifications. I suggest we merge this and then pair on a quick follow-up.

Comment thread src/services/refactors/moveToNewFile.ts Outdated
@SamB

Copy link
Copy Markdown

Well, by reading the patch I learned that "*.preferences.importModuleSpecifierEnding" doesn't work with "moduleResolution": "classic" (and that the default "moduleResolution" is difficult to predict; I think the documentation for that didn't get updated when some values were added for "module" ...?) ... well, anyway, adding an explicit "moduleResolution" that wasn't "classic" made (symbol) completion stop trying to import my .js files without the .js, so I'm happy.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

4 participants