internal export interface _IObjectMap < T > { [ key ] : T ; } internal example param str param variables returns export const _formatString = ( str , vars ) : string => { if ( ! str ) { return '' ; } if ( ! vars ) { return str ; } const placeholdersRegex = /{(\w+)}/g ; return str . replace ( placeholdersRegex , ( _ , k ) => vars [ k ] || `{${ k }}` ) ; } ;