MCPcopy Index your code
hub / github.com/angular/angular / makeResolver

Function makeResolver

packages/zone.js/lib/common/promise.ts:108–117  ·  view source on GitHub ↗
(promise: ZoneAwarePromise<any>, state: boolean)

Source from the content-addressed store, hash-verified

106 const REJECTED_NO_CATCH = 0;
107
108 function makeResolver(promise: ZoneAwarePromise<any>, state: boolean): (value: any) => void {
109 return (v: any) => {
110 try {
111 resolvePromise(promise, state, v);
112 } catch (err) {
113 resolvePromise(promise, false, err);
114 }
115 // Do not return value or you will break the Promise spec.
116 };
117 }
118
119 const once = function () {
120 let wasCalled = false;

Callers 2

resolvePromiseFunction · 0.85
constructorMethod · 0.85

Calls 1

resolvePromiseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…