Documents a function.
Must have the ---!function tag at the top of the file.
-
name: stringThe function's name, excluding its namespace. So
Duel.Removewould only haveRemoveas its name.- must be a valid lua binding when combined with its
namespace - must be unique when combined with its
namespace
- must be a valid lua binding when combined with its
-
namespace: string (optional)The namespace it belongs to. Can be omitted if the function is global.
- must be a valid lua binding when combined with its
name - must be unique when combined with its
name
- must be a valid lua binding when combined with its
-
description: stringThe function description.
- must resolve to a single markdown paragraph
-
summary: string (optional)A shorter description. Useful for quickly browsing a list of functions without having to read full paragraphs.
- must have 80 or fewer characters
- must resolve to a single markdown paragraph
-
guide: string (optional)A long form explanation for anything that can not be conveyed in the
description. Usually, it's for discussing more advanced functionality.- can have any markdown element
-
status: StatusDescribes the function's status in the codebase.
-
aliases: Alias[] (optional)The function's aliases.
Alias spec
-
name: stringThe name of the alias. Note that unlike the function
name, this should already have the namespace included.- must be a valid lua binding
-
status: StatusThe status of the alias.
See Status spec
-
-
parameters: Parameter[] (optional)The function's parameters.
- all parameter
names must be unique - parameters with
required: falsemust be at the end of the list - a parameter with
...asnamemust be the very last parameter
Parameter spec
-
name: stringThe parameter's name.
- must be a valid parameter name (a lua binding name but with no
.unless it's...)
- must be a valid parameter name (a lua binding name but with no
-
type: string[]The parameter's type(s), represented as a list to denote Union types. A parameter that can take either
CardorGroupwould havetype: [ Card, Group ].- must not be empty
- all members must be unique
-
required: boolean (optional)Whether a parameter is required. This defaults to
truein the loader script, meaning if it's omitted, the parameter is considered required. -
defaultValue: number | string | boolean (optional)The parameter's default value. If it's a string, it is treated as a lua expression to allow setting constants as
defaultValue. This means"5"and5would be equivalent. If an actual lua string is needed, they should be quoted again'"5"'.- must not be a lua keyword, except for "nil"
-
description: stringThe parameter's description.
- must resolve to a single markdown paragraph
-
summary: string (optional)A shorter description. Useful for quickly browsing a list of parameters without having to read full paragraphs.
- must have 80 or fewer characters
- must resolve to a single markdown paragraph
-
guide: string (optional)A long form explanation for anything that can not be conveyed in the
description. Currently unused for parameters.
- all parameter
-
returns: Return[] (optional)The function's return values.
- all return
names (that are supplied) must be unique - returns with
guaranteed: falsemust be at the end of the list - a return with
...asnamemust be the very last return
Return spec
-
name: string (optional)The return's name. Returns are not really named in lua, but a name can be optionally documented for easier discussion.
- follows the same rules as
parameternames for simplicity
- follows the same rules as
-
type: string[]The return's type(s), represented as a list to denote Union types. A return that can either be
CardorGroupwould havetype: [ Card, Group ].- must not be empty
- all members must be unique
-
guaranteed: boolean (optional)Whether a return is guaranteed to be... returned. This defaults to
truein the loader script, meaning if it's omitted, the return is considered guaranteed. -
description: stringThe return's description.
- must resolve to a single markdown paragraph
-
summary: string (optional)A shorter description. Useful for quickly browsing a list of returns without having to read full paragraphs.
- must have 80 or fewer characters
- must resolve to a single markdown paragraph
-
guide: string (optional)A long form explanation for anything that can not be conveyed in the
description. Currently unused for returns.
- all return
-
overloads: Overload[] (optional)Alternative signatures for the function.
Overload spec
-
parameters: Parameter[] (optional)The overload signature's parameters. See Parameter spec
- all parameter
names must be unique - parameters with
required: falsemust be at the end of the list - a parameter with
...asnamemust be the very last parameter
- all parameter
-
returns: Return[] (optional) The overload signature's return values. See Return spec- all return
names (that are supplied) must be unique - returns with
guaranteed: falsemust be at the end of the list - a return with
...asnamemust be the very last return
- all return
-
description: stringThe overload's description.
- must resolve to a single markdown paragraph
-
summary: string (optional)A shorter description. Useful for quickly browsing a list of overload without having to read full paragraphs.
- must have 80 or fewer characters
- must resolve to a single markdown paragraph
-
guide: string (optional)A long form explanation for anything that can not be conveyed in the
description. Usually, it's for discussing more advanced functionality.- can have any markdown element
-
-
suggestedLinks: SuggestedLink[] (optional)Suggestions for further reading. Also called "See Also" links.
-
tags: string[] (optional)A list of documentation tag names.