You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot generate typescript declaration file with errors like:
src/connection-manager/latency-monitor.js:2:1 - error TS9006: Declaration emit for this file requires using private name 'EventEmitter' from module '"events"'. An explicit type annotation may unblock declaration emit.
2 'use strict'
🙂 Expected behavior
Does not fail to build and generate the declaration files.
The text was updated successfully, but these errors were encountered:
importinternal= require('events');namespaceEventEmitter{// Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4export{internalasEventEmitter};}
Bug Report
🔎 Search Terms
🕗 Version & Regression Information
typescript@4.0.5
This happened from 15th, more precisely after DefinitelyTyped/DefinitelyTyped#50266 being merged and released.
⏯ Playground Link
I believe I cannot add JS here 😞
You can look into
libp2p
before this PR being merged libp2p/js-libp2p#846.Commit hash to use: d19401aa4cafcf2237af90b677c743b0ff0f871e. Just need
npm i && npm run build
💻 Code
🙁 Actual behavior
Cannot generate typescript declaration file with errors like:
🙂 Expected behavior
Does not fail to build and generate the declaration files.
The text was updated successfully, but these errors were encountered: