Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/125758
Change subject: mediawiki.Title.js: Correct documentation structure for Title.exist ...................................................................... mediawiki.Title.js: Correct documentation structure for Title.exist Apparently the way we were using the documentation only worked due to the way that JSDuck v4.x was implemented, as was unsupported; as of JSDuck v5.x this no longer works, so instead changing 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 --- M resources/src/mediawiki/mediawiki.Title.js 1 file changed, 20 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/58/125758/1 diff --git a/resources/src/mediawiki/mediawiki.Title.js b/resources/src/mediawiki/mediawiki.Title.js index 8ce9b58..d7ed96c 100644 --- a/resources/src/mediawiki/mediawiki.Title.js +++ b/resources/src/mediawiki/mediawiki.Title.js @@ -375,30 +375,29 @@ 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 + * 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; -- To view, visit https://gerrit.wikimedia.org/r/125758 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If0c66e6e8a904769ee857c1ee94377dc13000d41 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jforrester <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
