@@ -1053,8 +1053,8 @@ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
10531053 * @param {{
10541054 * signal: AbortSignal;
10551055 * close?: string[];
1056- * highWatermark ?: number,
1057- * lowWatermark ?: number
1056+ * highWaterMark ?: number,
1057+ * lowWaterMark ?: number
10581058 * }} [options]
10591059 * @returns {AsyncIterator }
10601060 */
@@ -1065,10 +1065,12 @@ function on(emitter, event, options = kEmptyObject) {
10651065 validateAbortSignal ( signal , 'options.signal' ) ;
10661066 if ( signal ?. aborted )
10671067 throw new AbortError ( undefined , { cause : signal ?. reason } ) ;
1068- const highWatermark = options . highWatermark ?? NumberMAX_SAFE_INTEGER ;
1069- validateInteger ( highWatermark , 'options.highWatermark' , 1 ) ;
1070- const lowWatermark = options . lowWatermark ?? 1 ;
1071- validateInteger ( lowWatermark , 'options.lowWatermark' , 1 ) ;
1068+ // Support both highWaterMark and highWatermark for backward compatibility
1069+ const highWatermark = options . highWaterMark ?? options . highWatermark ?? NumberMAX_SAFE_INTEGER ;
1070+ validateInteger ( highWatermark , 'options.highWaterMark' , 1 ) ;
1071+ // Support both lowWaterMark and lowWatermark for backward compatibility
1072+ const lowWatermark = options . lowWaterMark ?? options . lowWatermark ?? 1 ;
1073+ validateInteger ( lowWatermark , 'options.lowWaterMark' , 1 ) ;
10721074
10731075 // Preparing controlling queues and variables
10741076 FixedQueue ??= require ( 'internal/fixed_queue' ) ;
0 commit comments