[[% macro dataFunctions(dataType, funcName, returnType, description, funcArgs, examples) %]]

[[funcName]]([[% if funcArgs %]][[% for arg in funcArgs %]][[arg.argName]][[% if arg.optional %]]?[[% endif %]]: [[arg.longName]][[ ", " if not loop.last ]][[% endfor %]][[% endif %]]): [[returnType]]

[[description]]
[[% if funcArgs %]]

Function parameters

[[% for arg in funcArgs %]]
[[arg.argName]][[% if arg.optional %]]Optional[[% else %]]Required[[% endif %]][[ arg.type ]]

[[arg.description]]

[[% if arg.default %]]

Default: [[ arg.default ]]

[[% endif %]] [[% if arg.options %]]

One of: [[% for option in arg.options %]] [[option]][[ "," if not loop.last ]] [[% endfor %]]

[[% endif %]]
[[% endfor %]] [[% endif %]] [[% if examples %]]

Example[[% if example|length > 1 %]]s[[% endif %]]

[[% for example in examples %]] [[% if example|length > 1 %]]
[[ example.exampleName ]]
[[% endif %]] --8<-- "_snippets/data-function-code/[[example.code]].md" [[% endfor %]] [[% endif %]]

[[% endmacro %]]