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 declarations #46

Open
sbliven opened this issue Jul 12, 2018 · 4 comments
Open

Typescript declarations #46

sbliven opened this issue Jul 12, 2018 · 4 comments

Comments

@sbliven
Copy link

sbliven commented Jul 12, 2018

I am interested in using color-space in a typescript project. To this end I have created type declarations for the library (https://github.com/sbliven/chromanaut/blob/master/color-space.d.ts). I would like to make these available to other projects. This can be done in a few ways depending on the desired integration with the javascript color-space package.

  1. Include index.d.ts in the package directory. This has the benefit of keeping the type definitions and the javascript in the same repository, so the versions should always match. However, it would require that new pull requests modify the index.d.ts file to reflect any changes to the javascript API.

  2. Type declarations can be included in the DefinitelyTyped repository. This makes the process independent of the maintainers here, but runs a greater risk that the type information will be out of date.

Both methods are widely used. I'm happy to help maintain the declarations regardless of which approach is preferred by the community here.

@dy
Copy link
Member

dy commented Jul 12, 2018

@sbliven thanks for the interest. Sure, method 1 will work well, I will be glad to approve the PR.

@nstringham
Copy link

is there an update on this?

@dy
Copy link
Member

dy commented Jul 1, 2021

@nstringham PR welcome.

@sbliven
Copy link
Author

sbliven commented Jul 7, 2021

I haven't worked on my chromonaut project in years now. I will probably not get around to a PR unless someone really needs it. I guess my previous definition file will need to be updated somewhat.

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

3 participants