Use Transpiled FlowJS or Typescript in Pure Javascript : i have question regarding FlowJS or Typescript (which quite popular these days).

While both do great job doing static type check, but not all project will be compatible with superset language.

So, how do i use transpiled superset language (preferable CommonJS) in PURE JS. If you came from Java, this questions similar to Scala in Java.

I have fair knowledge to setup Webpack, so expected answer is explaining how to use FlowJS and Typescript transpiled in CommonJS in Pure JS.