typescript cast to string code example Example: typescript parse to string window.location.hash = ""+page_number; window.location.hash = String(page_number);