MCPcopy
hub / github.com/SBoudrias/Inquirer.js / error

Function error

packages/inquirer/src/utils/observable.ts:261–273  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

259 }
260 },
261 error(error) {
262 if (completed || errored) {
263 return;
264 }
265
266 errored = true;
267 thrownError = error;
268 for (const { observer, subscription } of observers) {
269 subscription.closed = true;
270 callObserver(() => observer.error?.(error));
271 }
272 observers.clear();
273 },
274 complete() {
275 if (completed || errored) {
276 return;

Callers

nothing calls this directly

Calls 6

callObserverFunction · 0.85
toErrorFunction · 0.85
rejectPendingFunction · 0.85
errorMethod · 0.80
unsubscribeMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected