denoland / vscode_deno

Visual Studio Code plugin for Deno
https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno
MIT License
1.48k stars 144 forks source link

Better Auto-Imports #27

Closed Skillz4Killz closed 4 years ago

Skillz4Killz commented 4 years ago

One of the problem with importing files at the moment is that it does not do it properly. For example here we can see that when I auto-import this file it will create:

import { cache } from "utils/cache";

image

However the actual path is ./utils/cache.ts It is missing the ./ and the ending of .ts image

image

Note: These were all working on Axetroys extension but after switching over this is have quite a few issues.

Thank you

Skillz4Killz commented 4 years ago

Here is another issues related to imports. When you have cached code and you want to jump through it to maybe easily read source code, you get a lot of issues.

image

The main issue here is that these imports become any since they arent seen as valid imports. This makes all the typings below it useless which trickles down to end users by causing types being imported from deno libs as broken.

image

But message is not supposed to be any image image image

Skillz4Killz commented 4 years ago

Another issue noted with imports:

image

image

What it should be doing: image

justjavac commented 4 years ago

@Skillz4Killz I have found a solution for this bug, I will fix it later. Thank you.

via https://github.com/justjavac/typescript-deno-plugin/pull/40