typescript-async

Consolidate TypeScript async patterns for promises, cancellation, and concurrency.

1|1|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/Jylhis/skills --skill typescript-async
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-async
Source: https://github.com/Jylhis/skills/tree/main/skills/typescript-async
Command: npx skills add https://github.com/Jylhis/skills --skill typescript-async

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The skill helps developers write safer, more efficient asynchronous TypeScript code by consolidating best practices for promises, async/await, and cancellation.

Core Features & Use Cases

  • Promises & async/await: avoid nesting and ensure all promises are awaited or returned.
  • Cancellation & timeouts: leverage AbortController and Timeout to control long-running tasks.
  • Structured concurrency & backpressure: coordinate multiple async tasks and manage load.
  • Use Case: refactor a data fetch + processing pipeline to run fetches in parallel with bounded concurrency and safe cancellation.

Quick Start

Apply these patterns to your TypeScript codebase to implement safe, scalable async workflows.

Frequently Asked Questions about typescript-async

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I cancel a long-running async/await task in TypeScript?

You can cancel async/await tasks in TypeScript by leveraging AbortController and Timeout to control long-running execution. This pattern ensures safe cancellation by enforcing requirements for error handling and preventing hanging processes.

What is the best way to run parallel promises with bounded concurrency in TypeScript?

The best way to run parallel promises with bounded concurrency is using structured concurrency patterns. This coordinates multiple async tasks, manages backpressure, and safely handles data processing pipelines without overwhelming system resources.

How do I properly handle errors and timeouts with promises in TypeScript?

Proper error handling and timeouts for TypeScript promises require consolidating patterns that enforce safe execution. By avoiding nesting and ensuring all promises are awaited or returned, you prevent unhandled rejections across API clients and workflows.

Why does my TypeScript async function hang during parallel data fetches?

TypeScript async functions hang during parallel data fetches when lacking structured concurrency and safe cancellation. Refactoring the pipeline with bounded concurrency and AbortController ensures fetches complete or terminate without deadlocking.

Can I use AbortController to manage backpressure in TypeScript async workflows?

Yes, AbortController can manage backpressure in TypeScript async workflows by coordinating multiple tasks and terminating load. Combined with structured concurrency, it controls long-running tasks and enforces safe cancellation across data processing pipelines.

What are common TypeScript async/await anti-patterns to avoid?

Common TypeScript async/await anti-patterns include nesting promises and leaving promises unawaited. Avoiding these patterns ensures all promises are returned, enforcing requirements for error handling, timeouts, and structured concurrency across API clients.