I have below code
const urlParams = new URLSearchParams(window.location.search); interface PersonType { fname: string lname: string } const person: P