Wednesday 7 June 2017

What is the correct way to use the definitelyscala node facade in scala-js?

There's something fundamental I'm missing about using facades with scala-js.

Obviously, this is wrong:

package foo.webapp
import com.definitelyscala.node.util.Util
import scala.scalajs.js.JSApp

object FooApp extends JSApp {
    override def main(): Unit = {
        Util.debug("debug")
    }
}

because I get:

[error] TypeError: Cannot read property 'debug' of undefined

What is the correct way to do this?

Many thanks!



via Mike

No comments:

Post a Comment