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

adds typing for react-selectize #257

Closed
wants to merge 1 commit into from
Closed

Conversation

thitemple
Copy link

Filling in these fields will make it easier for us to review:

Typings URL: https://github.com/furqanZafar/react-selectize
Source URL: https://github.com/furqanZafar/react-selectize

Thanks for contributing!

@unional
Copy link
Member

unional commented Mar 31, 2016

Where is the typings? Seems like you are pointing to the source?

@blakeembrey
Copy link
Member

I see them https://github.com/furqanZafar/react-selectize/blob/develop/src/index.d.ts. @vintem, what you probably want to do instead is add typings to package.json - see http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html

@thitemple
Copy link
Author

Hi @blakeembrey, what I really want to do is to have the typings available to the typings tool. I've posted a question about creating typings and I understood that I could do that in the original project.

I guess that's not the case. Do I really have to create another project just for the typings? The project react-selectize has the typings.json on its root. That's not enough?
Thanks for the help

@blakeembrey
Copy link
Member

@vintem No, you absolutely can. In this case, since you're distributing the the definition yourself, you can have users do typings install npm:react-selectize. Is that reasonable? If you want TypeScript users to use the definitions, it'd be better to allow them to do nothing. E.g. it just works, which is what happens when you use package.json instead.

The only thing you need to fix, in either case, is https://github.com/furqanZafar/react-selectize/blob/develop/src/index.d.ts#L94. You need to unwrap this module declaration and make it an external module declaration. E.g. Replace declare module '...' { export = ... } with just export =.

@thitemple
Copy link
Author

Thanks for the help! I think I understand now, so the typings project is just for the cases where the original project does not host the typings file.

@blakeembrey
Copy link
Member

Yes 👍

@blakeembrey blakeembrey mentioned this pull request Apr 15, 2016
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.

3 participants