dependency

Function used to declare a dependency to a path and delegate access to its value within a ComputedValueContext.

If the dependency could not be found in the form during the execution of the computed value, then accessing this dependency will throw DependencyNotFoundException.

It should be used as follows:

private val ComputedValueContext.dependencyKey: Type by dependency(path)

Computed value dependency paths may contain a single recursive wildcard at the end, indicating that the computed value should be reevaluated by the form manager whenever a child value of the dependency changes. Otherwise, a dependency must contain no wildcards.