MCPcopy Create free account
hub / github.com/angular/angular / promiseWithResolvers

Function promiseWithResolvers

packages/forms/signals/test/web/interop.spec.ts:1467–1481  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1465 */
1466// TODO: share this with submit.spec.ts
1467function promiseWithResolvers<T = void>(): {
1468 promise: Promise<T>;
1469 resolve: (value: T | PromiseLike<T>) => void;
1470 reject: (reason?: any) => void;
1471} {
1472 let resolve!: (value: T | PromiseLike<T>) => void;
1473 let reject!: (reason?: any) => void;
1474
1475 const promise = new Promise<T>((res, rej) => {
1476 resolve = res;
1477 reject = rej;
1478 });
1479
1480 return {promise, resolve, reject};
1481}

Callers 2

interop.spec.tsFile · 0.70
handleNavigateMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected