package akkaviz

import org.scalajs.dom._
import org.scalajs.dom.raw.Element

package object frontend {

  implicit class RichElement(elem: Element) {
    def onClick(f: () => Any): Unit = {
      elem.addEventListener("click", { (e: Event) => f() }, true)
    }

    def onEnter(f: () => Any): Unit = {
      elem.addEventListener("keydown", { (e: KeyboardEvent) =>
        val enterKeyCode = 13
        if (e.keyCode == enterKeyCode)
          f()
      }, true)
    }
  }

  type ActorPath = String

  case class ActorLink(from: ActorPath, to: ActorPath)

}

package akkaviz

import org.scalajs.dom._
import org.scalajs.dom.raw.Element

package object frontend {

  implicit class RichElement(elem: Element) {
    def onClick(f: () => Any): Unit = {
      elem.addEventListener("click", { (e: Event) => f() }, true)
    }

    def onEnter(f: () => Any): Unit = {
      elem.addEventListener("keydown", { (e: KeyboardEvent) =>
        val enterKeyCode = 13
        if (e.keyCode == enterKeyCode)
          f()
      }, true)
    }
  }

}

--- 
+++ 
@@ -19,4 +19,8 @@
     }
   }
 
+  type ActorPath = String
+
+  case class ActorLink(from: ActorPath, to: ActorPath)
+
 }
Define ActorLink and ActorPath alias
