abramenal / cypress-file-upload

File upload testing made easy
https://npm.im/cypress-file-upload
MIT License
496 stars 89 forks source link

feat: improve types #256

Closed abramenal closed 3 years ago

abramenal commented 3 years ago

Checklist:

Summary of changes

Fix issue with type interface. Add exact type for encoding.

Linked issues

Closes #224

paulblyth commented 3 years ago

@abramenal would you consider a re-write in TS to save manually keeping types in sync? I can help out

abramenal commented 3 years ago

@paulblyth I was thinking about that multiple times by now haha 😃 It will indeed be beneficial as least by making the further support easier with types (and possibly easier contribution process), but couldn't convince myself fully in spending effort to that instead of some bugs or docs update. Apart from that, I am not aware how good and easy Cypress internal types are. I remember some struggle with their async stuff while using it in JS, so it could be even more when doing types there.

But in any case I see this as an inevitable step in the future. So if you are interested, I am happy to support 💪 https://github.com/abramenal/cypress-file-upload/issues/263

Apart from that, if you have any ideas on improving current approach/design/API/whatever – I'm totally open for that too