Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/243894
Change subject: Add types to @param docs in Wikibase's Lua files ...................................................................... Add types to @param docs in Wikibase's Lua files I suggest to simply follow our JavaScript documentation style guide. Change-Id: Ia52c5fc4bc6119098c4bdd09aa91ca59048fb3a8 --- M client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua M client/includes/DataAccess/Scribunto/mw.wikibase.lua 2 files changed, 13 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/94/243894/1 diff --git a/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua b/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua index 1878275..7ef5ac1 100644 --- a/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua +++ b/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua @@ -27,7 +27,7 @@ -- Create new entity object from given data -- --- @param data +-- @param {table} data entity.create = function( data ) if type( data ) ~= 'table' or type( data.schemaVersion ) ~= 'number' then error( 'The entity data must be a table obtained via mw.wikibase.getEntityObject' ) @@ -45,7 +45,7 @@ -- Get the label for a given language code -- --- @param langCode +-- @param {string|number} [langCode] methodtable.getLabel = function( entity, langCode ) checkTypeMulti( 'getLabel', 1, langCode, { 'string', 'number', 'nil' } ) @@ -70,7 +70,7 @@ -- Get the sitelink title linking to the given site id -- --- @param globalSiteId +-- @param {string|number} [globalSiteId] methodtable.getSitelink = function( entity, globalSiteId ) checkTypeMulti( 'getSitelink', 1, globalSiteId, { 'string', 'number', 'nil' } ) @@ -95,7 +95,7 @@ -- Get the best statements with the given property id -- --- @param propertyId +-- @param {string} propertyId methodtable.getBestStatements = function( entity, propertyId ) if entity.claims == nil or not entity.claims[propertyId] then return {} @@ -136,8 +136,8 @@ -- Get the formatted value of the claims with the given property id -- --- @param propertyLabelOrId --- @param acceptableRanks +-- @param {string} propertyLabelOrId +-- @param {table} [acceptableRanks] methodtable.formatPropertyValues = function( entity, propertyLabelOrId, acceptableRanks ) acceptableRanks = acceptableRanks or nil diff --git a/client/includes/DataAccess/Scribunto/mw.wikibase.lua b/client/includes/DataAccess/Scribunto/mw.wikibase.lua index d4e6b4c..7c4620d 100644 --- a/client/includes/DataAccess/Scribunto/mw.wikibase.lua +++ b/client/includes/DataAccess/Scribunto/mw.wikibase.lua @@ -72,7 +72,7 @@ -- Get the mw.wikibase.entity object for the current page or for the -- specified id. -- - -- @param id + -- @param {string} [id] wikibase.getEntity = function( id ) checkTypeMulti( 'getEntity', 1, id, { 'string', 'nil' } ) @@ -95,7 +95,7 @@ -- Get the label for the given entity id, if specified, or of the -- connected entity, if exists. (in content language) -- - -- @param id + -- @param {string} [id] wikibase.label = function( id ) checkTypeMulti( 'label', 1, id, { 'string', 'nil' } ) @@ -111,7 +111,7 @@ -- Get the description for the given entity id, if specified, or of the -- connected entity, if exists. (in content language) -- - -- @param id + -- @param {string} [id] wikibase.description = function( id ) checkTypeMulti( 'description', 1, id, { 'string', 'nil' } ) @@ -126,7 +126,7 @@ -- Get the local sitelink title for the given entity id. -- - -- @param id + -- @param {string} id wikibase.sitelink = function( id ) checkType( 'sitelink', 1, id, 'string' ) @@ -136,7 +136,7 @@ -- Render a Snak from its serialization -- - -- @param snakSerialization + -- @param {table} snakSerialization wikibase.renderSnak = function( snakSerialization ) checkType( 'renderSnak', 1, snakSerialization, 'table' ) @@ -145,7 +145,7 @@ -- Render a list of Snaks from their serialization -- - -- @param snaksSerialization + -- @param {table} snaksSerialization wikibase.renderSnaks = function( snaksSerialization ) checkType( 'renderSnaks', 1, snaksSerialization, 'table' ) @@ -154,7 +154,7 @@ -- Returns a property id for the given label or id -- - -- @param propertyLabelOrId + -- @param {string} propertyLabelOrId wikibase.resolvePropertyId = function( propertyLabelOrId ) checkType( 'resolvePropertyId', 1, propertyLabelOrId, 'string' ) -- To view, visit https://gerrit.wikimedia.org/r/243894 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia52c5fc4bc6119098c4bdd09aa91ca59048fb3a8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits