<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mbwiki.stairwaygames.work/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ATemplateData</id>
	<title>Module:TemplateData - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mbwiki.stairwaygames.work/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ATemplateData"/>
	<link rel="alternate" type="text/html" href="https://mbwiki.stairwaygames.work/w/index.php?title=Module:TemplateData&amp;action=history"/>
	<updated>2026-04-06T17:43:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://mbwiki.stairwaygames.work/w/index.php?title=Module:TemplateData&amp;diff=6893&amp;oldid=prev</id>
		<title>Admin coral island: Created page with &quot;--- Module copied from Genshin Impact wiki.  ---  A library used to process other modules&#039; arguments and to output matching  --  template data. --  @script TemplateData  local p = {}  -- general helper functions local function quote(s) 	return string.format(&#039;&quot;%s&quot;&#039;, s) end  local function ensureTable(v) 	if type(v) == &quot;table&quot; then return v end 	return {v} end  -- metatable helper functions  --- Try getting from nonDefaults, then from defaults...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mbwiki.stairwaygames.work/w/index.php?title=Module:TemplateData&amp;diff=6893&amp;oldid=prev"/>
		<updated>2023-08-09T10:43:38Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;--- Module copied from Genshin Impact wiki.  ---  A library used to process other modules&amp;#039; arguments and to output matching  --  &lt;a href=&quot;https://www.mediawiki.org/wiki/Extension:TemplateData&quot; class=&quot;extiw&quot; title=&quot;mw:Extension:TemplateData&quot;&gt;template data&lt;/a&gt;. --  @script TemplateData  local p = {}  -- general helper functions local function quote(s) 	return string.format(&amp;#039;&amp;quot;%s&amp;quot;&amp;#039;, s) end  local function ensureTable(v) 	if type(v) == &amp;quot;table&amp;quot; then return v end 	return {v} end  -- metatable helper functions  --- Try getting from nonDefaults, then from defaults...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--- Module copied from Genshin Impact wiki.&lt;br /&gt;
&lt;br /&gt;
---  A library used to process other modules&amp;#039; arguments and to output matching &lt;br /&gt;
--  [[mw:Extension:TemplateData|template data]].&lt;br /&gt;
--  @script TemplateData&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- general helper functions&lt;br /&gt;
local function quote(s)&lt;br /&gt;
	return string.format(&amp;#039;&amp;quot;%s&amp;quot;&amp;#039;, s)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function ensureTable(v)&lt;br /&gt;
	if type(v) == &amp;quot;table&amp;quot; then return v end&lt;br /&gt;
	return {v}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- metatable helper functions&lt;br /&gt;
&lt;br /&gt;
--- Try getting from nonDefaults, then from defaults.&lt;br /&gt;
local function getWithDefault(tbl, k)&lt;br /&gt;
	local value = tbl.nonDefaults[k]&lt;br /&gt;
	if value ~= nil then return value end&lt;br /&gt;
	return tbl.defaults[k]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Main generator function for pairs.&lt;br /&gt;
local function pairsWithDefaultGenerator(data)&lt;br /&gt;
	local tbl, params, i = unpack(data)&lt;br /&gt;
	i = i + 1&lt;br /&gt;
	if i &amp;gt; #params then&lt;br /&gt;
		return&lt;br /&gt;
	end&lt;br /&gt;
	local k = params[i]&lt;br /&gt;
	local v = getWithDefault(tbl, k)&lt;br /&gt;
	data[3] = i&lt;br /&gt;
	return k, v&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Main generator function for ipairs.&lt;br /&gt;
local function ipairsWithDefaultGenerator(tbl, i)&lt;br /&gt;
	i = i + 1&lt;br /&gt;
    local v = getWithDefault(tbl, i)&lt;br /&gt;
    if v ~= nil then&lt;br /&gt;
    	return i, v&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local METATABLE = {&lt;br /&gt;
	__name = &amp;quot;ArgsWithDefault&amp;quot;,&lt;br /&gt;
	__index = getWithDefault,&lt;br /&gt;
	__newindex = function(self, k, v)&lt;br /&gt;
		self.nonDefaults[k] = v&lt;br /&gt;
	end,&lt;br /&gt;
	__pairs = function(self)&lt;br /&gt;
		local paramSet = {}&lt;br /&gt;
		for k, _ in pairs(self.nonDefaults) do&lt;br /&gt;
			paramSet[k] = true&lt;br /&gt;
		end&lt;br /&gt;
		for k, _ in pairs(self.defaults) do&lt;br /&gt;
			paramSet[k] = true&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		local params = {}&lt;br /&gt;
		for k, _ in pairs(paramSet) do&lt;br /&gt;
			table.insert(params, k)&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		return pairsWithDefaultGenerator, {self, params, 0}&lt;br /&gt;
	end,&lt;br /&gt;
	__ipairs = function(self)&lt;br /&gt;
		return ipairsWithDefaultGenerator, self, 0&lt;br /&gt;
	end,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
	A table with configurable default values for properties.&lt;br /&gt;
	@{TemplateData.processArgs} returns objects of this type.&lt;br /&gt;
	&lt;br /&gt;
	In addition to acting as a regular map-style table, these tables include two&lt;br /&gt;
	sub-tables that allow access to default value and explicitly-set values, respectively.&lt;br /&gt;
	@type TableWithDefaults&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
	@factory TableWithDefaults&lt;br /&gt;
	@return {TableWithDefaults} A new table with defaults.&lt;br /&gt;
--]]&lt;br /&gt;
function p.createObjectWithDefaults()&lt;br /&gt;
	-- @export&lt;br /&gt;
	local out = {&lt;br /&gt;
		--[[&lt;br /&gt;
			A table of default entries.&lt;br /&gt;
			Initially, defaults come from the argument configuration, but they can be&lt;br /&gt;
			changed retroactively after the table has been created.&lt;br /&gt;
			&lt;br /&gt;
			Not included in `pairs(TableWithDefaults)` or `ipairs(TableWithDefaults)`.&lt;br /&gt;
		]]&lt;br /&gt;
		defaults={},&lt;br /&gt;
		--[[&lt;br /&gt;
			A table of manually-assigned entries.&lt;br /&gt;
			Useful for checking whether a property was set explicitly.&lt;br /&gt;
			(Assinging to the `TableWithDefaults` directly will update this table.)&lt;br /&gt;
			&lt;br /&gt;
			Not included in `pairs(TableWithDefaults)` or `ipairs(TableWithDefaults)`.&lt;br /&gt;
		]]&lt;br /&gt;
		nonDefaults={}&lt;br /&gt;
	}&lt;br /&gt;
	setmetatable(out, METATABLE)&lt;br /&gt;
	return out&lt;br /&gt;
end&lt;br /&gt;
--- @type end&lt;br /&gt;
&lt;br /&gt;
local CONFIG_DEFAULTS = {}&lt;br /&gt;
local CONFIG_TRANSFORMS = {}&lt;br /&gt;
-- note: self.name is set in `p.wrapConfig`, so it doesn&amp;#039;t need a default&lt;br /&gt;
function CONFIG_DEFAULTS:displayName()&lt;br /&gt;
	return self.name&lt;br /&gt;
end&lt;br /&gt;
function CONFIG_TRANSFORMS:displayName(value)&lt;br /&gt;
	return tostring(value)&lt;br /&gt;
end&lt;br /&gt;
function CONFIG_TRANSFORMS:alias(value)&lt;br /&gt;
	return ensureTable(value)&lt;br /&gt;
end&lt;br /&gt;
function CONFIG_DEFAULTS:displayAlias()&lt;br /&gt;
	if self.alias then&lt;br /&gt;
		local name = tostring(self.name)&lt;br /&gt;
		if self.displayName ~= name then&lt;br /&gt;
			-- swap name and displayName if displayName is an alias&lt;br /&gt;
			local output = {}&lt;br /&gt;
			for i, v in ipairs(self.alias) do&lt;br /&gt;
				v = tostring(v)&lt;br /&gt;
				if v == self.displayName then&lt;br /&gt;
					output[i] = name&lt;br /&gt;
				else&lt;br /&gt;
					output[i] = v&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			return output&lt;br /&gt;
		else&lt;br /&gt;
			return self.alias&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
function CONFIG_DEFAULTS:description()&lt;br /&gt;
	if self.type == &amp;quot;1&amp;quot; then&lt;br /&gt;
		return &amp;quot;Set to 1 to &amp;quot; .. self.config.trueDescription&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
function CONFIG_DEFAULTS:summary()&lt;br /&gt;
	if self.description then&lt;br /&gt;
		-- take everything up to (and including) the first period&lt;br /&gt;
		return self.description:match(&amp;#039;^.-%.&amp;#039;) or self.description&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
function CONFIG_DEFAULTS:example()&lt;br /&gt;
	if self.type == &amp;quot;1&amp;quot; then&lt;br /&gt;
		return 1&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
function CONFIG_TRANSFORMS:example(value)&lt;br /&gt;
	if type(value) == &amp;quot;table&amp;quot; then&lt;br /&gt;
		return quote(table.concat(value, &amp;#039;&amp;quot;, &amp;quot;&amp;#039;))&lt;br /&gt;
	else&lt;br /&gt;
		return quote(value)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
function CONFIG_DEFAULTS:displayDefault()&lt;br /&gt;
	if self.default then&lt;br /&gt;
		return quote(self.default)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
function CONFIG_DEFAULTS:displayType()&lt;br /&gt;
	if self.type == &amp;quot;1&amp;quot; then&lt;br /&gt;
		return &amp;quot;boolean&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	if self.type == &amp;quot;number&amp;quot; then&lt;br /&gt;
		return &amp;quot;number&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;line&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local CONFIG_WRAPPER_METATABLE = {&lt;br /&gt;
	__index = function(self, key)&lt;br /&gt;
		-- use value from config if present&lt;br /&gt;
		local value = self.config[key]&lt;br /&gt;
		&lt;br /&gt;
		-- else try to generate a default value&lt;br /&gt;
		if not value then&lt;br /&gt;
			local getter = CONFIG_DEFAULTS[key]&lt;br /&gt;
			if getter then&lt;br /&gt;
				value = getter(self)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if not value then&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		-- if value is present (and not false), run transform if needed&lt;br /&gt;
		local transform = CONFIG_TRANSFORMS[key]&lt;br /&gt;
		if transform then&lt;br /&gt;
			value = transform(self, value)&lt;br /&gt;
		end&lt;br /&gt;
		-- memoize and return&lt;br /&gt;
		self[key] = value&lt;br /&gt;
		return value&lt;br /&gt;
	end&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function p.wrapConfig(config, key)&lt;br /&gt;
	local output = {config = config, name = config.name or key}&lt;br /&gt;
	setmetatable(output, CONFIG_WRAPPER_METATABLE)&lt;br /&gt;
	return output&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Processes arguments based on given argument configs.&lt;br /&gt;
--  @param      {table} args The table of arguments to process.&lt;br /&gt;
--  @param      {ArgumentConfigTable} argConfigs The argument configs to use when processing `args`.&lt;br /&gt;
--  @param[opt] {table} options Extra options&lt;br /&gt;
--  @param[opt] {boolean} options.preserveDefaults Set true to treat `args` as a `TableWithDefaults`&lt;br /&gt;
--              and use its `defaults` and `nonDefaults` to set default/non-default values for&lt;br /&gt;
--              arguments that use the same name in both `args` and `argConfigs`&lt;br /&gt;
--              (i.e., this currently does not work with aliases).&lt;br /&gt;
--  @return     {TableWithDefaults} The processed version of the arguments.&lt;br /&gt;
function p.processArgs(args, paramConfigs, options)&lt;br /&gt;
	local preserveDefaults = false&lt;br /&gt;
	if type(options) == &amp;quot;table&amp;quot; and options.preserveDefaults and type(args.defaults) == &amp;quot;table&amp;quot; and type(args.nonDefaults) == &amp;quot;table&amp;quot; then&lt;br /&gt;
		preserveDefaults = true&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local out = p.createObjectWithDefaults()&lt;br /&gt;
	for key, config in pairs(paramConfigs) do&lt;br /&gt;
		key = config.name or key&lt;br /&gt;
		local value, default&lt;br /&gt;
		if preserveDefaults then&lt;br /&gt;
			value = args.nonDefaults[key]&lt;br /&gt;
			default = args.defaults[key] or config.default&lt;br /&gt;
		else&lt;br /&gt;
			value = args[key]&lt;br /&gt;
			default = config.default&lt;br /&gt;
		end&lt;br /&gt;
		if value == nil and config.alias then&lt;br /&gt;
			for _, alias in ipairs(ensureTable(config.alias)) do&lt;br /&gt;
				value = args[alias]&lt;br /&gt;
				if value ~= nil then break end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if config.type == &amp;quot;1&amp;quot; then&lt;br /&gt;
			if value ~= nil then&lt;br /&gt;
				value = value == &amp;quot;1&amp;quot; or value == 1 or value == true&lt;br /&gt;
			end&lt;br /&gt;
			default = default or false&lt;br /&gt;
		elseif config.type == &amp;quot;number&amp;quot; then&lt;br /&gt;
			value = tonumber(value)&lt;br /&gt;
		end&lt;br /&gt;
		out.nonDefaults[key] = value&lt;br /&gt;
		-- note that default values will not be processed by type&lt;br /&gt;
		out.defaults[key] = default&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- note that multiple layers of defaultFrom are not supported&lt;br /&gt;
	for key, config in pairs(paramConfigs) do&lt;br /&gt;
		key = config.name or key&lt;br /&gt;
		if config.defaultFrom then&lt;br /&gt;
			local to = key&lt;br /&gt;
			local from = config.defaultFrom&lt;br /&gt;
			-- allow defaulting from params that won&amp;#039;t appear in output&lt;br /&gt;
			-- use explicit default if param not found&lt;br /&gt;
			out.defaults[to] = out.nonDefaults[from] or out.defaults[from] or args[from] or out.defaults[to]&lt;br /&gt;
		end&lt;br /&gt;
		if config.error and out[key] == nil then&lt;br /&gt;
			local message = config.error&lt;br /&gt;
			if type(message) == &amp;quot;boolean&amp;quot; then&lt;br /&gt;
				message = &amp;quot;Please specify a value for the required argument \&amp;quot;&amp;quot; .. key .. &amp;quot;\&amp;quot;&amp;quot;&lt;br /&gt;
			end&lt;br /&gt;
			error(message, -1)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return out&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Creates and returns template data for display on a page.&lt;br /&gt;
--  @param      {ArgumentConfigList} argConfigs Argument configs to base the template data on.&lt;br /&gt;
--              Must use list form in order for parameter order to be predictable.&lt;br /&gt;
--  @param      {table} options Any other top-level keys to add to the template data.&lt;br /&gt;
--              Usually used to add `description` and `format`.&lt;br /&gt;
--  @param[opt] {Frame} frame Current frame. If not supplied, template data will be returned as a raw string,&lt;br /&gt;
--              which is useful for previewing in console, but will not display properly when output to wiki articles.&lt;br /&gt;
--  @return     {string} The template data.&lt;br /&gt;
function p.templateData(paramConfigs, options, frame)&lt;br /&gt;
	local json = require(&amp;quot;Module:JSON&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	local params = {}&lt;br /&gt;
	local paramOrder = {}&lt;br /&gt;
	local output = {&lt;br /&gt;
		params=params,&lt;br /&gt;
		paramOrder=paramOrder&lt;br /&gt;
	}&lt;br /&gt;
	for key, val in pairs(options) do&lt;br /&gt;
		output[key] = val&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for key, config in ipairs(paramConfigs) do&lt;br /&gt;
		config = p.wrapConfig(config)&lt;br /&gt;
		params[config.displayName] = { -- allow false to behave the same as nil for all properties&lt;br /&gt;
			aliases=config.displayAlias,&lt;br /&gt;
			label=config.label,&lt;br /&gt;
			description=config.description,&lt;br /&gt;
			type=config.displayType,&lt;br /&gt;
			default=config.displayDefault,&lt;br /&gt;
			example=config.example,&lt;br /&gt;
			auto=config.auto,&lt;br /&gt;
			required=config.status==&amp;quot;required&amp;quot; or nil,&lt;br /&gt;
			suggested=config.status==&amp;quot;suggested&amp;quot; or nil,&lt;br /&gt;
			deprecated=config.status==&amp;quot;deprecated&amp;quot; or nil,&lt;br /&gt;
		}&lt;br /&gt;
		table.insert(paramOrder, config.displayName)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if frame then&lt;br /&gt;
		return frame:extensionTag(&amp;quot;templatedata&amp;quot;, json.encode(output))&lt;br /&gt;
	else&lt;br /&gt;
		return &amp;quot;&amp;lt;templatedata&amp;gt;&amp;quot;..json.encode(output)..&amp;quot;&amp;lt;/templatedata&amp;gt;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function addLine(o)&lt;br /&gt;
	-- note: putting divs into code elements is not valid HTML,&lt;br /&gt;
	-- so instead use a span with CSS&lt;br /&gt;
	return o:tag(&amp;#039;span&amp;#039;):css(&amp;#039;display&amp;#039;, &amp;#039;block&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.syntax(paramConfigs, frame)&lt;br /&gt;
	frame = frame or mw.getCurrentFrame()&lt;br /&gt;
	local templateName = frame.args[1] or mw.title.new(frame:getTitle()).text&lt;br /&gt;
	&lt;br /&gt;
	local params = {}&lt;br /&gt;
	local maxNameLength = 0&lt;br /&gt;
	for key, config in ipairs(paramConfigs) do&lt;br /&gt;
		config = p.wrapConfig(config)&lt;br /&gt;
		local param = {&lt;br /&gt;
			name = config.displayName,&lt;br /&gt;
			nameLength = #config.displayName,&lt;br /&gt;
			summary = config.summary,&lt;br /&gt;
			aliases = config.displayAlias,&lt;br /&gt;
			status = config.status, -- (not currently displayed)&lt;br /&gt;
		}&lt;br /&gt;
		maxNameLength = math.max(maxNameLength, param.nameLength)&lt;br /&gt;
		&lt;br /&gt;
		table.insert(params, param)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local indent = maxNameLength + 4 -- 1ch from &amp;#039;|&amp;#039; + 3ch from &amp;#039; = &amp;#039;&lt;br /&gt;
	local output = mw.html.create(&amp;#039;code&amp;#039;):css({&lt;br /&gt;
		display=&amp;#039;inline-block&amp;#039;,&lt;br /&gt;
		[&amp;#039;line-height&amp;#039;]=&amp;#039;1.5&amp;#039;,&lt;br /&gt;
		[&amp;#039;white-space&amp;#039;]=&amp;#039;pre-wrap&amp;#039;,&lt;br /&gt;
		[&amp;#039;text-indent&amp;#039;]=-indent..&amp;#039;ch&amp;#039;,&lt;br /&gt;
		[&amp;#039;padding-left&amp;#039;]=&amp;#039;calc(&amp;#039;..indent..&amp;#039;ch + 4px)&amp;#039;, -- 4px from default padding&lt;br /&gt;
	})&lt;br /&gt;
	addLine(output):wikitext(&amp;quot;{{&amp;quot;):tag(&amp;#039;b&amp;#039;):wikitext(templateName)&lt;br /&gt;
	for _, param in ipairs(params) do&lt;br /&gt;
		local line = addLine(output)&lt;br /&gt;
		line:wikitext(&amp;#039;|&amp;#039;):tag(&amp;#039;b&amp;#039;):wikitext(param.name)&lt;br /&gt;
		for i = 1, maxNameLength - param.nameLength do&lt;br /&gt;
			line:wikitext(&amp;#039;&amp;amp;nbsp;&amp;#039;) -- regular spaces get collapsed on mobile&lt;br /&gt;
		end&lt;br /&gt;
		line:wikitext(&amp;#039; = &amp;#039;, param.summary)&lt;br /&gt;
		if param.aliases then&lt;br /&gt;
			line:wikitext(&amp;#039; (&amp;#039;, table.concat(param.aliases, &amp;#039;/&amp;#039;), &amp;#039;)&amp;#039;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	addLine(output):wikitext(&amp;quot;}}&amp;quot;)&lt;br /&gt;
	return output&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- A table (either list or map form) of @{ArgumentConfig} configurations for arguments.&lt;br /&gt;
--  &lt;br /&gt;
--  Modules will create such tables and pass them to @{TemplateData.processArgs}&lt;br /&gt;
--  and @{TemplateData.templateData} to control how arguments are processed and&lt;br /&gt;
--  what template data gets output, respectively.&lt;br /&gt;
--  @see @{ArgumentConfigList} and @{ArgumentConfigMap}&lt;br /&gt;
--  @see @{ArgumentConfig} for details on each argument&amp;#039;s configuration&lt;br /&gt;
--  @type ArgumentConfigTable&lt;br /&gt;
&lt;br /&gt;
--- An @{ArgumentConfigTable} that acts as a list of @{ArgumentConfig}.&lt;br /&gt;
--  @type ArgumentConfigList&lt;br /&gt;
&lt;br /&gt;
--- An @{ArgumentConfigTable} that acts as a map from argument name keys to @{ArgumentConfig} values.&lt;br /&gt;
--  @type ArgumentConfigMap&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Configuration for a single argument.&lt;br /&gt;
Modules will create tables that match this type for their @{ArgumentConfigTable}s.&lt;br /&gt;
@type ArgumentConfig&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
	--[[&lt;br /&gt;
	Argument name. If not provided,&lt;br /&gt;
	defaults to the key of this `ArgumentConfig` in the table that contains it.&lt;br /&gt;
	@property[opt]  {string} ArgumentConfig.name&lt;br /&gt;
	--]]&lt;br /&gt;
	&lt;br /&gt;
	--[[&lt;br /&gt;
	Display name for documentation.&lt;br /&gt;
	Typically used to mark one of the aliases (e.g., &amp;quot;1&amp;quot;) to use as the main&lt;br /&gt;
	name in the documentation while using a more descriptive name in code&lt;br /&gt;
	(e.g., `args.item_name`).&lt;br /&gt;
	@property[opt]  {string] ArgumentConfig.displayName&lt;br /&gt;
	]]&lt;br /&gt;
	&lt;br /&gt;
	--[[&lt;br /&gt;
	An alias or list of aliases, any of which clients can use instead of `name`&lt;br /&gt;
	in their module arguments.&lt;br /&gt;
	(`name` will take precedence if it appears along with an alias in the args,&lt;br /&gt;
	and if multiple aliases apppear, the first one in the list will take precedence.)&lt;br /&gt;
	@property[opt]  {string|table} ArgumentConfig.aliases&lt;br /&gt;
	--]]&lt;br /&gt;
&lt;br /&gt;
	--[[&lt;br /&gt;
	Display name to be used in template data.&lt;br /&gt;
	Has no effect on argument processing.&lt;br /&gt;
	@property[opt]  {string} ArgumentConfig.label&lt;br /&gt;
	--]]&lt;br /&gt;
	&lt;br /&gt;
	--[[&lt;br /&gt;
	Type of argument for automatic conversions.&lt;br /&gt;
	Supported values:&lt;br /&gt;
	* `&amp;quot;number&amp;quot;`: uses @{tonumber} on the argument value&lt;br /&gt;
	* `&amp;quot;1&amp;quot;`: converts argument value a boolean based on whether it&amp;#039;s the string `&amp;quot;1&amp;quot;`,&lt;br /&gt;
	  the number `1`, or the boolean `true`.&lt;br /&gt;
	@property[opt]  {string} ArgumentConfig.type&lt;br /&gt;
	--]]&lt;br /&gt;
	&lt;br /&gt;
	--[[&lt;br /&gt;
	Display type to be used in template data.&lt;br /&gt;
	Has no effect on argument processing.&lt;br /&gt;
	Overrides `ArgumentConfig.type` in template data.&lt;br /&gt;
	@property[opt]  {string} ArgumentConfig.displayType&lt;br /&gt;
	--]]&lt;br /&gt;
	&lt;br /&gt;
	--[[&lt;br /&gt;
	Default value to use for the argument if the user does not provide any&lt;br /&gt;
	(or if the `type` conversion produces a nil result).&lt;br /&gt;
	@property[opt]  {any} ArgumentConfig.default&lt;br /&gt;
	--]]&lt;br /&gt;
	&lt;br /&gt;
	--[[&lt;br /&gt;
	Display for default value to be used in template data.&lt;br /&gt;
	Has no effect on argument processing.&lt;br /&gt;
	Overrides `ArgumentConfig.default` in template data.&lt;br /&gt;
	@property[opt]  {any} ArgumentConfig.displayDefault&lt;br /&gt;
	--]]&lt;br /&gt;
	&lt;br /&gt;
	--[[&lt;br /&gt;
	Error message to use if argument is not specified.&lt;br /&gt;
	Set to `true` to use a default error message.&lt;br /&gt;
	(Note: setting this does NOT automatically set `status` to `&amp;quot;required&amp;quot;`.)&lt;br /&gt;
	@property[opt]  {string|boolean} ArgumentConfig.error&lt;br /&gt;
	--]]&lt;br /&gt;
	&lt;br /&gt;
	--[[&lt;br /&gt;
	Defaults to &amp;quot;optional&amp;quot;.&lt;br /&gt;
	Set to &amp;quot;required&amp;quot;, &amp;quot;suggested&amp;quot;, or &amp;quot;deprecated&amp;quot; to set corresponding flags&lt;br /&gt;
	in the template data.&lt;br /&gt;
	Has no effect on argument processing.&lt;br /&gt;
	@property[opt]  {string} ArgumentConfig.status&lt;br /&gt;
	--]]&lt;br /&gt;
	&lt;br /&gt;
	--[[&lt;br /&gt;
	Default value used in the Visual Editor.&lt;br /&gt;
	Has no effect on argument processing.&lt;br /&gt;
	@property[opt]  {any} ArgumentConfig.auto&lt;br /&gt;
	--]]&lt;br /&gt;
	&lt;br /&gt;
	--[[&lt;br /&gt;
	A description of the argument&amp;#039;s purpose.&lt;br /&gt;
	Has no effect on argument processing.&lt;br /&gt;
	@property[opt]  {string} ArgumentConfig.description&lt;br /&gt;
	--]]&lt;br /&gt;
	&lt;br /&gt;
	--[[&lt;br /&gt;
	Only used for arguments with a `type` of `&amp;quot;1&amp;quot;`.&lt;br /&gt;
	Describes what happens when the argument value is set to 1.&lt;br /&gt;
	Used to reduce boilerplate in descriptions for boolean args.&lt;br /&gt;
	@usage &amp;quot;output text without a link&amp;quot;&lt;br /&gt;
	@property[opt]  {string} ArgumentConfig.trueDescription&lt;br /&gt;
	--]]&lt;br /&gt;
	&lt;br /&gt;
	--[[&lt;br /&gt;
	Example value(s) for the argument.&lt;br /&gt;
	The value(s) will be surrounded by quotes in the template data.&lt;br /&gt;
	@property[opt]  {string|table} ArgumentConfig.example&lt;br /&gt;
	--]]&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Admin coral island</name></author>
	</entry>
</feed>