imagekit-react
imagekit-react copied to clipboard
Rewrite SDK in Typescript
Are there any types for this? Are they in progress?
Hi @arpitdalal , not at the moment. We plan to rewrite this SDK in TS in this quarter.
oh nice! I can help by rewriting some components to TS on a new branch and making a PR
Thanks. Can you share a rough idea of how do you plan to do this without making any changes in test cases under tests folder? We did this in Node js sdk to avoid any regression.
I went through the codebase of the Node.js SDK, what extra did you do so the tests didn't break? I mean your jest tests for this SDK don't rely on any data types, they just expect something and that component either from a .jsx
or a .tsx
returns the same thing.
I am sorry if I am missing something here.
No that's it actually. You can start the work and submit the PR. However I should mention that we will try to pick review and testing on best effort basis at the moment.
Okay, that's great! I am sorry, I couldn't quite understand wdym by "we will try to pick review and testing on best effort basis at the moment."?
I meant review and test the PR.
oh okay, yes that's totally fine.
@arpitdalal did you make any progress with this?
I have not unfortunately
I created a .d.ts for my app that is based on the types in some of their other libraries: https://gist.github.com/pip8786/cb4249d52a5f05d4a7d64ac38df80abe
Seems to work for my use case.
I made a very small typescript hook wrapper for imagekit-javascript
that I've been using. It doesn't have as much functionality as this library, but I wasn't really using IKImage
or IKUpload
anyway, and preferred to use my own implementations.
Version 2.0.0 is written in Typescript.