Files
bun.sh/test/macro/fetchSync.tsx
2022-06-22 23:21:48 -07: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} />;
}