import { Budget } from "../budget.js"; import { type SandboxArray, type SandboxClosure, type SandboxValue } from "../values.js"; export type ArrayMethodName = "map" | "filter" | "find" | "findIndex" | "findLast" | "findLastIndex" | "some" | "every" | "reduce" | "reduceRight" | "forEach" | "flatMap" | "flat" | "includes" | "indexOf" | "lastIndexOf" | "join" | "slice" | "concat" | "splice" | "fill" | "copyWithin" | "at" | "sort" | "reverse" | "toSorted" | "toReversed" | "toSpliced" | "with" | "push" | "pop" | "shift" | "unshift"; export type ArrayMethodOptions = { budget: Budget; callClosure: (closure: SandboxClosure, args: readonly SandboxValue[], stack: readonly string[]) => Promise; }; export declare function getArrayMember(value: SandboxArray, property: string | number, options: ArrayMethodOptions): SandboxValue | undefined; export declare function isArrayMethodName(property: string | number): property is ArrayMethodName; export declare function callArrayMethod(value: SandboxArray, methodName: ArrayMethodName, args: readonly SandboxValue[], options: ArrayMethodOptions, stack?: readonly string[]): Promise;