property

fun <T> property(name: String, block: PropertyBuilder<T>.() -> Unit): Property<T>(source)

Creates a single Property using the FF4K DSL.

This is a convenience top-level function for defining a property inline with a DSL block, which allows you to set the value, description, fixed values, and read-only status.

Example

val maxRetries: Property<Int> = property("max-retries") {
value = 3
description = "Maximum retry attempts"
fixedValues {
+1
+3
+5
}
}

Return

The fully-built Property of type T

Parameters

T

Type of the property value

name

Name of the property

block

DSL block used to configure the property

Throws

if the value type is unsupported