@@ -395,6 +395,9 @@ function isBroadcastChannel(value) {
395395}
396396
397397class BroadcastChannel extends EventTarget {
398+ /**
399+ * @param {string } name
400+ */
398401 constructor ( name ) {
399402 if ( arguments . length === 0 )
400403 throw new ERR_MISSING_ARGS ( 'name' ) ;
@@ -426,12 +429,18 @@ class BroadcastChannel extends EventTarget {
426429 } , opts ) } `;
427430 }
428431
432+ /**
433+ * @type {string }
434+ */
429435 get name ( ) {
430436 if ( ! isBroadcastChannel ( this ) )
431437 throw new ERR_INVALID_THIS ( 'BroadcastChannel' ) ;
432438 return this [ kName ] ;
433439 }
434440
441+ /**
442+ * @returns {void }
443+ */
435444 close ( ) {
436445 if ( ! isBroadcastChannel ( this ) )
437446 throw new ERR_INVALID_THIS ( 'BroadcastChannel' ) ;
@@ -445,6 +454,11 @@ class BroadcastChannel extends EventTarget {
445454 this [ kHandle ] = undefined ;
446455 }
447456
457+ /**
458+ *
459+ * @param {* } message
460+ * @returns {void }
461+ */
448462 postMessage ( message ) {
449463 if ( ! isBroadcastChannel ( this ) )
450464 throw new ERR_INVALID_THIS ( 'BroadcastChannel' ) ;
@@ -460,6 +474,9 @@ class BroadcastChannel extends EventTarget {
460474 // BroadcastChannel API definition. Typically we shouldn't extend Web
461475 // Platform APIs with Node.js specific methods but ref and unref
462476 // are a bit special.
477+ /**
478+ * @returns {BroadcastChannel }
479+ */
463480 ref ( ) {
464481 if ( ! isBroadcastChannel ( this ) )
465482 throw new ERR_INVALID_THIS ( 'BroadcastChannel' ) ;
@@ -472,6 +489,9 @@ class BroadcastChannel extends EventTarget {
472489 // BroadcastChannel API definition. Typically we shouldn't extend Web
473490 // Platform APIs with Node.js specific methods but ref and unref
474491 // are a bit special.
492+ /**
493+ * @returns {BroadcastChannel }
494+ */
475495 unref ( ) {
476496 if ( ! isBroadcastChannel ( this ) )
477497 throw new ERR_INVALID_THIS ( 'BroadcastChannel' ) ;
0 commit comments