(self, signal)
| 10209 | if (this.removeAbortListener) { |
| 10210 | res == null ? void 0 : res.off("close", this.removeAbortListener); |
| 10211 | this.removeAbortListener(); |
| 10212 | this.removeAbortListener = null; |
| 10213 | } |
| 10214 | } |
| 10215 | }; |
| 10216 | function request(opts, callback) { |
| 10217 | if (callback === void 0) { |
| 10218 | return new Promise((resolve2, reject) => { |
| 10219 | request.call(this, opts, (err, data) => { |
| 10220 | return err ? reject(err) : resolve2(data); |
| 10221 | }); |
| 10222 | }); |
| 10223 | } |
| 10224 | try { |
| 10225 | this.dispatch(opts, new RequestHandler(opts, callback)); |
| 10226 | } catch (err) { |
| 10227 | if (typeof callback !== "function") { |
| 10228 | throw err; |
| 10229 | } |
| 10230 | const opaque = opts == null ? void 0 : opts.opaque; |
no test coverage detected