SquidgicalS
Denoβ€’14mo ago
Squidgical

Equivalent of tsconfig `includes`

I'm setting up a sveltekit project in deno

svelte and sveltekit make a lot of use of ambient declarations to provide types for things which are not implemented in javascript, but instead they're injected or mapped at compiletime

usually, the includes are managed by sveltekit itself, creating a
.svelte-kit/tsconfig.json
file with the populated
includes
, which your root
tsconfig.json
extends from

Deno 2 doesn't seem to have any way of extending a tsconfig, so I'll have to include the necessary files myself (thankfully, they're limited and very predictable)

I can't find any way in
deno.json
to do the same thing that tsconfig
includes
does. I've tried
compilerOptions.types
, but this doesn't allow me to use svelte globals or import from special modules (eg
$env/static/public
)

---

in terms of running the app, its fine, Vite is there to do the compilation, but the Deno LSP (in Zed) is reporting warnings and errors where they won't actually exist at runtime. If I knew how to convince deno to do what tsconfig
includes
does, this would go away
Was this page helpful?