Foam is inspired by roam research, which is a big note taking app for researchers, scholars... That means a big, paying community that could be won over from proprietary alternatives.
Their code is written almost solely in typescript.
Treymo talked about this on his plugin page (note link graph ui) plugin:
I will probably even be able to contribute, even though I am not a Javascript guy, but I suppose it does no harm to learn Javascript.