DenoDDeno
Powered by
FlowF
Denoβ€’14mo ago
Flow

`.svelte` file intellisense can't properly resolve imports in a Deno only project

I have a Deno workspace with:
- a
shared
shared
member which in the
deno.json
deno.json
has
"name": "@scope/shared"
"name": "@scope/shared"

- a
client
client
member which is Vite+Svelte and only uses Deno (no
package.json
package.json
)

everything works and builds perfectly fine however:
- if i try to
import { Foo } from "@scope/shared
import { Foo } from "@scope/shared
in a
.svelte
.svelte
file intellisense errors and cannot find it.
- it works fine in
.ts
.ts
and
.tsx
.tsx
files.
- also maybe of note is that if i instead change the import to be a path, like
"../../shared/mod.ts"
"../../shared/mod.ts"
it does find it, but it doesn't properly figure out types
- for example,
shared
shared
uses
zod
zod
and exports a function that takes in a
(msg: z.infer<R>) => void
(msg: z.infer<R>) => void
, that
z.infer<R>
z.infer<R>
isnt expanded into the actual type like it does outside of a
.svelte
.svelte
file
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Deno Imports
stephenSstephen / help
3y ago
Can't spawn a shell properly using Deno!
tarkovTtarkov / help
3y ago