import { OffsetRange } from "../core/offsetRange.js";
import { ILanguageIdCodec } from "../languages.js";
import { LineTokens } from "./lineTokens.js";
export declare class TokenWithTextArray {
    private readonly _tokenInfo;
    static fromLineTokens(lineTokens: LineTokens): TokenWithTextArray;
    static create(tokenInfo: TokenWithTextInfo[]): TokenWithTextArray;
    private constructor();
    toLineTokens(decoder: ILanguageIdCodec): LineTokens;
    forEach(cb: (range: OffsetRange, tokenInfo: TokenWithTextInfo) => void): void;
    map<T>(cb: (range: OffsetRange, tokenInfo: TokenWithTextInfo) => T): T[];
    slice(range: OffsetRange): TokenWithTextArray;
    append(other: TokenWithTextArray): TokenWithTextArray;
}
export type TokenMetadata = number;
export declare class TokenWithTextInfo {
    readonly text: string;
    readonly metadata: TokenMetadata;
    constructor(text: string, metadata: TokenMetadata);
}
export declare class TokenWithTextArrayBuilder {
    private readonly _tokens;
    add(text: string, metadata: TokenMetadata): void;
    build(): TokenWithTextArray;
}
