BlouflashB
Denoβ€’13mo ago
Blouflash

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";


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"
  }
}


The Code:

import type { ErrorEvent } from "@types/ws";
Was this page helpful?