Check out example codes for "typescript parse to string". It will help you in understanding the concepts better.

Code Example 1

window.location.hash = ""+page_number; 
window.location.hash = String(page_number);

Learn ReactJs, React Native from akashmittal.com