import type { AssignmentPattern, MemberExpression, ParseResult, RestElement, VariableDeclarationKind, VariableDeclarator } from "../parse.js";
import type { AsyncEvaluationResult } from "./async.js";
import type { Scope } from "./scope.js";
import { type SandboxValue } from "./values.js";
type Pattern = VariableDeclarator["id"] | AssignmentPattern | MemberExpression | RestElement;
export type PatternTarget = {
    kind: VariableDeclarationKind;
} | {
    assign: true;
};
export type PatternContext = {
    evaluate(node: ParseResult): Promise<AsyncEvaluationResult>;
};
export type BindPatternResult = {
    ok: true;
} | {
    ok: false;
    result: AsyncEvaluationResult;
};
export declare function bindPattern(pattern: Pattern, value: SandboxValue, target: PatternTarget, scope: Scope, context: PatternContext): Promise<BindPatternResult>;
export {};
