From 3de632470c0723327fdd63c72c063a6a3814cbfe Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Fri, 1 Nov 2024 16:15:06 +0530 Subject: [PATCH] Clean up JSDoc --- packages/private-apis/src/implementation.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/private-apis/src/implementation.ts b/packages/private-apis/src/implementation.ts index 7206703692783..ee2b9693959a3 100644 --- a/packages/private-apis/src/implementation.ts +++ b/packages/private-apis/src/implementation.ts @@ -63,9 +63,9 @@ const allowReRegistration = globalThis.IS_WORDPRESS_CORE ? false : true; * Called by a @wordpress package wishing to opt-in to accessing or exposing * private private APIs. * - * @param {string} consent The consent string. - * @param {string} moduleName The name of the module that is opting in. - * @return {{lock: typeof lock, unlock: typeof unlock}} An object containing the lock and unlock functions. + * @param consent The consent string. + * @param moduleName The name of the module that is opting in. + * @return An object containing the lock and unlock functions. */ export const __dangerousOptInToUnstableAPIsOnlyForCoreModules = ( consent: string, @@ -133,8 +133,8 @@ export const __dangerousOptInToUnstableAPIsOnlyForCoreModules = ( * // { a: 1 } * ``` * - * @param {Record< symbol, WeakKey >} object The object to bind the private data to. - * @param {unknown} privateData The private data to bind to the object. + * @param object The object to bind the private data to. + * @param privateData The private data to bind to the object. */ function lock( object: Record< symbol, WeakKey >, privateData: unknown ) { if ( ! object ) { @@ -166,8 +166,8 @@ function lock( object: Record< symbol, WeakKey >, privateData: unknown ) { * // { a: 1 } * ``` * - * @param {Record< symbol, WeakKey >} object The object to unlock the private data from. - * @return {unknown} The private data bound to the object. + * @param object The object to unlock the private data from. + * @return The private data bound to the object. */ function unlock( object: Record< symbol, WeakKey > ) { if ( ! object ) { @@ -196,7 +196,7 @@ const __private = Symbol( 'Private API ID' ); * Private function to allow the unit tests to allow * a mock module to access the private APIs. * - * @param {string} name The name of the module. + * @param name The name of the module. */ export function allowCoreModule( name: string ) { CORE_MODULES_USING_PRIVATE_APIS.push( name );