Skip to content

Commit

Permalink
fixup! events: extract addAbortListener for safe internal use
Browse files Browse the repository at this point in the history
  • Loading branch information
atlowChemi committed Mar 14, 2024
1 parent 4594616 commit f86c737
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const {
Symbol,
SymbolFor,
SymbolAsyncIterator,
SymbolDispose,
} = primordials;
const kRejection = SymbolFor('nodejs.rejection');

Expand Down
14 changes: 8 additions & 6 deletions lib/internal/events/abort_listener.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
'use struct';

Check failure on line 1 in lib/internal/events/abort_listener.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Use the global form of 'use strict'

const {
validateAbortSignal,
validateFunction,
validateAbortSignal,
validateFunction,
} = require('internal/validators');
const {
codes: {
ERR_INVALID_ARG_TYPE,
},
codes: {
ERR_INVALID_ARG_TYPE,

Check failure on line 9 in lib/internal/events/abort_listener.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Expected indentation of 4 spaces but found 6
},
} = require('internal/errors');
const { SymbolDispose } = primordials;

let queueMicrotask;
let kResistStopPropagation;

/**
* @param {AbortSignal} signal
* @param {EventListener} listener
* @param {EventListener} listener
* @returns {Disposable}
*/
function addAbortListener(signal, listener) {
Expand Down

0 comments on commit f86c737

Please sign in to comment.