Resolves all top-level properties of a configuration object asynchronously. For each property whose value is a function or Promise, executes/awaits the value and sets the property.
The configuration object to evaluate
A Promise resolving to a new object with all properties resolved
const evaluated = await evaluateConfigAsync({ key: async () => fetchKey(), url: 'https://api.openai.com/v1'});// { key: 'sk-...', url: 'https://api.openai.com/v1' } Copy
const evaluated = await evaluateConfigAsync({ key: async () => fetchKey(), url: 'https://api.openai.com/v1'});// { key: 'sk-...', url: 'https://api.openai.com/v1' }
Resolves all top-level properties of a configuration object asynchronously. For each property whose value is a function or Promise, executes/awaits the value and sets the property.