Tour of Inferable
This is a function that fetches the content of a URL and returns it as a string. There's nothing special about it, it's just a function that you'd write in a Typescript application.
Pro tip: Use ← → arrow keys to navigate
async function getUrlContent({ url }: { url: string }) {
const response = await fetch(url);
const text = await response.text();
return text;
}