Renderingen-US

options

Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.

Binds CLI options metadata to a function declaration.

Syntax: fn <name>(...) options <ident> → <type>

Category#

entry

Examples#

radix/corpus/optiones/optiones.fab (canonical · keyword)#

Binds CLI options metadata to a function declaration.

# =============================================================================
# options — Binds CLI options metadata to a function declaration.
# =============================================================================
#
# What this teaches:
#   • Options bundle — The `options <ident> → <type>` syntax attaches a CLI options struct to a function.
#   • Declaration syntax — Options are declared as a modifier on the function signature, after the parameter list.
#
# Common mistakes:
#   • Duplicate flag definitions in options — each short and long flag must be unique within the CLI surface.
#
# See also: args, call
# =============================================================================

# options — CLI options bundle on fn
#
# GRAMMAR:
#   funcModifier :← ')' 'options' ident '→' type
#
# EXPECTED OUTPUT:
#   No main — declaration or test-runner surface only.
#
# BACKEND:
#   declaration-only CLI binding (whitelist: options/optiones.fab).
#

fn mitte() options Opts → string {
    return "ok"
}