investtools / extensible-duck

Modular and Extensible Redux Reducer Bundles (ducks-modular-redux)
MIT License
147 stars 12 forks source link

Add Typescript support. #25

Open raaavanan opened 5 years ago

raaavanan commented 5 years ago

Extensible duck is a great utility to have. I have been using it many projects. it would be great if we have @types/extensible-duck for type script support.

akelmanson commented 5 years ago

Hi @raaavanan,

Due to dynamic design of extensible-duck, it's really hard to define TypeScript types for it. My first attempt is in this gist, but it became very complex and doesn't cover all features.

As a second attempt, I've rewritten it from scretch using a more static style and it looks like the right way. Check it out here. It would be great if you could help me improving and documenting it.

Thanks, André

nossbigg commented 4 years ago

Hi @raaavanan and @akelmanson , I've been toying around with extensible-duck for a day or two, and I've written some preliminary TS typedefs for it - I've raised an MR for it at DefinitelyTyped.

https://github.com/DefinitelyTyped/DefinitelyTyped/pull/48661

May be of interest to you all 🙂

nossbigg commented 4 years ago

FYI the MR has landed, enjoy! 🥳

@akelmanson you should be able to close this issue, since the type definitions are available on DefinitelyTyped 👍

https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/extensible-duck