Closed erfanium closed 4 years ago
Yes and no. If you (as the user of typed-emitter) are building an app, then yes.
If you happen to build a package that is then used by others and you expose a typed event emitter instance, then you will need to make the package a real dependency, since otherwise your .d.ts file will have an import from typed-emitter
without typed-emitter being installed, if I am not mistaken.
Pretty edge-casy, though. How about we suggest installing it as a dev dependency, but quickly outline when to make it a production dependency in a sentence or two?
I think if someone wants to make a typescript package, then package dependencies should be managed by the package owner, and he/she has to decide which method to choose (installing typed-emitter
as dependency or dev-dependency). We can only decide on the final user.
Thanks!
Why not install
typed-emitter
as a dev-dependency? This package doesn't have any runtime code and has no effect on the production javascript build