positional(_:annotation:default:)¶
Appends a positional-only parameter to the signature.
Declaration
func positional(
_ name: String,
annotation: (
any Parsable
)? = nil,
default: (
any Parsable
)? = nil
) -> Signature
Parameters
annotation: The annotation of the parameter.
default: The default value of the parameter.
Returns
A new signature with the positional-only parameter appended.