JSAnyConv

org.getshaka.nativeconverter.NativeConverter$.JSAnyConv$
object JSAnyConv extends NativeConverter[Any]

Attributes

Graph
Supertypes
trait NativeConverter[Any]
class Object
trait Matchable
class Any
Self type
JSAnyConv.type

Members list

Value members

Concrete methods

def fromNative(ps: ParseState): Any

Convert a native Javascript type to Scala.js. Returns either A, or a String error.

Convert a native Javascript type to Scala.js. Returns either A, or a String error.

Attributes

Inherited methods

def fromJson(json: String): A

Convert a Json String to type A. Returns either A, or a String error.

Convert a Json String to type A. Returns either A, or a String error.

Attributes

Inherited from:
NativeConverter
def fromNative(nativeJs: Any): A

Convert a native Javascript type to Scala.js. Returns either A, or a String error.

Convert a native Javascript type to Scala.js. Returns either A, or a String error.

Attributes

Inherited from:
NativeConverter

Extensions

Extensions

extension (a: Any)(a: Any)
def toNative: Any

Convert a Scala.js type to native JavaScript.

Convert a Scala.js type to native JavaScript.

This is an extension method, so it's available on all types that derive NativeConverter. To use for other types, like Int, summon a NativeConverter and use: NativeConverter[Int].toNative(123)

Attributes

Inherited extensions

extension (a: A)(a: Any)
def toJson: String

Convert type A to a JSON string

Convert type A to a JSON string

Attributes

Inherited from:
NativeConverter