Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove CustomEvent polyfill (#2652)
The EventTarget implementation of libp2p contained workarounds for incomplete runtime support for the feature. One of the workarounds was specifically marked to be removed once CustomEvent was implemented in NodeJS and the [upstream ticket](nodejs/node#40678) was closed. This has happened two years ago. The implementation of the standard event in Node18 and the subsequent removal of the experimental flag in Node19 broke the current workaround and causes tsc to error. Some of these were suppressed with @ts-ignore, others were not. This fix closes #2420. The fix removes the workaround as instructed by the source code and restores compatibility with recent versions of Node types.
- Loading branch information