MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / chainFinally

Method chainFinally

src/platform/common/utils/async.ts:180–188  ·  view source on GitHub ↗

* Chain the provided promise after all previous promises have completed (ignoring errors in previous promises).

(promise: () => Promise<T>)

Source from the content-addressed store, hash-verified

178 * Chain the provided promise after all previous promises have completed (ignoring errors in previous promises).
179 */
180 public chainFinally<T>(promise: () => Promise<T>): Promise<T> {
181 const deferred = createDeferred<T>();
182 this.currentPromise = this.currentPromise.finally(() =>
183 promise()
184 .then((result) => deferred.resolve(result))
185 .catch((ex) => deferred.reject(ex))
186 );
187 return deferred.promise;
188 }
189}
190
191export interface ITask<T> {

Callers 2

getServiceMethod · 0.80
getAccessInformationMethod · 0.80

Calls 3

createDeferredFunction · 0.85
resolveMethod · 0.65
rejectMethod · 0.65

Tested by

no test coverage detected