Skip to content

[F] $doc

function $doc(
context,
target,
doc,
formatArgs?): void

Parameters

ParameterType
contextDecoratorContext
targetType
docstring
formatArgs?Type

Returns

void

Doc

attaches a documentation string. Works great with multi-line string literals.

The first argument to

Doc

is a string, which may contain template parameters, enclosed in braces, which are replaced with an attribute for the type (commonly β€œname”) passed as the second (optional) argument.

Doc

can be specified on any language element β€” a model, an operation, a namespace, etc.