There is a huge advantage to using an existing language (JavaScript/TypeScript) like this, compared to creating new DSLs. There is simply such a big ecosystem to leverage in terms of development tooling (auto-complete etc), existing libraries and existing libraries.