I have exported function in separated file
export function sum(population): string { return population.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, &quo