import type { RedirectResult } from '../../../../context/session_context.ts';
import type { SessionView } from '../../../../view/types.ts';
import { type SessionState } from '../../../session/session.ts';
import type { BuiltinCall } from '../types.ts';
import type { Declaration, DeclarationOperand } from './types.ts';
/**
 * Declare names in the running function's scope, or globally.
 *
 * bash's two passes (`storeStagedArrays`): every array literal stores
 * first, then each operand in order is declared and marked before the next
 * one runs, a literal's name at its own place. So `declare -r R=1 R=2`
 * freezes `R` at 1 and refuses the second write, which fails the builtin
 * while the later operands still declare, and `declare -r R=1 R=(2)` leaves
 * `(1)`. `assignments` holds the operands in order: `NAME`, `NAME=value`,
 * `NAME+=value` and staged array literals; `options` the spelling and the
 * letters it carried, `local` with none by default.
 */
export declare function handleLocal(assignments: readonly DeclarationOperand[], session: SessionState, state?: SessionView | null, options?: Partial<Declaration>): Promise<RedirectResult>;
/** The `local` arm. */
export declare function localBuiltin(call: BuiltinCall): Promise<RedirectResult>;
//# sourceMappingURL=local.d.ts.map