import * as LibTypes from './lib';
export declare const lib: typeof LibTypes;
export interface OnigCaptureIndex extends LibTypes.OnigCaptureIndex {
    index: number;
    start: number;
    end: number;
    length: number;
    match?: string;
}
export declare class OnigCaptureIndexImpl implements LibTypes.OnigCaptureIndex {
    index: number;
    start: number;
    end: number;
    length: number;
    constructor(index: number, start: number, end: number, length: number);
    fromJS(output: (index: number, start: number, end: number, length: number) => void): void;
}
export declare class OnigRegExp {
    private scanner;
    constructor(source: string);
    static captureIndicesForMatch(s: string, match: LibTypes.OnigNextMatchResult): OnigCaptureIndex[] | null;
    searchSync(s: string, startPosition?: number): OnigCaptureIndex[] | null;
    testSync(s: string): boolean;
}
export declare const OnigScanner: OnigScannerCtor;
export interface OnigScannerCtor {
    new (sources: string[]): OnigScanner;
    prototype: OnigScanner;
}
export interface OnigScanner extends LibTypes.OnigScanner {
    findNextMatchSync(s: string | OnigString, startPosition: number): LibTypes.OnigNextMatchResult | null;
    _findNextMatchSync(s: string | OnigString, startPosition: number): LibTypes.OnigNextMatchResult | null;
    dispose(): void;
}
export declare class OnigString extends lib.OnigString {
    constructor(value: string);
}
export interface OnigStringCtor {
    new (value: string): OnigString;
    prototype: OnigString;
}
export interface OnigString extends LibTypes.OnigString {
    length: number;
    slice(start?: number, end?: number): string;
    substring(start: number, end?: number): string;
    toString(): string;
    dispose(): void;
}
