airframe icon indicating copy to clipboard operation
airframe copied to clipboard

Add PackSupport/UnpakcSupport trait to specify custom codec

Open xerial opened this issue 6 years ago • 2 comments

xerial avatar Jun 13 '19 00:06 xerial

It turns out to be difficult to use in Scala.js. PackSupport is natural to implement, but UnpackSupport needs to be implemented as a static function in an object.

Basically, Surface needs to check the presence of UnpackSupport at compile time for Scala.js.

xerial avatar Mar 23 '20 15:03 xerial

object A { def unapply(s: String): Option[A] = ... } can be found even in Scala.js, so implementing only PackSupport is feasible

xerial avatar Aug 15 '21 18:08 xerial