Constructors
constructor
- new Position(line: number, char: number): Position
Properties
Private _character
_character: number
Private _line
_line: number
Methods
isAfter
Parameters
Returns boolean
isAfterOrEqual
- isAfterOrEqual(other: Position): boolean
Parameters
Returns boolean
isBefore
Parameters
Returns boolean
isBeforeOrEqual
- isBeforeOrEqual(other: Position): boolean
Parameters
Returns boolean
isEqual
Parameters
Returns boolean
translate
- translate(change: { characterDelta?: number; lineDelta?: number }): Position
- translate(lineDelta?: number, characterDelta?: number): Position
Parameters
change: { characterDelta?: number; lineDelta?: number }
Optional characterDelta?: number
Optional lineDelta?: number
Parameters
Optional lineDelta: number
Optional characterDelta: number
with
- with(change: { character?: number; line?: number }): Position
- with(line?: number, character?: number): Position
Parameters
change: { character?: number; line?: number }
Optional character?: number
Optional line?: number
Parameters
Optional line: number
Optional character: number
Static isPosition
- isPosition(other: unknown): other is Position