UNPKG

@itwin/core-react

Version:

A react component library of iTwin.js UI general purpose components

14 lines 707 B
/** @packageDocumentation * @module Utilities */ /** * Return promise if created for the id, otherwise, create a new one and save it. * if the promise fail, remove it from cache so we'll try again. * @param id Identification for the promise * @param createPromise Function to create the promise if not already running. * @param cache Map<string, Promise<K>> object that will contain the cache. (Should be local to the file using this function, not global to the app) * @returns created promise * @internal */ export declare function reuseOrCreatePromise<T>(id: string, createPromise: () => Promise<T>, cache: Map<string, Promise<T>>): Promise<T>; //# sourceMappingURL=reuseOrCreatePromise.d.ts.map