To Reproduce
document.body.appendChild(document.createElement("div"))
Expected behavior
I can write client-side code inside a project where I use Deno, using TypeScript defaults (e.g. using DOM APIs).
One of the great selling points of JS on the server is that it's possible to share client and server code. It makes a lot of sense to develop those in the same repo, but I can't figure out how to get back the normal TypeScript dev experience for my client code folders.
Observed behaviour
VSCode gets cranky if I try to use any DOM APIs.
document.body by hand, the editor automatically replaces document with decodeURIComponent after I type the .. 馃槴In combination with #313, this means I'm constantly cleaning up after the Deno extension. I also lose the regular benefits of TypeScript.
Versions
macOS 10.15.7
VSCode Version: 1.52.1
Deno extension version 2.3.3
deno --version
deno 1.7.1 (release, x86_64-apple-darwin)
v8 8.9.255.3
typescript 4.1.3
I totally agree!
We need some kind of include/exclude options for this plugin.
In huge repos, when you wanna add some deno, but you still need to maintain the other typescript code that depends on node_modules, you cannot just enable this plugin, it will turn your project all red.
It's not always convenient to split up the code to different repos with different stacks, plugins etc
We will solve this in the 3.X version of the extension by supporting workspace folders, which allows per-folder vscode settings.
We will solve this in the 3.X version of the extension by supporting workspace folders, which allows per-folder vscode settings.
Ref: denoland/deno#8643
馃槏
Is this close to being usable, or should I expect to work around it for a while?
We are aiming for a week or so, but workspace folders aren't part of yet. I will take a look and see how hard they are to implement.
Relates to #297 as well
Relates to #297 as well
Indeed, so it seems!
We are aiming for a week or so, but workspace folders aren't part of yet. I will take a look and see how hard they are to implement.
Any luck on that? :-D
I will take a look and see how hard they are to implement.
Any luck on that? :-D
I looked, they are hard. They are likely to be after import completions.
I will take a look and see how hard they are to implement.
Any luck on that? :-D
I looked, they are hard. They are likely to be after import completions.
馃槩
Thanks for looking into it, though!
I'll keep an eye on this issue, since it's likely to make a big difference in when I can start adopting deno in some of my projects. 鈽猴笍
Most helpful comment
We are aiming for a week or so, but workspace folders aren't part of yet. I will take a look and see how hard they are to implement.