vaguue / Ghidra.js

JavaScript bindings for Ghidra (Reverse Engineering framework)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typescript support

saidelike opened this issue · comments

This is a cool project. Thank you for writing it.

i was wondering if you have considered providing examples with typescript. It would ease importing other typescript libraries into our code.

Hello! I definitely wanted to do this, but decided to postpone TypeScript support for later because I rarely use it myself. But now that you've suggested it, I'll try to add it soon!

Hi, anything I can do to help with that? That would be really cool and I already have a project that is written in typescript that I could use to test it!

Hi! Sorry for the delay, been busy with my another project over-the-wire. Well, first of all, we should convert the Ghidra Java documentation (starting with the currentProgram definition) to a *.d.ts file, so type checking will work, secondly we should integrate a typescript building mechanism in the Ghidra itself, I think. Basically, we can check if a file has a .ts extension and run something like tsc with it and then proceed as with the usual JS scripting routine, so users will be able to run Typescript code from the Ghidra GUI. I can handle the last step easily, so if you will manage to do the first, it would be a great help! I will start integrating typescript compiler in the Ghidra this weekend.

Hi, I've started adding typescript definitions for Program and dependencies in https://github.com/saidelike/Ghidra.js/tree/typescript/typings (e.g. for the Program). Hopefully this is helpful. Feel free to take them and integrate them to your repo or I can do a PR if you prefer.

Thank you, PR would be nice ❤️