@@ -1053,8 +1053,8 @@ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
1053
1053
* @param {{
1054
1054
* signal: AbortSignal;
1055
1055
* close?: string[];
1056
- * highWatermark ?: number,
1057
- * lowWatermark ?: number
1056
+ * highWaterMark ?: number,
1057
+ * lowWaterMark ?: number
1058
1058
* }} [options]
1059
1059
* @returns {AsyncIterator }
1060
1060
*/
@@ -1065,10 +1065,12 @@ function on(emitter, event, options = kEmptyObject) {
1065
1065
validateAbortSignal ( signal , 'options.signal' ) ;
1066
1066
if ( signal ?. aborted )
1067
1067
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 ) ;
1072
1074
1073
1075
// Preparing controlling queues and variables
1074
1076
FixedQueue ??= require ( 'internal/fixed_queue' ) ;
0 commit comments