Lab 05: Async TypeScript
Step 1: Setup
docker run -it --rm node:20-alpine sh
npm install -g typescript ts-node
mkdir /lab05 && cd /lab05
cat > tsconfig.json << 'EOF'
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"moduleResolution": "node",
"strict": true,
"esModuleInterop": true,
"lib": ["ES2020"]
}
}
EOFStep 2: Typed Promises
Step 3: Async/Await with Error Typing
Step 4: Promise.all with Typed Tuples
Step 5: Async Generators
Step 6: AbortController with Types
Step 7: Typed EventEmitter
Step 8: Capstone — Async Pipeline
Summary
Concept
Pattern
Notes
Last updated
