resolveConfigValue
resolveConfigValue<
A,R>(configValue, …args):MaybePromiseLike<R>
Defined in: resolve-config-value.ts:17
Resolve a configuration value that may be a static value or a function returning the value.
If it’s a function, it will be called with the provided arguments. If it’s a static value, it will be returned as-is.
This allows configuration options to be defined either as fixed values or as functions that compute the value dynamically.
Type Parameters
Section titled “Type Parameters”A extends unknown[]
R
Parameters
Section titled “Parameters”configValue
Section titled “configValue”R | MaybeAsyncCallable<A, R>
The configuration value or function to resolve.
…A
Arguments to pass if the configValue is a function.
Returns
Section titled “Returns”MaybePromiseLike<R>
The resolved configuration value, possibly a Promise if async.