resetAsync

@JvmName(name = "reset")
fun <T> resetAsync(formSchema: Schema<T>, formValue: T, path: Path, coroutineScope: CoroutineScope = GlobalScope): CompletableFuture<Unit>
@JvmName(name = "reset")
fun <T> resetAsync(formSchema: Schema<T>, formValue: T, path: String, coroutineScope: CoroutineScope = GlobalScope): CompletableFuture<Unit>

Returns a future that completes once the values at path that are part of the form value formValue (with schema formSchema) have been reset to their initial value.

If the path has a trailing non-recursive wildcard, then all existing children of its parent value will have their value reset. E.g. assume that the list [1, 2, 3] exists at "/list" and that the schema of "/list/∗" has an initial value of 0; resetting "/list/∗" will thus cause "/list" to end up with [0, 0, 0].

Resetting the value on a path with a trailing recursive wildcard is considered equivalent to resetting the value on said path without such wildcard. E.g. resetting the value at "/x/∗∗" is equivalent to resetting the value at "/x".

The future will complete exceptionally with InvalidPathException if path matches no schemas, or when attempting to reset the root value.