I have spent the better part of two weeks grinding on getting Lodash supported in the tgo compiler. It has been a relentless game of whack-a-mole, constantly dealing with dependencies of dependencies deep down in the JavaScript ecosystem. It’s a process of taking ten steps forward, two steps back, and breaking UUID implementations just to get a Lodash function to compile.
But in the middle of this grind, I stumbled onto a massive breakthrough: I noticed that Lodash has JSDoc strings outlining the internal function types.
Not only were the JSDocs there, but the TypeScript compiler’s library has the built-in ability to parse that code. So, I added the capability for tgo to find those JSDocs and generate the typing information based directly on them. Immediately, right out of the gate, we jumped up a massive amount of support for Lodash.
It also sparked a much larger realization about how we build software, how we document it, and why dealing with legacy JavaScript is so agonizingly difficult.
The Myth of "Dead" Documentation






