GraphiQL API Documentation
    Preparing search index...

    A range in the editor. (startLineNumber,startColumn) is <= (endLineNumber,endColumn)

    Index

    Constructors

    • Parameters

      • startLineNumber: number
      • startColumn: number
      • endLineNumber: number
      • endColumn: number

      Returns Range

    Properties

    endColumn: number

    Column on which the range ends in line endLineNumber.

    endLineNumber: number

    Line number on which the range ends.

    startColumn: number

    Column on which the range starts in line startLineNumber (starts at 1).

    startLineNumber: number

    Line number on which the range starts (starts at 1).

    Methods

    • Create a new empty range using this range's end position.

      Returns Range

    • Create a new empty range using this range's start position.

      Returns Range

    • Test if position is in this range. If the position is at the edges, will return true.

      Parameters

      • position: IPosition

      Returns boolean

    • Test if range is in this range. If the range is equal to this range, will return true.

      Parameters

      • range: IRange

      Returns boolean

    • Moves the range by the given amount of lines.

      Parameters

      • lineCount: number

      Returns Range

    • Test if this range equals other.

      Parameters

      • other: IRange | null | undefined

      Returns boolean

    • Return the end position (which will be after or equal to the start position)

      Returns Position

    • Return the start position (which will be before or equal to the end position)

      Returns Position

    • A intersection of the two ranges.

      Parameters

      • range: IRange

      Returns Range | null

    • Test if this range is empty.

      Returns boolean

    • A reunion of the two ranges. The smallest position will be used as the start point, and the largest one as the end point.

      Parameters

      • range: IRange

      Returns Range

    • Create a new range using this range's start position, and using endLineNumber and endColumn as the end position.

      Parameters

      • endLineNumber: number
      • endColumn: number

      Returns Range

    • Create a new range using this range's end position, and using startLineNumber and startColumn as the start position.

      Parameters

      • startLineNumber: number
      • startColumn: number

      Returns Range

    • Test if range is strictly in this range. range must start after and end before this range for the result to be true.

      Parameters

      • range: IRange

      Returns boolean

    • Returns IRange

    • Transform to a user presentable string representation.

      Returns string

    • Test if the two ranges are intersecting. If the ranges are touching it returns true.

      Parameters

      • a: IRange
      • b: IRange

      Returns boolean

    • Test if the two ranges are touching in any way.

      Parameters

      • a: IRange
      • b: IRange

      Returns boolean

    • Create a new empty range using this range's end position.

      Parameters

      • range: IRange

      Returns Range

    • Create a new empty range using this range's start position.

      Parameters

      • range: IRange

      Returns Range

    • A function that compares ranges, useful for sorting ranges It will first compare ranges on the endPosition and then on the startPosition

      Parameters

      • a: IRange
      • b: IRange

      Returns number

    • A function that compares ranges, useful for sorting ranges It will first compare ranges on the startPosition and then on the endPosition

      Parameters

      • a: IRange | null | undefined
      • b: IRange | null | undefined

      Returns number

    • Test if position is in range. If the position is at the edges, will return true.

      Parameters

      • range: IRange
      • position: IPosition

      Returns boolean

    • Test if otherRange is in range. If the ranges are equal, will return true.

      Parameters

      • range: IRange
      • otherRange: IRange

      Returns boolean

    • Test if range a equals b.

      Parameters

      • a: IRange | null | undefined
      • b: IRange | null | undefined

      Returns boolean

    • Parameters

      • start: IPosition
      • Optionalend: IPosition

      Returns Range

    • Return the end position (which will be after or equal to the start position)

      Parameters

      • range: IRange

      Returns Position

    • Return the start position (which will be before or equal to the end position)

      Parameters

      • range: IRange

      Returns Position

    • A intersection of the two ranges.

      Parameters

      • a: IRange
      • b: IRange

      Returns Range | null

    • Test if range is empty.

      Parameters

      • range: IRange

      Returns boolean

    • Test if obj is an IRange.

      Parameters

      • obj: any

      Returns obj is IRange

    • Create a Range from an IRange.

      Parameters

      • range: null | undefined

      Returns null

    • Create a Range from an IRange.

      Parameters

      • range: IRange

      Returns Range

    • Create a Range from an IRange.

      Parameters

      • range: IRange | null | undefined

      Returns Range | null

    • A reunion of the two ranges. The smallest position will be used as the start point, and the largest one as the end point.

      Parameters

      • a: IRange
      • b: IRange

      Returns Range

    • Test if the range spans multiple lines.

      Parameters

      • range: IRange

      Returns boolean

    • Test if otherRange is strictly in range (must start after, and end before). If the ranges are equal, will return false.

      Parameters

      • range: IRange
      • otherRange: IRange

      Returns boolean