Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add dts #216

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bigbigDreamer
Copy link

Adds a hard dependency on @types/pubsub-js, so that any user who installs the main lib automatically gets the types.

Package managers do not install devDependencies when you install a library. They install just dependencies (and in the case of NPM 7, peerDependencies as well, although that's a separate topic).

@bigbigDreamer
Copy link
Author

@mroderick

@lesichkovm lesichkovm mentioned this pull request Dec 6, 2022
@Lewiscowles1986
Copy link

Lewiscowles1986 commented Dec 7, 2022

This feels like it's going in the opposite direction to the one that I mentally hold between library and support-library.

I Could definitely see an argument for the @types/pubsub-js being bundled in a [separate] meta-package, or itself at least suggesting use of PubSubJS.

This patch, feels like it would at-least conceptually make this library dependent on some user-supplied types (which may or may not be accurate) and are not under control of the author(s) of this library (support-library).

Are there other examples of npm libraries that bundle @types? I know Jest at least seems to require separate npm i for it's types package in all the repos we maintain in my job. Open to learning on this, but thought I'd share thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants