sjrd on 0.6.x
Remove dead code: specific coll… Adapt the signature of `js.Arra… Merge pull request #3554 from s… (compare)
sjrd on master
Fix analyzer cycle detection to… Add toString methods to analyze… Do not provide linked ClassInfo… and 1 more (compare)
sjrd on master
Remove Logger.success It is un… Make level helpers final Clean-up ScalaConsoleLogger cod… and 1 more (compare)
.setings(
fastOptJS in Compile := Attributed.blank(file("")),
fullOptJS in Compile := Attributed.blank(file(""))
)
Also when compiling under dotty, BaseCharsetTest
:
ClassType(Ljava_io_Serializable) expected but UndefType found for tree of type org.scalajs.ir.Trees$Undefined
this error when the case
is empty
could not reproduce it in a minimal sense
adding expectedChars
would get rid of those
See: https://github.com/scala-js/scala-js/pull/3756/files/9e0a1959e5a5d1d4f90b01bb70b7da071831a21c#diff-8e8b9776805c3c46a92816f342baf75dR225
class WebSocket {
def send(data: String): Unit = js.native
def send(data: Blob): Unit = js.native
def send(data: ArrayBuffer): Unit = js.native
}
val myData: String | Blob | ArrayBuffer = ???
websocketInstance.send(myData) // Error
[error] found : String
[error] required: String | org.scalajs.dom.Blob | scala.scalajs.js.typedarray.ArrayBuffer
[error] (which expands to) String | org.scalajs.dom.raw.Blob | scala.scalajs.js.typedarray.ArrayBuffer
[error] case d: String => webSocket.send(d)
I am trying to write a facade for this npm module:
https://github.com/canjs/can-ndjson-stream/blob/master/can-ndjson-stream.js
as below:
@JSImport("can-ndjson-stream", JSImport.Namespace)
@js.native
object CanNdJsonStream extends js.Object {
def ndjsonStream(response: ReadableStream[Uint8Array]): ReadableStream[js.Object] = js.native
}
But I get the following error:
scala.scalajs.js.JavaScriptException: TypeError: $i_can$002dndjson$002dstream.ndjsonStream is not a function
What am I missing?
@JSImport("can-ndjson-stream", JSImport.Namespace)
@js.native
class CanNdJsonStream extends ReadableStream[Uint8Array] {
def this(response: ReadableStream[Uint8Array]) = this()
}
Float#toString
work
[a,b,c]
. Note the lack of whitespace after the commas.