An area in a source file, from start to end. The start point is the point right before the starting character. The end point is the point right after the last character. An empty position will have coinciding points.

Consider a file with one line, containing text "HELLO". The Position of such text will be Position(Point(1, 0), Point(1, 5)).

Constructors

Properties

end: Point
source?: Source
start: Point

Methods

  • Tests whether the given object is contained in the interval represented by this object.

    Parameters

    • object: undefined | null | Point | Position | Node

      the object to test: could be a Point, a Position, or a Node.

    Returns boolean

  • If start and end are the same, then this Position is considered empty.

    Returns boolean

  • Tests whether the given position overlaps the interval represented by this object.

    Parameters

    • Optional position: Position

      the position

    Returns boolean

Generated using TypeDoc