apiref
stack-local-storage@0.2.0

StackLocalStorage.run()  Method

Runs a function with a given store.

Signature

run<X, A extends any[]>(store: T, f: (...args: A) => X, ...args: A): X;

Parameters

ParameterTypeDescription
storeT

the local store

f(...args: A) => X

the function to run

argsA

the arguments to pass to the function

(Returns)X

- the return value of the function