imgix / imgix-url-params

Organized, machine-friendly documentation of imgix's URL parameters
BSD 2-Clause "Simplified" License
39 stars 7 forks source link

feat: add types declaration file #13

Closed luqven closed 1 year ago

luqven commented 1 year ago

Description

related issues: https://github.com/imgix/js-core/issues/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

JamieMason commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 sherwin@imgix.com to discuss that further if desired.

JamieMason commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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

JamieMason commented 1 year ago

You're welcome