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

[Question] Working with TypeScript

Open TomerSalton opened this issue 5 years ago • 3 comments

Hey,

Is there any plan to integrate with TypeScript? I'm currently having a workaround with esm, but I would rather not to use it.

If you're familiar with any other library for TypeScript that could be a solution as well, but I found this library as the best out there :)

TomerSalton avatar Jun 06 '19 13:06 TomerSalton

Hi,

This makes sense to me. In fact, some plans exist for a version 2.0, and if I ever get to that, I will probably write it in TypeScript, and generate the other formats.

Unfortunately, I've had other priorities for a while, and I don't expect that to change soon. So I'm afraid there are no immediate plans.

That said, if you'd like to work on TypeScript declarations for graph.js 1.x, you'll have my full support. This would be best done as a contribution to DefinitelyTyped. Let me know if you'd like to discuss.

Note that the graph.js documentation does already contain type information. So I expect writing the .d.ts file wouldn't be too difficult, if you're already used to Typescript.

mhelvens avatar Jun 08 '19 12:06 mhelvens

Hey,

I'm currently using this and works great in vanilla JS. Have there been any movements in creating a TS version (or d.ts)?

Even something with explicit any types would be good enough to suppress the warnings. 🤣

Cheers

JoshB2chE avatar Nov 20 '23 05:11 JoshB2chE

Hi Josh,

This library is kinda in maintenance mode. I'll fix bugs, but I have no plans to develop new features.

Though like I said in my 2019 comment above, I'll happily support / discuss a module contribution to DefinitelyTyped, should someone else want to work on that.

mhelvens avatar Dec 29 '23 21:12 mhelvens