user79074
user79074

Reputation: 5300

type String is not a member of package scala.scalajs.js

I just upgraded from version 0.5.6 to 0.6.3 of the Scala js and now some of my code no longer compiles. I have defined the following object:

trait Call extends js.Object {
    val name: js.String = ???
    val params: js.Dictionary[String] = ??? 
}

Which gives me the following compiler error:

type String is not a member of package scala.scalajs.js

Should I just use the standard String?

Upvotes: 0

Views: 261

Answers (1)

sjrd
sjrd

Reputation: 22105

Yes, you should use the standard String.

Similarly, replace js.Boolean by Boolean, js.Number by Double, and js.Undefined by Unit.

See also the type correspondence table in the documentation.

Upvotes: 0

Related Questions