D
Deno

help

How to use declarations from `vite/client`?

Ffoxpro6/29/2023
There are declarations: https://esm.sh/v126/vite@4.3.9/client.d.ts According to documentation, I need to specify types in compilerOptions:
"compilerOptions": {
"allowJs": false,
"lib": [
"dom",
"dom.iterable",
"dom.extras",
"deno.ns"
],
"jsx": "preserve",
"jsxImportSource": "solid-js",
"strict": false,
"types": [
"vite/client"
]
},
"compilerOptions": {
"allowJs": false,
"lib": [
"dom",
"dom.iterable",
"dom.extras",
"deno.ns"
],
"jsx": "preserve",
"jsxImportSource": "solid-js",
"strict": false,
"types": [
"vite/client"
]
},
and in import_map.json I have:
"vite": "npm:vite",
"vite/client": "npm:vite/client",
"vite": "npm:vite",
"vite/client": "npm:vite/client",
seems like Deno resolves vite/client fine, but doesn't merge declarations (pic, Property 'env' does not exist on type 'ImportMeta'. deno-ts(2339)).

Looking for more? Join the community!