import type { TransactionToken } from "atom.io" import type { Store } from "../store/index.ts" import { withdraw } from "../store/index.ts" import type { Fn } from "../utility-types.ts" export function actUponStore( store: Store, token: TransactionToken, id: string, ): (...parameters: Parameters) => ReturnType { return (...parameters: Parameters): ReturnType => { const tx = withdraw(store, token) return tx.run(parameters, id) } }