@web-bee-ru/openapi-axios
Version:
A TypeScript abstraction over Axios for typed requests generated from OpenAPI (Swagger) schemas using openapi-typescript.
12 lines (11 loc) • 665 B
TypeScript
type InterpolationMap = (param: string, value: any) => any;
/**
* @description Replaces placeholders in a pattern string with corresponding values from the `params` object.
*
* @param pattern - The string pattern containing placeholders in the format `{paramName}`.
* @param params - An object containing parameter values keyed by their names.
* @param map - An optional mapping function to transform values before interpolation.
* @returns The interpolated string with placeholders replaced by their corresponding values.
*/
export declare function interpolateParams(pattern: string, params: Record<string, any>, map?: InterpolationMap): string;
export {};