Typescript, Generics, Polymorphism.
data the fetchData receives in the response. In the case of getUserName we want the data returned from the fetching function to contain a user name. Otherwise, we get unsafe typing here and a risk of a runtime error. const result = await fetchData(url); console.log("name", result.data.name); /* Of