SheetXL - v1.0.2
    Preparing search index...

    Type Alias RangeAnnotationEvent

    RangeAnnotationEvent:
        | {
            annotations: readonly RangeAnnotation[];
            replaced: readonly RangeAnnotation[];
            type: "added";
        }
        | { annotation: RangeAnnotation; type: "dismissed" }
        | { annotations: readonly RangeAnnotation[]; type: "cleared" }
        | { annotation: RangeAnnotation | null; type: "current" }
        | { annotation: RangeAnnotation | null; type: "hovered" }
        | { annotation: RangeAnnotation; type: "moved" }

    What changed, handed to addRangeAnnotationListener listeners. One event per change.

    Type Declaration

    • {
          annotations: readonly RangeAnnotation[];
          replaced: readonly RangeAnnotation[];
          type: "added";
      }

      One call's walk. replaced is what its replace dropped first (empty when it dropped nothing).

    • { annotation: RangeAnnotation; type: "dismissed" }

      One annotation, through dismissRangeAnnotation.

    • { annotations: readonly RangeAnnotation[]; type: "cleared" }

      Those removed by one clearRangeAnnotations.

    • { annotation: RangeAnnotation | null; type: "current" }

      The navigator moved: the new current annotation, or null when the cursor was cleared.

    • { annotation: RangeAnnotation | null; type: "hovered" }

      The annotation under the pointer, or null.

    • { annotation: RangeAnnotation; type: "moved" }

      An annotation's cells moved, or it went stale or came back.

    A writer that has to hear how the user dealt with its annotations reads dismissed and cleared rather than wrapping every way of dismissing: the tag, a list, a command and a clear all arrive the same way. Each event carries the annotations as they were when it happened.