I want to hide "import" when referencing the library, that is, local/global import, and use the contents of the library normally Can it be achieved, or is it already achieved?
I use these codes in a plug-in loader, so I don’t need to import it. It’s just a tool for prompting to view annotations.
I am using VSCODE and its built-in JavaScript
example:
import { mc } from "./Libary/Game/Player";
mc.runcmd('kill u m')
want to use:
mc.runcmd('kill u m')
And you can also see comments and function types, etc.
I don't think this is achievable at the moment nor do I think it should be, because:
The imports are related to how modules in javascript language works
It may cause a lot of problems.
for example, imagine that you have two games like Game1 and Game2 which both of them has a mc method:
import { mc } from "./Libary/Game1/Player";
import { mc } from "./Libary/Game2/Player";
How should VScode decide what to import here?
but when you're using normal javascript imports it's just a matter of changing name imports like this:
import { mc as mc1 } from "./Libary/Game1/Player";
import { mc as mc2 } from "./Libary/Game2/Player";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With