From b8e5696528ed3819c5f07c9d4da4507ae63213dd Mon Sep 17 00:00:00 2001 From: Avi Vahl Date: Mon, 14 Aug 2023 12:07:31 +0300 Subject: [PATCH] fix: improve compat with ts in node16/bundler mode when using the newer resolution and module modes of typescript, it could pick up `./wrapper.mjs`, which does not have a `.d.ts` file next to it. added the `"types"` condition to ensure imports to `"engine.io"` always get a type, no matter if they are sourced in commonjs or esm. --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 5753cdc1..39f79955 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "main": "./build/engine.io.js", "types": "./build/engine.io.d.ts", "exports": { + "types": "./build/engine.io.d.ts", "import": "./wrapper.mjs", "require": "./build/engine.io.js" },