deepai-js-client icon indicating copy to clipboard operation
deepai-js-client copied to clipboard

Convert to typescript

Open baragona opened this issue 3 years ago • 2 comments

We like types

baragona avatar Feb 13 '22 02:02 baragona

In the meantime I've created a declaration file on DefinitelyTyped which can be found here. You can install it with npm install -D @types/deepai. Unfortunately I only make use of torch-srgan and I couldn't find any documentation on what each endpoint returns so torch-srgan is the only model that has typed outputs. If anyone wants types for others more can easily be added by extending ModelOutputs and submitting a MR with updated typings.

NicolasNewman avatar Sep 06 '22 14:09 NicolasNewman

Wow! This is cool!

Yes, there are some quirks to how the deepAI API works which makes typescript an interesting challenge, namely the diverse nature of the APIs. additionally, the set of APIs may grow over time.

baragona avatar Sep 06 '22 17:09 baragona