airframe
                                
                                
                                
                                    airframe copied to clipboard
                            
                            
                            
                        Add PackSupport/UnpakcSupport trait to specify custom codec
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.
object A { def unapply(s: String): Option[A] = ... } can be found even in Scala.js, so implementing only PackSupport is feasible