ts-quiz— ~/loading.ts
tsc --watch● loading…
// tsc --watch · type-checking modules…
await load("loading.ts")
// streaming server components
◇ tsc 6.0.3 · compiling…UTF-8◇ loading…
async def slow():
await asyncio.sleep(5)
return 1
async def main():
try:
return await asyncio.wait_for(slow(), timeout=0.1)
except asyncio.TimeoutError:
print("timeout")
asyncio.run(main())