MCPcopy Create free account
hub / github.com/angular/dev-infra / addSignal

Function addSignal

github-actions/browserstack/set-browserstack-env.js:10211–10227  ·  view source on GitHub ↗
(self, signal)

Source from the content-addressed store, hash-verified

10209 if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") {
10210 throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget");
10211 }
10212 if (method === "CONNECT") {
10213 throw new InvalidArgumentError("invalid method");
10214 }
10215 if (onInfo && typeof onInfo !== "function") {
10216 throw new InvalidArgumentError("invalid onInfo callback");
10217 }
10218 super("UNDICI_REQUEST");
10219 } catch (err) {
10220 if (util.isStream(body)) {
10221 util.destroy(body.on("error", util.nop), err);
10222 }
10223 throw err;
10224 }
10225 this.method = method;
10226 this.responseHeaders = responseHeaders || null;
10227 this.opaque = opaque || null;
10228 this.callback = callback;
10229 this.res = null;
10230 this.abort = null;

Callers 1

constructorMethod · 0.70

Calls 2

abortFunction · 0.70
addAbortListenerFunction · 0.70

Tested by

no test coverage detected