toPrimitive

abstract fun toPrimitive(hint: PrimitiveHint): JsValue(source)

ToPrimitive with hint, which can run the object's script.