function inspectDetectedGlobalVariables(name, paths) {
    // skip if module global
    if (ignoredRefs.includes(name)) {
      return
    }
    // expose API as granularly as possible
    paths.forEach((path) => {
      const parents = getParents(path)
      const {
        path: keyPath,
        identifierUse,
        parent,
      } = inspectIdentifierForDirectMembershipChain(
        name,
        path.node,
        /** @type {import('./inspectPrimordialAssignments').MemberLikeExpression[]} */ (
          parents
        )
      )
      // if nested API lookup begins with a globalRef, drop it
      if (globalRefs.includes(keyPath[0])) {
        keyPath.shift()
      }
      // inspect for destructuring
      let destructuredPaths
      if (
        parent.type === 'VariableDeclarator' &&
        ['ObjectPattern', 'ArrayPattern'].includes(parent.id.type)
      ) {
        destructuredPaths = inspectPatternElementForKeys(parent.id).map(
          (partial) => [...keyPath, ...partial]
        )
      } else {
        destructuredPaths = [keyPath]
      }

      destructuredPaths.forEach((path) => {
        // skip if global and only used for detecting presence
        if (path.length === 0) {
          return
        }
        // submit as a global usage
        const pathString = path.join('.')
        maybeAddGlobalUsage(pathString, identifierUse)
      })
    })
  }
@param {string} name
@param {import('./findGlobals').IdentifierOrThisExpressionNodePath[]} paths