import { StringEdit, StringReplacement } from '../edits/stringEdit';
import { OffsetRange } from '../ranges/offsetRange';
import { Position } from '../position';
import { Range } from '../range';
import type { TextReplacement, TextEdit } from '../edits/textEdit';
import type { TextLength } from './textLength';
export declare abstract class PositionOffsetTransformerBase {
    abstract getOffset(position: Position): number;
    getOffsetRange(range: Range): OffsetRange;
    abstract getPosition(offset: number): Position;
    getRange(offsetRange: OffsetRange): Range;
    getStringEdit(edit: TextEdit): StringEdit;
    getStringReplacement(edit: TextReplacement): StringReplacement;
    getTextReplacement(edit: StringReplacement): TextReplacement;
    getTextEdit(edit: StringEdit): TextEdit;
}
interface IDeps {
    StringEdit: typeof StringEdit;
    StringReplacement: typeof StringReplacement;
    TextReplacement: typeof TextReplacement;
    TextEdit: typeof TextEdit;
    TextLength: typeof TextLength;
}
/** This is to break circular module dependencies. */
export declare function _setPositionOffsetTransformerDependencies(deps: IDeps): void;
export declare class PositionOffsetTransformer extends PositionOffsetTransformerBase {
    readonly text: string;
    private readonly lineStartOffsetByLineIdx;
    private readonly lineEndOffsetByLineIdx;
    constructor(text: string);
    getOffset(position: Position): number;
    private _validatePosition;
    getPosition(offset: number): Position;
    getTextLength(offsetRange: OffsetRange): TextLength;
    get textLength(): TextLength;
    getLineLength(lineNumber: number): number;
}
export {};
//# sourceMappingURL=positionToOffsetImpl.d.ts.map