-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Prevents auto import in module: "none" #55556
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
Conversation
…cript into bug55256-Hardik
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
Looks like the test is failing 😕 |
yeah , just saw that , checking it out. |
Hey @andrewbranch , as i was not much familiar with the fourslash testing framework, so had to do some research and with some hit and tries the tests are passing now, Please review and verify once if some things need to be changed. |
verify.completions({ | ||
marker: "", | ||
excludes: ["Thing2A"], | ||
includes: ["!Thing1A"], |
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.
🤔 What is this?
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.
🤔 What is this?
haha just trying the same thing to exclude it by using include with "!" , read it somewhere if exclude is giving error try including with "!".
@andrewbranch , please review and assist me if more changes required as im not good at writing tests |
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.
It turns out the behavior was already working as intended, but it was untested, so I’ve added two tests. --module none
only errors when --target
is below es2015, and auto-imports were already prevented in that case, and not in the others. (Like I said, --module none
is pretty broken and possibly meaningless.) Thanks for your patience!
ohhh , thats a relief to know that it was working already, anyway im analyzing the test you wrote , really helpful :) thanks for your help !! |
I would say, “working” here means auto-imports agrees with whether or not
I think potentially any of these might be on the table for the future, we just haven’t had a reason to pull the trigger on any of them. So the current state is... pretty weird. |
omg this is a lot, hahaha and yes i did indeed assume that its possible to write module constructs , current state as it seems is actually weird ngl , hahaha |
@andrewbranch , did i just contribute to TypeScript? :D , kind of i guess XD |
I do not understand. With typescript ts5.2.2 I still get bogus, file breaking autosuggestions in my Was that changed after branching ts5.2? |
If you accept the import, do you get an error? |
Moved the discussion back to the main issue (which I am not allowed to reopen). |
Co-authored-by: Andrew Branch <[email protected]>
Fixes #55256