From bbf40d791ec6745a3a72e44dada5ace85bb59818 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Mon, 14 Apr 2014 10:52:47 -0700 Subject: [PATCH] mediawiki.Title: Correct documentation structure for Title.exist Apparently the way we were using the documentation, with sub-properties of properties, only worked due to the way that JSDuck v4.x happened to be implemented, and was unsupported; as of JSDuck v5.x this no longer works, so instead, change the form used so as to document the property as a single item, as suggested in response to our complaint: https://github.com/senchalabs/jsduck/issues/551 Change-Id: If0c66e6e8a904769ee857c1ee94377dc13000d41 --- resources/src/mediawiki/mediawiki.Title.js | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/resources/src/mediawiki/mediawiki.Title.js b/resources/src/mediawiki/mediawiki.Title.js index 8ce9b5897f..43876081b1 100644 --- a/resources/src/mediawiki/mediawiki.Title.js +++ b/resources/src/mediawiki/mediawiki.Title.js @@ -375,30 +375,30 @@ return null; }; + /** + * Store page existence + * + * @static + * @property {Object} exist + * @property {Object} exist.pages Keyed by title. Boolean true value indicates page does exist. + * + * @property {Function} exist.set The setter function. + * + * Example to declare existing titles: + * + * Title.exist.set( ['User:John_Doe', ...] ); + * + * Example to declare titles nonexistent: + * + * Title.exist.set( ['File:Foo_bar.jpg', ...], false ); + * + * @property {string|Array} exist.set.titles Title(s) in strict prefixedDb title form + * @property {boolean} [exist.set.state=true] State of the given titles + * @return {boolean} + */ Title.exist = { - /** - * Boolean true value indicates page does exist. - * - * @static - * @property {Object} exist.pages Keyed by PrefixedDb title. - */ pages: {}, - /** - * Example to declare existing titles: - * - * Title.exist.set( ['User:John_Doe', ...] ); - * - * Example to declare titles nonexistent: - * - * Title.exist.set( ['File:Foo_bar.jpg', ...], false ); - * - * @static - * @property exist.set - * @param {string|Array} titles Title(s) in strict prefixedDb title form - * @param {boolean} [state=true] State of the given titles - * @return {boolean} - */ set: function ( titles, state ) { titles = $.isArray( titles ) ? titles : [titles]; state = state === undefined ? true : !!state; -- 2.20.1