A lot of large and complex JS based projects rely on TypeScript for compile-time error detection that can mitigate unforeseen bugs. Seeing that the MermaidJS code base is still very small, it will not be a very heavy lift to migrate it to TypeScript.
@tylerlong would like to gather your thoughts on this and for the future direction of the code. To help with this, I am willing to volunteer in my spare time.