export type BudgetName = "steps" | "deadline" | "callDepth" | "stringLength" | "arrayLength" | "dataSize" | "dataDepth";
export type BudgetOptions = {
    maxSteps?: number;
    deadline?: number | Date;
    maxCallDepth?: number;
    stringLength?: number;
    arrayLength?: number;
    dataSize?: number;
};
export declare const REGEX_STEP_LIMIT = 2000;
export declare class SandboxError extends Error {
    readonly code: "aborted" | "budgetExceeded" | "reentry";
    readonly budget?: BudgetName;
    readonly current?: number;
    readonly limit?: number;
    constructor(input: "aborted");
    constructor(input: "reentry");
    constructor(input: {
        budget: BudgetName;
        current: number;
        limit: number;
    });
}
type BudgetLimits = {
    maxSteps?: number;
    maxCallDepth?: number;
    stringLength?: number;
    arrayLength?: number;
    dataSize?: number;
};
export declare class Budget {
    readonly deadline?: number;
    readonly limits: Readonly<BudgetLimits>;
    stepsUsed: number;
    peakCallDepth: number;
    currentDataSize: number;
    peakDataSize: number;
    currentCallDepth: number;
    private allChecksSuspended;
    private deadlineChecksSuspended;
    private visitsUntilDeadlineCheck;
    constructor(options?: BudgetOptions);
    visitNode(): void;
    allocateString(value: string): string;
    allocateArrayLength(length: number): void;
    allocateCollectionEntries(count: number): void;
    reconcileDataUsage(usage: number): void;
    provisionDataUsage(usage: number): () => void;
    enterCall(): () => void;
    enterAwait(): () => void;
    reset(): void;
    suspendChecks(): () => void;
    suspendDeadlineChecks(): () => void;
    private checkDeadline;
    private checkDataUsage;
    private checkSampledDeadline;
    private enterDepth;
}
export declare function allocateRegexSteps(steps: number): void;
export {};
