Being able to auto type API endpoint according the use. This could be achieveable using TypeScript template literals.
Example:
Having these API endpoints:
/api/users
/api/companies
We should be able to use a hook that changes the returned based on the endpoint we ask for:
const { data } = useAPI('users'); // This will return type `{ data: User[] }`
const { data } = useAPI('companies') // This will return type `{ data: Company[] }`
...WIP