Created
November 29, 2016 20:13
-
-
Save jhegedus42/9c478a07ff4244dac7581424d88a2e1c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@js.native | |
trait Props extends js.Object { | |
var value: String = js.native | |
var index: Int = js.native | |
var key: String = js.native | |
} | |
case class ScalaProps(val value:String, val index:Int, val key:String) | |
// how do i convert ScalaProps to Props ? | |
def testCompBScala(sp:ScalaProps)={ | |
val p=js.use(sp).as[Props] | |
TestCompB(p) | |
} | |
gives : | |
104. Waiting for source changes... (press enter to interrupt) | |
[info] Compiling 1 Scala source to /Users/joco/dev/scala.js/react/sjs-playaround/stable/target/scala-2.11/classes... | |
[error] /Users/joco/dev/scala.js/react/sjs-playaround/stable/src/main/scala/example/ScalaJSExample.scala:80: example.SortableItem.ScalaProps does not export a setter value: String. | |
[error] val p=js.use(sp).as[Props] | |
[error] ^ | |
[error] one error found | |
[error] (compile:compileIncremental) Compilation failed | |
[error] Total time: 1 s, completed Nov 29, 2016 10:11:07 PM | |
105. Waiting for source changes... (press enter to interrupt) | |
for line 13 here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment