Blouflash
Blouflash2mo ago

Deno cannot use ErrorEvent Type from @types/ws

The Error:
Cannot import type declaration files. Consider importing 'ws' instead of '@types/ws'.
import type { ErrorEvent } from "@types/ws";
Cannot import type declaration files. Consider importing 'ws' instead of '@types/ws'.
import type { ErrorEvent } from "@types/ws";
deno.json:
{
"name": "@blouflash/nimiq-rpc",
"version": "1.1.3",
"license": "MIT",
"exports": "./main.ts",
"imports": {
"@open-rpc/client-js": "npm:@open-rpc/client-js@^1.8.1",
"@types/node": "npm:@types/node@^22.10.5",
"@types/ws": "npm:@types/ws@^8.5.13"
}
}
{
"name": "@blouflash/nimiq-rpc",
"version": "1.1.3",
"license": "MIT",
"exports": "./main.ts",
"imports": {
"@open-rpc/client-js": "npm:@open-rpc/client-js@^1.8.1",
"@types/node": "npm:@types/node@^22.10.5",
"@types/ws": "npm:@types/ws@^8.5.13"
}
}
The Code:
import type { ErrorEvent } from "@types/ws";
import type { ErrorEvent } from "@types/ws";
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?