@@ -1051,8 +1051,8 @@ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
10511051 * @param {{
10521052 * signal: AbortSignal;
10531053 * close?: string[];
1054- * highWatermark ?: number,
1055- * lowWatermark ?: number
1054+ * highWaterMark ?: number,
1055+ * lowWaterMark ?: number
10561056 * }} [options]
10571057 * @returns {AsyncIterator }
10581058 */
@@ -1062,10 +1062,12 @@ function on(emitter, event, options = kEmptyObject) {
10621062 validateAbortSignal ( signal , 'options.signal' ) ;
10631063 if ( signal ?. aborted )
10641064 throw new AbortError ( undefined , { cause : signal ?. reason } ) ;
1065- const highWatermark = options . highWatermark ?? NumberMAX_SAFE_INTEGER ;
1066- validateInteger ( highWatermark , 'options.highWatermark' , 1 ) ;
1067- const lowWatermark = options . lowWatermark ?? 1 ;
1068- validateInteger ( lowWatermark , 'options.lowWatermark' , 1 ) ;
1065+ // Support both highWaterMark and highWatermark for backward compatibility
1066+ const highWatermark = options . highWaterMark ?? options . highWatermark ?? NumberMAX_SAFE_INTEGER ;
1067+ validateInteger ( highWatermark , 'options.highWaterMark' , 1 ) ;
1068+ // Support both lowWaterMark and lowWatermark for backward compatibility
1069+ const lowWatermark = options . lowWaterMark ?? options . lowWatermark ?? 1 ;
1070+ validateInteger ( lowWatermark , 'options.lowWaterMark' , 1 ) ;
10691071
10701072 // Preparing controlling queues and variables
10711073 FixedQueue ??= require ( 'internal/fixed_queue' ) ;
0 commit comments