MCPcopy Index your code
hub / github.com/nodejs/node / constructor

Method constructor

lib/internal/abort_controller.js:231–250  ·  view source on GitHub ↗

* @param {symbol | undefined} dontThrowSymbol * @param {{ * aborted? : boolean, * reason? : any, * transferable? : boolean, * composite? : boolean, * }} [init] * @private

(dontThrowSymbol = undefined, init = kEmptyObject)

Source from the content-addressed store, hash-verified

229 * @private
230 */
231 constructor(dontThrowSymbol = undefined, init = kEmptyObject) {
232 if (dontThrowSymbol !== kDontThrowSymbol) {
233 throw new ERR_ILLEGAL_CONSTRUCTOR();
234 }
235 super();
236
237 this[kMaxEventTargetListeners] = 0;
238 const {
239 aborted = false,
240 reason = undefined,
241 transferable = false,
242 composite = false,
243 } = init;
244 this[kAborted] = aborted;
245 this[kReason] = reason;
246 this[kComposite] = composite;
247 if (transferable) {
248 markTransferMode(this, false, true);
249 }
250 }
251
252 /**
253 * @type {boolean}

Callers

nothing calls this directly

Calls 1

markTransferModeFunction · 0.85

Tested by

no test coverage detected