-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commonjs import with destructuring ignores trailing property access #40578
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
Comments
Small question: does the milestone mean that we would have to wait for In any case, thanks again for your efforts to support Prettier. |
@brodybits Version Probably they wait for the release candidate because the beta will be launched this week (see #40124). |
* CommonJS imports support destructuring+property access Fixes #40578 for prettier * will I ever remember semicolons? haha no * move code around * move function declaration closer to use * Add missing space after `if` Thanks to @weswigham for noticing this. Somehow it passed the linter.
I tried making my own, local build of TypeScript from master, and it DOES seem to work properly with Prettier. When I tried recent version I would be happy to try a newer beta version from npm once it is ready. |
Hmm. I think 0924 is built on early on the morning of 9/24, and this was merged in the afternoon. Perhaps 0925 will work? |
Seems to work for me, thanks! |
Discovered in prettier/prettier#9207, where @brodybits is investigating whether #40143 works.
Expected behavior:
concat: () => void
Actual behavior:
Error: module "mod1" has no exported member 'concat'.
Looks like we miss the trailing property access and don't fall back to the faked import type.
The text was updated successfully, but these errors were encountered: