title: What is a typealias in Kotlin and how is it being used in this implementation?
body: <p>I see there is a typealias keyword being used and then the invoke method is being called on that "type"</p>
  
  <p>Can someone please provide insight into what this is and how it is being used?</p>
  
  <pre><code>typealias NewKittiesReceived = (Kitty) -&gt; Unit
  
  class KittyRepository {
      private val timer = Timer()
      private val random = Random()
      private val period = TimeUnit.SECONDS.toMillis(1)
  
      internal fun receiveNewKitties(newKittiesReceived: NewKittiesReceived) {
          timer.schedule(object : TimerTask() {
              override fun run() {
                  val nameRandom = random.nextInt(KittyNames.values().size)
                  val ageRandom = random.nextInt(5)
  
                  newKittiesReceived.invoke(Kitty(KittyNames.values()[nameRandom].name, ageRandom))
              }
          }, period, period)
      }
  }
  </code></pre>