if (fiberToErrorsMap.has(id)) {
      fiberToErrorsMap.delete(id);
      fibersWithChangedErrorOrWarningCounts.add(id);
      flushPendingEvents();
    }
    updateMostRecentlyInspectedElementIfNecessary(id);
  }
  function clearWarningsForFiberID(id: number) {
    if (fiberToWarningsMap.has(id)) {
      fiberToWarningsMap.delete(id);
      fibersWithChangedErrorOrWarningCounts.add(id);
      flushPendingEvents();
    }
    updateMostRecentlyInspectedElementIfNecessary(id);
  }
  function updateMostRecentlyInspectedElementIfNecessary(
    fiberID: number,
  ): void {
    if (
      mostRecentlyInspectedElement !== null &&
      mostRecentlyInspectedElement.id === fiberID
    ) {
      hasElementUpdatedSinceLastInspected = true;
    }
  }
  
  function onErrorOrWarning(