From 9f2e4faea3ff1d1973b04d758e54aceaccaa0d0e Mon Sep 17 00:00:00 2001 From: Jon Robson Date: Wed, 29 Nov 2023 17:01:45 -0800 Subject: Documentation: Expand the documentation in jsdoc Significant changes: * The Notification class was marked as private but is returned by a public mw.notify function so presumably is a public interface so is no longer marked as @private * I've documented the mw object under namespaces and reserved the class section for types that are referenced within that documentation. * mw.loader methods used by ResourceLoader but not intended as public APIs are marked as public after talking to Roan. This can be modified later if necessary. * Remove jsduck eslint plugin from startup module Notes about organization: * ResourceLoader Modules are documented under modules. After discussing with Roan, Anne and Alex this makes sense for now. We can pivot at the end of the project if needed. MediaWiki util module acts as an example for modules that also appear on the global mw object * We use namespaces for libraries on the mw global * Global methods are documented on the Window namespace * All hooks are documented under the mw.hook namespace given the namespace provided important information for how to use them. Bug: T352308 Change-Id: Ia709de48cbc0f00ff832eb4666e6abcffdb6f710 --- resources/src/mediawiki.base/log.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'resources/src/mediawiki.base/log.js') diff --git a/resources/src/mediawiki.base/log.js b/resources/src/mediawiki.base/log.js index 0db23a9e2a54..a634dd150f28 100644 --- a/resources/src/mediawiki.base/log.js +++ b/resources/src/mediawiki.base/log.js @@ -4,8 +4,7 @@ /* eslint-disable no-console */ /** - * @class mw - * @singleton + * @namespace mw.log */ /** @@ -60,7 +59,7 @@ mw.log.error = Function.prototype.bind.call( console.error, console ); * * hello( 1 ); * - * + * @memberof mw.log * @since 1.38 * @param {string|null} key Name of the feature for deprecation tracker, * or null for a console-only deprecation. -- cgit v1.2.3