foxpro 🐍
foxpro 🐍2y ago

How to use declarations from `vite/client`?

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)).
0 Replies
No replies yetBe the first to reply to this messageJoin