1 export const createOnceHandler = <Argument extends any, ReturnValue extends any>(
2 createPromise: (...args: Argument[]) => Promise<ReturnValue>
4 let promise: Promise<ReturnValue> | undefined;
10 return (...args: Argument[]): Promise<ReturnValue> => {
15 promise = createPromise(...args)
16 .then((result: ReturnValue) => {