redisgraph.js icon indicating copy to clipboard operation
redisgraph.js copied to clipboard

Refactor redisgraph.js to Typescript

Open DenisCarriere opened this issue 5 years ago • 10 comments

Refactor redisgraph.js to Typescript

Issue Ref: https://github.com/RedisGraph/redisgraph.js/issues/5

I was very surprised to see Redis wasn't using Typescript, it's rare to see new libraries built using CommonJS syntax.

DenisCarriere avatar Feb 19 '19 21:02 DenisCarriere

👏 👏 👏 👏

davidLeonardi avatar Feb 20 '19 08:02 davidLeonardi

I'll be sending more PR's once this is merged

DenisCarriere avatar Feb 20 '19 17:02 DenisCarriere

@gkorland would you prefer just adding the Typescript types instead of the entire code being refactored?

DenisCarriere avatar Feb 22 '19 23:02 DenisCarriere

@DenisCarriere I would prefer not to switch to TypeScript, if we need any special things that will help you TypeScript consume the client please feel free to send another PR

gkorland avatar Mar 24 '19 12:03 gkorland

looks like another one for definitely typed. It's a shame cause I can see they're already getting type errors that you've probably fixed in your refactoring eg https://github.com/RedisGraph/redisgraph.js/issues/19

renewooller avatar Aug 05 '19 00:08 renewooller

Thanks, @DenisCarriere. We decided not to refactor our current JS client to TypeScript. If you like, you can fork and modify it to a TypeScript client. When your work is done, we will be happy to add the reference to your repo.

DvirDukhan avatar Sep 15 '19 11:09 DvirDukhan

Just found redisgraph and this lib and was excited to start using it. Well, fired it up and went yarn add --dev @types/redisgraph.js and to my suprise there were no types there. I would tend to agree with the above, this is a fairly new project so I just expected it to be compatible with modern mainstream technologies. To be honest I'm a bit disappointed, now instead of being able to code away on a cool redisgraph project, I'm stuck to solve the typing problem myself which will seriously slow me down :-/.

For reference this was written 2016 and today I guess most people just expect any serious library to just work for typescript: https://staltz.com/all-js-libraries-should-be-authored-in-typescript.html

jonaskello avatar Nov 17 '19 08:11 jonaskello

Btw, forking a separate typescript client is probably not a good idea. There are no specific typescript libraries, there are only javascript libraries which provides typescript annotations. If this project does not want to use typescript annotations internally, then it should provide them externally on definetely typed which will then end up published as @types/redisgraph.js.

jonaskello avatar Nov 17 '19 09:11 jonaskello

Anything on approving this?

jdgamble555 avatar Feb 13 '22 00:02 jdgamble555

@jdgamble555 RedisGraph support was moved to node-redis see: https://github.com/redis/node-redis

gkorland avatar Feb 14 '22 19:02 gkorland