> I haven't seen a fully static transpiled language deal with that gracefully, but I'd love to be wrong about that!
Scala.js is specifically designed to be very good at this. You might want to give a shot, if you haven't already ;) Usually you would stay within the type-safe Scala code, or even talk to JavaScript libraries in a type-safe way. But it will always let you do anything you could do in JavaScript (it is one of its core language design decisions). If you want to do something especially weird, the syntax to do so might be pretty awkward, but in most cases it will feel very natural.