@alexaegis/common
Version:
Common utility functions
9 lines • 592 B
TypeScript
import { SimpleObjectKey } from './struct.type.js';
/**
* Maps and fills every string value in an object based on a variableMap.
*
* If the target object has a string value containing `"${variableName}"`, the
* corresponding value from the variableMap will be substitued into it.
*/
export declare const fillObjectWithTemplateVariables: <VariableKeys extends SimpleObjectKey, T extends Record<string | number, unknown> = Record<string | number, unknown>>(target: T, variables: Record<VariableKeys, string>) => T;
//# sourceMappingURL=fill-object-with-template-variables.function.d.ts.map