Trevor
10/15/2019, 8:50 PM.d.ts
file with dukat
? https://github.com/Kotlin/dukatbashor
10/16/2019, 5:49 PMbashor
10/16/2019, 5:50 PMTrevor
10/22/2019, 11:07 PMdukat
and managed to generate a JSON representation of the nodes visited in the translator-string
project. I just wanted to know if there was some util that's already there.
hmm, what do you mean by I can use typescript? Is their a tsc
flag or something I can use? I've read this: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API and my main concern is I'm not sure in a .d.ts
that I would accurately get what is exported out of it. Since I'm essentially just using dukat
to eventually output clojurescript
I figured it would be good to leverage since all the hard work of breaking down all the exports is already done.
I'm not sure if I'm using the term AST correctly, mostly I just want to know what classes and objects are exported with their members and arguments.
dukat
does add a bunch of imports no matter what which makes the JSON a bit bigger than what I need it for, but here's what leftpad's index.d.ts looks like (actual useful stuff near the bottom)
https://gist.github.com/trevordilley/bb90003da54d5c71f4ce1aca4c3b2b1c
Something nice about using `dukat`'s representation is it breaks up all the types of args, which in the future might be useful to generate clojurescript spec tests.