Typescript, Generics, Polymorphism.
await response.json(); return { data: data, error: null }; } catch (error) { return { data: null as any, error: error.message }; } } const getUserName = async () => { const url = 'https://api.example.com/user'; // explicit type binding here const result = await fetchData<User>(url); if