function buildPseudoNthOfTypeVElementMatcher(testIndex) {
  return (element) => {
    const elements = element.parent.children.filter(
      /** @returns {e is VElement} */
      (e) => isVElement(e) && e.rawName === element.rawName
    )
    return testIndex(elements.indexOf(element), elements.length)
  }
}
Build VElementMatcher for :nth-xxx-of-type()
@param {(index: number, length: number)=>boolean} testIndex
@returns {VElementMatcher}