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

feat: add types declaration file #13

Closed
luqven opened this issue Sep 26, 2022 · 8 comments
Closed

feat: add types declaration file #13

luqven opened this issue Sep 26, 2022 · 8 comments
Labels
enhancement good first issue Good first issue for new contributors

Comments

@luqven
Copy link
Contributor

luqven commented Sep 26, 2022

Description

related issues: imgix/js-core#308
react-imgix types example: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/8e8454d6da5594f313f3c9e1a80b4ce59b20465b/types/react-imgix/index.d.ts

It would be useful to add a .d.ts file in the dist folder so that TypeScript users can do type checking/leverage IDE auto-completion for imgix params.

The declaration file should match react-style params and include a declaration for every param available in dist/parameters.json

@luqven luqven added enhancement hacktoberfest Good first issue for hacktober contributors labels Sep 26, 2022
@luqven luqven added good first issue Good first issue for new contributors and removed hacktoberfest Good first issue for hacktober contributors labels Nov 10, 2022
@JamieMason
Copy link

JamieMason commented Nov 15, 2022

I've had a go at this here: https://github.com/JamieMason/typescript-imgix-url-params. Happy to make changes over there then hand it over upstream if it seems a suitable fit.

EDIT: The generated types look like this https://unpkg.com/typescript-imgix-url-params/dist/index.d.ts.

@atlawrie
Copy link

Hi @JamieMason, thank you so much for having a go at this issue! We'll give it a proper look once the team is back after the holidays.

@sherwinski
Copy link
Contributor

Hey @JamieMason, thanks for putting in the time to build this out. I had a look through the project and tinkered with it locally - to me it work really well! For next steps, we'd need to work this into the build pipeline in an upstream project that outputs the distributables for imgix-url-params. To that end, would you be willing to transfer ownership of this project so that we can integrate it?

Also happy to discuss attribution and/or throw some imgix credits your way for the time you spent here. Feel free to reach out to me at [email protected] to discuss that further if desired.

@JamieMason
Copy link

Sounds good, I've sent an invite to @sherwinski to be a collaborator on that repo, you should then be able to transfer ownership from there when you're ready.

@sherwinski
Copy link
Contributor

@JamieMason thank you for the invite. Looks like I only have push access to the repo and might need higher permission (like admin) to initiate the transfer.

@JamieMason
Copy link

I don't see any permissions options, I've sent a transfer request to you instead so you can transfer it on again to imgix 👍

@sherwinski
Copy link
Contributor

Perfect, it's transferred over now. Thanks again for all your help 🎉

@JamieMason
Copy link

You're welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue Good first issue for new contributors
Projects
None yet
Development

No branches or pull requests

4 participants