From: James D. Forrester Date: Mon, 14 Apr 2014 17:52:47 +0000 (-0700) Subject: mediawiki.Title: Correct documentation structure for Title.exist X-Git-Tag: 1.31.0-rc.0~16169 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/voir.php?a=commitdiff_plain;h=bbf40d791ec6745a3a72e44dada5ace85bb59818;p=lhc%2Fweb%2Fwiklou.git 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 --- 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;