I have the following in my shared project:
object PubKeyConverter {
implicit def toString(pubKey: PubKey): String = pubKey.toString
implicit def fromString(pubKeyString: String): PubKey = PubKey(pubKeyString)
}
case class PubKey(pubKey: String) {
def shortString = pubKey.replace("-----END PUBLIC KEY-----", "").takeRight(15)
override def toString: String = pubKey
}
When I import my PubKeyConverter._ into my Scala JS project,
any highlighted errors go away for the following
val something: String = PubKey("some pub key")
However, I get a type mismatch during the actual compile.
Any ideas as to why? The class itself works fine in both my JVM and JS projects.
Thanks