resolveValue<Value, Args>
Resolves a value from a value provider, which can be either a direct value or a function that returns a value.
Import:
import { resolveValue } from 'obsidian-dev-utils/value-provider';Signature:
function resolveValue(provider: ValueProvider<Value, Args>, args: Args & Partial<CommonArgs>): Promise<Value>Parameters:
| Parameter | Type | Description |
|---|---|---|
provider | ValueProvider<Value, Args> | The value provider to resolve. |
args | Args & Partial<CommonArgs> | The arguments to pass to the function if the provider is a function. |
Returns: Promise<Value> — A Promise that resolves with the value provided by the value provider.