function isBeginningOfElement(token, belongingNode) {
    /** @type {TSESTreeNode | null} */
    let node = belongingNode

    while (node != null && node.parent != null) {
      /** @type {TSESTreeNode} */
      const parent = node.parent
      if (parent.type === 'TSTypeParameterInstantiation') {
        return (
          parent.params.length >= 2 &&
          parent.params.some(
            (param) =>
              getFirstAndLastTokens(param).firstToken.range[0] ===
              token.range[0]
          )
        )
      }
      if (parent.type === 'TSTupleType') {
        return parent.elementTypes.some(
          (element) =>
            element != null &&
            getFirstAndLastTokens(element).firstToken.range[0] ===
              token.range[0]
        )
      }

      node = parent
    }

    return false
  }
Check whether a given token is the first token of:

- A parameter of TSTypeParameterInstantiation
- An element of TSTupleType

@param {Token} token The token to check.
@param {TSUnionType | TSIntersectionType} belongingNode The node that the token is belonging to.
@returns {boolean} `true` if the token is the first token of an element.