Targeting build systems seems like a great fit as well, since as you pointed out the build DAG is naturally a graph.
When you mentioned games programming, I thought of Dream's visual programming: https://youtu.be/eMRp3QMAkz8?t=773
I love the idea of using typescript types to define visual code atoms. We do a very simple version of that to create our Blockly blocks, e.g. block definition: https://github.com/microsoft/pxt-microbit/blob/master/libs/r... although I'm sure you could take that much farther.
We run TSC in the browser in a worker thread, here's an example, in case that helps: https://github.com/microsoft/pxt/blob/master/pxtcompiler/emi... We use TSC for typechecking and our own typescript compiler for compiling down to ARM assembly.