hackhaton-space-stackHackhaton Space Stack
AcademyBuilder
Get Started
All terms
The Basics
  • Stack
  • Frontend & Backend
  • CLI
  • Monorepo
  • Server
  • Localhost
How AI Works
  • Context Window
  • Hallucination
  • Token
  • Prompt Caching
  • Session
  • Compaction
  • Embedding
  • Vector Database
  • RAG
  • Fine-tuning
  • Temperature
  • Inference
  • Reasoning
  • Multimodal
Building With AI
  • Agent
  • MCP
  • System Prompt
  • Skill
  • CLAUDE.md
  • Slash Command
  • Harness
  • Computer Use
  • Agents SDK
  • Voice Agents
  • OAuth
  • Vibe Coding
  • Permission Scope
  • Tool Calling
  • Prompt Injection
  • Eval
  • Guardrails
  • Sandbox
  • Progressive Disclosure
Code & Collaboration
  • Git
  • Commit
  • Branch
  • GitHub
  • Pull Request
  • Open Source
  • Markdown
  • Dependency
  • Merge
  • Fork
APIs & Connections
  • API
  • Auth
  • Database
  • ORM
  • SDK
  • Webhook
  • Endpoint
  • REST
  • HTTP Methods
  • Env File
  • Schema
  • JSON
  • YAML
  • Secret
  • Rate Limit
  • CORS
  • Cookie
  • Encryption
Shipping & Running
  • Deploy
  • Headless
  • Cron
  • DNS
  • CDN
  • Object Storage
  • Serverless
  • Edge
  • Worker
  • Runtime
  • Process
  • Daemon
  • Queue
  • Job
  • State
  • Cache
  • SSH
  • Build
  • Staging
  • Rollback
  • Docker
  • Feature Flag
  • Test
  • CI/CD
  • The Cloud
Debugging & Errors
  • Trace
  • Type Error
  • Stack Trace
  • Log
  • Bug
  • Patch
  • Latency
How Developers Think
  • DRY
  • YAGNI
  • KISS
  • Refactoring
  • Technical Debt
  • Async
← All terms

Type-safe, modern TypeScript scaffolding for full-stack web development

ThreadsGitHub

Info

  • Academy
  • Docs

Legal

  • Terms of Service
  • Privacy Policy

© 2026 Dzulhelmy Nazri

How Developers Think

$defineasync--plain-english

Async

TLDRWork that runs without making everything else wait in line.

Async is starting the kettle and answering the door.

await fetch(...) means "I'll come back when the water boils." The runtime can take other orders in the meantime. Sync would stand at the kettle and ignore the door — that is latency you chose.

The slow part is almost never your TypeScript. It is the wait you do not control: a database query, someone else's API, an email, a charge. The only question is whether the app freezes for that wait or keeps the lights on.

You've felt both checkouts

The bad Pay button goes dead. The page stops scrolling. You wonder if it took the money. That page stood at the kettle.

The good one says "working" and still behaves like a page. Same charge underneath. The room stayed open.

A queue is async for whole jobs — "send the receipt after they close the tab." A Promise is async for one function. Both mean: don't block the line for work that is just waiting.

The bug is using the water before it boils

The most common async mistake: you fire the request, then read the result on the next line before it exists. Empty list. undefined. An agent will swear the API is down. It isn't. The script forgot await.

When a model says it will go async so the UI stays alive, it is protecting you from a frozen demo. When it forgets to wait, you get a confident empty state. Paste the function. Ask: "Are we using the result before it arrives?"

At a hackathon, async the path the judge clicks — sign-in, save, pay. Leave the rest sequential if sequential is obvious. KISS still wins.

What this unlocks

Synchronous waits. Async walks off and comes back when the kettle clicks. The slow work did not get faster. The app stopped standing around for it.

Related

  • Queue
  • Job
  • Latency
PrevTechnical Debt

How Developers Think