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
src/index.ts(3,35): error TS4020: Extends clause of exported class 'Test' has or is using private name 'EventEmitter'.
I'm new to Typescript, so in an attempt to do the right thing I went out and read a bunch of docs. My understanding was that I needed to somehow export EventEmitter so the module has everything it needs available publicly. So I tried every export form I could think of, but nothing worked.
I did even more research and discovered DefinitelyTyped/DefinitelyTyped#7439. This is exactly what I'm experiencing, along with a second test repo which seems to indicate that this problem goes away with an older declaration. This all leaves me wondering, as a new Typescript user, where the issue lies.
Later I found #6307, asked for guidance there, and was told to file another issue. So, here it is. :) Is this an issue in the official eventemitter3 declaration that they need to fix, or is it a TS bug? I'll note that everything seems to work as long as I don't export the class that descends from EventEmitter, so if there was a problem with the declaration then I'd expect that to surface regardless of whether I exported the subclass.
Thanks. Using Typescript 1.8.9.
The text was updated successfully, but these errors were encountered:
I'm trying to accomplish this but am told:
src/index.ts(3,35): error TS4020: Extends clause of exported class 'Test' has or is using private name 'EventEmitter'.
I'm new to Typescript, so in an attempt to do the right thing I went out and read a bunch of docs. My understanding was that I needed to somehow export EventEmitter so the module has everything it needs available publicly. So I tried every export form I could think of, but nothing worked.
I did even more research and discovered DefinitelyTyped/DefinitelyTyped#7439. This is exactly what I'm experiencing, along with a second test repo which seems to indicate that this problem goes away with an older declaration. This all leaves me wondering, as a new Typescript user, where the issue lies.
Later I found #6307, asked for guidance there, and was told to file another issue. So, here it is. :) Is this an issue in the official eventemitter3 declaration that they need to fix, or is it a TS bug? I'll note that everything seems to work as long as I don't export the class that descends from
EventEmitter
, so if there was a problem with the declaration then I'd expect that to surface regardless of whether I exported the subclass.Thanks. Using Typescript 1.8.9.
The text was updated successfully, but these errors were encountered: