Skip to content

Commit f458455

Browse files
authored
fix: fix type error with moduleResolution node16 (#333)
1 parent d6244bb commit f458455

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"scripts": {
5050
"build": "npm-run-all clean build:*",
5151
"build:bundle": "microbundle -f modern,esm,cjs --no-compress src/{json,msgpack}.ts --generateTypes false",
52-
"build:types": "tsc --emitDeclarationOnly",
52+
"build:types": "tsc --emitDeclarationOnly && tsc --noEmit --moduleResolution bundler",
5353
"build:unpkg": "node scripts/generate-unpkg.js",
5454
"clean": "rimraf dist",
5555
"dev": "npm run build:bundle --watch",

src/base.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import createDebug from 'debug';
2-
import EventEmitter from 'eventemitter3';
2+
import {EventEmitter} from 'eventemitter3';
33
// Import under alias so DOM's WebSocket type can be used
44
import WebSocketIpml from 'isomorphic-ws';
55
import type {Except, Merge, SetOptional} from 'type-fest';

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"module": "ESNext",
55
"strict": true,
66
"esModuleInterop": true,
7-
"moduleResolution": "node",
7+
"moduleResolution": "node16",
88
"skipLibCheck": true,
99
"forceConsistentCasingInFileNames": true,
1010
"declaration": true,

0 commit comments

Comments
 (0)