code: function hasRest(pattern) {
      for (let elem of pattern.elements) {
        if (isRestElement(t, elem)) {
          return true
        }
      }
      return false
    }
docs: Test if an ArrayPattern's elements contain any RestElements.