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

TypeScript definition #19

Open
blakeembrey opened this issue Apr 1, 2016 · 2 comments
Open

TypeScript definition #19

blakeembrey opened this issue Apr 1, 2016 · 2 comments

Comments

@blakeembrey
Copy link

If you're providing a TypeScript definition, can you provide it in external module format? It would allow NPM users to start using it without configuration. See http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html.

@jackbearheart
Copy link
Owner

@blakeembrey I can do that if it will be useful. I'm not a ts user, and I've only accepted a ts definition as a PR. More PRs welcome. Since I don't know ts I don't know whether the existing internal module definition is preferable to the external module definition.

It sounds like you want the declare module... line to be removed, so that the definition just exports functions, and then the package.json can include "typings": "./lib/email-addresses.d.ts". Is that correct?

@blakeembrey
Copy link
Author

Yes, absolutely correct. If it's an issue, I can submit a PR to correct it for you 😄 I don't actually use the module myself, just wanted to help out with a common mistake I see around.

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

No branches or pull requests

2 participants