refactor(node-ws): enable isolated declarations (#1200)

pull/1206/head
Jonathan Haines 2025-06-09 19:23:05 +10:00 committed by GitHub
parent 50aa61d9c2
commit 8303d979f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
'@hono/node-ws': patch
---
Add explicit `CloseEvent` type

View File

@ -7,7 +7,7 @@ interface CloseEventInit extends EventInit {
/**
* @link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent
*/
export const CloseEvent =
export const CloseEvent: typeof globalThis.CloseEvent =
globalThis.CloseEvent ??
class extends Event {
#eventInitDict

View File

@ -5,6 +5,7 @@
"outDir": "dist",
"tsBuildInfoFile": "dist/tsconfig.build.tsbuildinfo",
"emitDeclarationOnly": false,
"isolatedDeclarations": true,
"types": ["node", "ws"]
},
"include": ["src/**/*.ts"],