nest-emitter icon indicating copy to clipboard operation
nest-emitter copied to clipboard

node_modules/nest-emitter/nest-emitter.module.d.ts:3:35 - error TS2694: Namespace 'NodeJS' has no exported member 'Events'. 3 declare type NestEmitter = NodeJS.Events;

Open ahmedNY opened this issue 4 years ago • 4 comments

ahmedNY avatar Oct 26 '19 13:10 ahmedNY

@ahmedNY add "skipLibCheck": true to tsconfig.json

cncolder avatar Dec 12 '19 19:12 cncolder

@cncolder This does help

sanzhardanybayev avatar Jan 17 '20 19:01 sanzhardanybayev

A different hot fix that doesn't disable type checking of libraries that I found is putting the following into <project root>/typings/node/index.d.ts:

declare namespace NodeJS {
    // drop-in hotfix for nest-emitter on Node 12, awaiting new version
    export interface Events extends EventEmitter {}
}

This re-establishes the missing interface until a new version of this plugin is released with the latest changes from master.

mKeRix avatar Jan 19 '20 21:01 mKeRix

A different hot fix that doesn't disable type checking of libraries that I found is putting the following into <project root>/typings/node/index.d.ts:

declare namespace NodeJS {
    // drop-in hotfix for nest-emitter on Node 12, awaiting new version
    export interface Events extends EventEmitter {}
}

This re-establishes the missing interface until a new version of this plugin is released with the latest changes from master.

Works perfectly!

iAbhinav avatar May 01 '20 04:05 iAbhinav