DoubleConv

org.getshaka.nativeconverter.NativeConverter$.DoubleConv$
object DoubleConv extends NativeConverter[Double]

Infinity and NaN are not supported, since JSON does not support serializing those values.

Attributes

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

Members list

Value members

Concrete methods

def fromNative(ps: ParseState): Double

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 (d: Double)(d: Double)
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: Double)
def toJson: String

Convert type A to a JSON string

Convert type A to a JSON string

Attributes

Inherited from:
NativeConverter