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

Best way creating npm library. #6438

Closed
MartynasZilinskas opened this issue Jan 11, 2016 · 3 comments
Closed

Best way creating npm library. #6438

MartynasZilinskas opened this issue Jan 11, 2016 · 3 comments
Assignees
Labels
Docs The issue relates to how you learn TypeScript @types Relates to working with .d.ts files (declaration/definition files) from DefinitelyTyped

Comments

@MartynasZilinskas
Copy link

I have encountered a problem while creating npm library with Typescript. I have created a few react components. Creating declaration files and then combining all of them in one and declaring the module.

Where to put my .d.ts declarations when distributing npm package?

@kitsonk
Copy link
Contributor

kitsonk commented Jan 11, 2016

For an example of something that is built on TypeScript and is distributed on npm, take a look at RxJS. There are a lot of considerations to distributing your code on npm that are well outside of the scope of just TypeScript. You need to consider if you will distribute your code as CJS, UMD, ES6 (or even AMD) modules and what types of loaders you expect people to use your code with, etc.

@mhegazy
Copy link
Contributor

mhegazy commented Feb 19, 2016

We do not have a clear guidance here. we have some documentation https://github.com/Microsoft/TypeScript/wiki/Typings-for-npm-packages, but clearly this is not nearly sufficient.

@mhegazy mhegazy added Docs The issue relates to how you learn TypeScript @types Relates to working with .d.ts files (declaration/definition files) from DefinitelyTyped labels Feb 19, 2016
@MartynasZilinskas
Copy link
Author

I think we can close this issue.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Docs The issue relates to how you learn TypeScript @types Relates to working with .d.ts files (declaration/definition files) from DefinitelyTyped
Projects
None yet
Development

No branches or pull requests

4 participants