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

How to add new typings #13

Open
thitemple opened this issue Mar 24, 2016 · 3 comments
Open

How to add new typings #13

thitemple opened this issue Mar 24, 2016 · 3 comments

Comments

@thitemple
Copy link

Hi I'd like to colaborate with some typings I'm using and I'd like to understand the best way to do it.

Let's say for instance Immutable-js. The project already have the d.ts file, so I don't have to create it. Should I create a repository on github for the typings.json? Or would it be better to add the file to their repository?

Also, in that case, what's the difference between the main and the browser properties for the typings.json?

Finally, in the example used in the docs for the debug.json version file, there's a hash there, I could no find a commit related to that hash? From where that hash came?

Thanks

@blakeembrey
Copy link
Member

Let's say for instance Immutable-js. The project already have the d.ts file, so I don't have to create it. Should I create a repository on github for the typings.json? Or would it be better to add the file to their repository?

Their repo is best, Typings is a good fallback - use your own repo for type definitions. This is described https://github.com/typings/registry#contributing.

Also, in that case, what's the difference between the main and the browser properties for the typings.json?

See https://github.com/typings/typings/blob/master/docs/faq.md#how-do-i-write-typings-definitions, it has a formal definition.

Finally, in the example used in the docs for the debug.json version file, there's a hash there, I could no find a commit related to that hash? From where that hash came?

https://github.com/typings/registry/blob/master/npm/debug.json#L3 is typed-typings/npm-debug@0e398cb.

@thitemple
Copy link
Author

OK, I guess I understand a few things better. I still have some questions. If I'm writing the typings for a package that's only intended to be used on the browser, should I still have the config for main and browser? Both will then point to the same file?

Thanks for the help

@blakeembrey
Copy link
Member

Still use main and document that's it's made for browsers. It's pretty much the same approach as NPM packages there. Typings 1.0 will try to tidy up this issue/confusion.

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