Why not use javascript, JSX and TypScript to produce PDF? You use the language you know already.

Since when is TypeScript a typesetting engine?

Why would you want to implement an entire typesetting engine yourself?