import type { Params } from 'react-router';
import { type RecoilState, type Snapshot } from 'recoil';
import { type WebSocketClientInterface } from '../../api';
import { type RequestExtras } from '../../api/http';
import { type AnyVariable, type GlobalTaskContext, type ResolvedDerivedVariable, type ResolvedServerVariable, type ResolvedSwitchVariable } from '../../types';
/**
 * Error thrown when a variable cannot be resolved during preloading.
 * This signals to the preloader to skip this variable and resolve it at runtime.
 */
export declare class PreloadSkipError extends Error {
    constructor(message: string);
}
export declare function resolveVariable<VariableType>(variable: AnyVariable<VariableType>, client: WebSocketClientInterface, taskContext: GlobalTaskContext, extras: RequestExtras, resolver?: (state: RecoilState<VariableType>) => Promise<RecoilState<VariableType> | ResolvedDerivedVariable | VariableType>): Promise<RecoilState<VariableType> | ResolvedDerivedVariable | ResolvedServerVariable | ResolvedSwitchVariable | VariableType>;
/**
 * Static variant of variable resolution.
 * Notable does not register variables if they haven't yet been registered.
 * For plain variables, uses default values if not yet registered.
 */
export declare function resolveVariableStatic(variable: AnyVariable<any>, snapshot: Snapshot, params: Params<string>): any;
/**
 * Clean value to a format understood by the backend.
 * Removes `deps`, preserves embedded `force_key` from resolved derived(data)variables.
 *
 * @param value a value to clean
 * @param forceKeyOverride optional force key to use instead of the one embedded in the resolved variable
 */
export declare function cleanValue(value: unknown, forceKeyOverride?: string | null): any;
/**
 * Clean kwargs to a format understood by the backend.
 * Removes `deps`, preserves embedded `force_key` from resolved derived(data)variables.
 *
 * @param kwargs kwargs to clean
 * @param forceKeyOverride optional force key to use instead of the one embedded in the resolved variable
 */
export declare function cleanKwargs(kwargs: Record<string, any>, forceKeyOverride?: string | null): Record<string, any>;
/**
 * Format values into a shape expected by the backend.
 * Removes `deps`, preserves embedded `force_key` from resolved derived(data)variables.
 *
 * @param values list of values - plain values or ResolvedDerivedVariable constructs with plain values nested inside
 * @param forceKeyOverride optional force key to use instead of the one embedded in the resolved variable
 */
export declare function cleanArgs(values: Array<any | ResolvedDerivedVariable>, forceKeyOverride?: string | null): any[];
//# sourceMappingURL=resolve-variable.d.ts.map