Open gustavojb92 opened 1 year ago
The error occurred because the class is exported as named export whereas you imported it as a default import. So instead of
import Emitter from "tiny-emitter";
, you should import it as import { TinyEmitter } from "tiny-emitter";
according to the d.ts file.
Edit: The d.ts file from the npm registry is incomplete compared to the file on github. Hence the error. Otherwise import Emitter from "tiny-emitter";
should work!
I'm a starter and I hope you beg my pardon cuz maybe I'm looking a little stupid for you, but, I can't solve that problem. I created a util called bus, and I am trying to use the Emitter with TS :
but I received that error:
I hope you can help me.