VS Code API
    Preparing search index...

    Class NotebookRange

    A notebook range represents an ordered pair of two cell indices. It is guaranteed that start is less than or equal to end.

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Create a new notebook range. If start is not before or equal to end, the values will be swapped.

      Parameters

      • start: number

        start index

      • end: number

        end index.

      Returns NotebookRange

    Properties

    end: number

    The exclusive end index of this range (zero-based).

    isEmpty: boolean

    true if start and end are equal.

    start: number

    The zero-based start index of this range.

    Methods

    • Derive a new range for this range.

      Parameters

      • change: { end?: number; start?: number }

        An object that describes a change to this range.

        • Optionalend?: number

          New end index, defaults to this.end.

        • Optionalstart?: number

          New start index, defaults to this.start.

      Returns NotebookRange

      A range that reflects the given change. Will return this range if the change is not changing anything.