To be useful, this kind of static-analysis tool would have to run much earlier in the build and indicate the call-site of the scalajs-invalid term as soon as I type it. More like a linting tool.
I used to think that it’s an implementation defined behavior about whether
java.lang.Integer are the same runtime type. Now I understand Scala.js also mimics that behavior.