how to get existing cookie using domain in typescript code example Example: check cookies client side const cookies = document.cookie