Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"scripts": {
"build": "npm-run-all clean build:*",
"build:bundle": "microbundle -f modern,esm,cjs --no-compress src/{json,msgpack}.ts --generateTypes false",
"build:types": "tsc --emitDeclarationOnly",
"build:types": "tsc --emitDeclarationOnly && tsc --noEmit --moduleResolution bundler",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also makes sure types are correct under moduleResolution: bundler

"build:unpkg": "node scripts/generate-unpkg.js",
"clean": "rimraf dist",
"dev": "npm run build:bundle --watch",
Expand Down
2 changes: 1 addition & 1 deletion src/base.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import createDebug from 'debug';
import EventEmitter from 'eventemitter3';
import {EventEmitter} from 'eventemitter3';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2023-06-26 at 22 40 50

eventemitter3 exports EventEmitter with both named and root exports, but it confuses TypeScript because the default export is a namespace mixed with classes.

// Import under alias so DOM's WebSocket type can be used
import WebSocketIpml from 'isomorphic-ws';
import type {Except, Merge, SetOptional} from 'type-fest';
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "ESNext",
"strict": true,
"esModuleInterop": true,
"moduleResolution": "node",
"moduleResolution": "node16",
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"declaration": true,
Expand Down