# async-typescript-wrapper

Latest version **1.0.0** (published 2020-04-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install async-typescript-wrapper
pnpm add async-typescript-wrapper
yarn add async-typescript-wrapper
bun add async-typescript-wrapper
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-04-07 |
| First published | 2020-04-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | samrastovich |
| Maintainers | samrastovich |
| Keywords | async, wrapper |

## Links

- npm: https://www.npmjs.com/package/async-typescript-wrapper
- Repository: https://github.com/samrastovich/async-typescript-wrapper
- Homepage: https://github.com/samrastovich/async-typescript-wrapper#readme
- Issues: https://github.com/samrastovich/async-typescript-wrapper/issues
- npm.io page: https://npm.io/package/async-typescript-wrapper

## Dependencies (2)

- [async](https://npm.io/package/async.md) ^3.2.0
- [@types/async](https://npm.io/package/@types/async.md) ^3.2.0

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-04-07

## README

# Async.js Typescript Wrapper 

This repository is an extension of [AsyncJS](https://caolan.github.io/async/v3/) and requires it as a peer dependency. This package extends the functionality to work well with TypeScript and allows a more readable / approachable method to working with Async.  

## Usage 

Extend the **BaseAsyncJob** in your classes to utilize the library. Call **appendJobStep** on each function you want to add to the call stack.  

```typescript
import { BaseAsyncJob, CallbackDelegate } from 'async-typescript-wrapper';

class HelloWorldJob extends BaseAsyncJob {

    constructor() {
        this.initialize();
    }

    run(): Promise<any> {
        return this.performRun();
    }

    private initialize(): void {
        this.appendJobStep(this.logHello);
        this.appendJobStep(this.logWorld);
    }

    private logHello(callback: CallbackDelegate): void {
        console.log("Hello");
        callback();
    }

    private logWorld(callback: CallbackDelegate): void {
        console.log("World!");
        callback();
    }
}
```

---
_Source: https://npm.io/package/async-typescript-wrapper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
