MCPcopy
hub / github.com/webpack/webpack / getPromise

Method getPromise

lib/CacheFacade.js:137–147  ·  lib/CacheFacade.js::ItemCacheFacade.getPromise

* Returns promise with the data. * @template T * @returns {Promise<T>} promise with the data

()

Source from the content-addressed store, hash-verified

135 * @returns {Promise<T>} promise with the data
136 */
137 getPromise() {
138 return new Promise((resolve, reject) => {
139 this._cache.get(this._name, this._etag, (err, data) => {
140 if (err) {
141 reject(err);
142 } else {
143 resolve(data);
144 }
145 });
146 });
147 }
148
149 /**
150 * Processes the provided data.

Callers 1

providePromiseMethod · 0.95

Calls 2

resolveFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected