hydra icon indicating copy to clipboard operation
hydra copied to clipboard

Would be great if you could provide typescript definitions for hydra, hydra-express ...

Open peatidge opened this issue 7 years ago • 7 comments

Would be great if you could provide typescript definitions for hydra, hydra-express ...

peatidge avatar Jun 07 '17 04:06 peatidge

@peatidge I'm really warming up to this idea! We've been so busy lately that no one has gotten around to this. I'll post a link to this point in our slack channel to see if anyone will take up the task!

cjus avatar Jun 30 '17 13:06 cjus

I'd like to take a stab at this. Is this headed in the right direction?

https://github.com/flywheelsports/hydra/compare/master...zippyzow:typescript-declarations

zippyzow avatar Nov 15 '18 15:11 zippyzow

@zippyzow The current thought is to build Hydra 2.0 using TypeScript. But that would be for Hydra 2 and not Hydra 1.x - so it definitely makes sense to do that for 1.x in prep for 2. Thanks for tackling this!

cjus avatar Nov 15 '18 15:11 cjus

Hello all, I have made declarations for Hydra and Hydra express and added a layer above them to allow for the use of controllers , middlewares and dependency injection (using inversify js)

Also if you want to use the declarations alone the interfaces are exposed so you can use them however you wish

this is the package that provide all that https://www.npmjs.com/package/hydra-promoted

Also you can have a full installed architecture in typescript so you don't have to do anywork you can see that starter project. https://github.com/abdoolly/ts-hydraExpress

I hope this helps anybody and I am happy to help Please give me feedback or raise any issues. Thanks

abdoolly avatar Sep 10 '19 11:09 abdoolly

I wrote definitions for hydra and hydra-express too, but currently just using them in my private projects, maybe I rework them a bit and add a pr to DefinitelyTyped.

JustusFluegel avatar Nov 22 '20 13:11 JustusFluegel

Or here If you are welcome to add them to the package directly

JustusFluegel avatar Nov 22 '20 13:11 JustusFluegel

@Technikkeller that would be greatly appreciated. Let's chat on Hydra slack.

cjus avatar Nov 22 '20 15:11 cjus