Template:APIDoc/doc
Jump to navigation
Jump to search
Template:APIDoc invokes function main in Module:APIDoc using Lua.
The APIDoc template generates a table to describe a module's public function.
{{APIDoc |funcName = |funcDesc = |arg1 = |type1 = |desc1 = |returnType = |returnDesc = }}
Usage
No arguments, no return value
someFunction() | |||
This function does something. | |||
Returns | -- |
No arguments, return value
someFunction() | |||
This function does something. | |||
Type | Description | ||
Returns | table | A table of data. |
One argument, no return value
someFunction(a) | |||
This function does something. | |||
Argument | Type | Description | Optional |
a | number | A number of some kind. | |
Returns | -- |
Multiple arguments, return value
someFunction(a, b) | |||
This function does something. | |||
Argument | Type | Description | Optional |
a | number | A number of some kind. | |
b | string | A string of some kind. | |
Returns | table | A table of data. |
Arguments
Argument | Optional? | ||||
---|---|---|---|---|---|
funcName | The function's name | ||||
Values | Any text | ||||
funcDesc | The function's description | ||||
Values | Any text | ||||
arg1 arg2 ...argN |
An argument's name | ||||
Values | Any text | ||||
type1 type2 ...typeN |
An argument's type | ||||
Values | Any text | ||||
desc1 desc2 ...descN |
An argument's description | ||||
Values | Any text | ||||
optional1 optional2 ...optionalN |
If an argument is optional | ||||
Values | Yes or unset
|
Default | No
| ||
returnType | The function's return type | ||||
Values | Any text | ||||
returnDesc | The function's return value description | ||||
Values | Any text | ||||