DEV Community

Adam Crockett
Adam Crockett

Posted on

How to melt your processor

Recently I have been building a software development lifecycle for Java RhinoJS, enhanced with Typescript backend.

We write JavaScript and get .ts feedback, its a nice middle-ground, I have never considered, I want the benefits of TS without the overhead of scaring others who don't know it (know your audience of developers).

In our product, we have some java classes injected into Rhino, and so I want type defs for when I write unit tests in our Mocha like Rhino framework.
I turn to code-generation, Node.js is actually used to run rhino, and build stuff, its looping through a bunch of .jar files, running jar tf TicTacToe.jar to get the contents, aka the structure in slash format

I do some string transforms to stdout and write all possilbe
java class path .class files to a ts file.

I got 380000 classes in a type myLib

:) fun

Discussion (2)

abhinav1217 profile image
Abhinav Kulshreshtha

380000 Classes... It feels at home to NPM project, But in Java. 不不不不不

adam_cyclones profile image
Adam Crockett Author

I made this library called "isNumber" 不 but seriously, this is enterprise scale so it's okay