Files
bun.sh/integration/macro/fetchSync.tsx
2022-01-05 13:12:11 -08:00

9 lines
195 B
TypeScript

export async function fetchSync(ctx) {
const str = ctx.arguments[0].toString();
const response = await fetch(str);
const text = await response.text();
return <string value={text} />;
}