ARTICLE AD BOX
Trying to switch my editor from TextPad to VS Code, I:
Installed VS Code Added and enabled the Deno and Civet extensions Opened my project in VS Code Ran "Deno: Initialize Workspace Configuration" Ran "Deno: enable" Ran "Civet: Restart Civet Language Server"Step 4 did result in the file ./.vscode/settings.json containing
{ "deno.enable": true }However, when viewing my Civet file, my top-level awaits still have that red underline which pops up the message:
Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.typescript(1378)"
Note that when using Deno, there is no TypeScript configuration file. Deno supports modern TypeScript features like top-level await out of the box.
I also went into settings for the Deno extension and under "Deno.Config", set it to "deno.jsonc", my Deno config file which is at my project root, though I think this file should be automatically detected.
Additional info:
There's also a red underline under the name 'Deno', e.g. in Deno.exit()
I have this in my Civet file:
import {assert} from "jsr:@std/assert"but there's a red underline under the "jsr:@std/assert" with the message:
Cannot find module 'jsr:@std/assert' or its corresponding type declarations.typescript(2307)
Versions:
$ deno -v deno 2.6.5 $ civet -v 0.11.1 $ code -v 1.108.1 585eba7c0c34fd6b30faac7c62a42050bfbc0086 x64