# @types/mpromise

> TypeScript definitions for mpromise

Latest version **0.5.33** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/mpromise
pnpm add @types/mpromise
yarn add @types/mpromise
bun add @types/mpromise
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.5.33 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/mpromise
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mpromise
- npm.io page: https://npm.io/package/@types/mpromise

## Recent versions

- 0.5.33 (latest) — 2023-11-07
- 0.5.30 (ts2.0) — 2017-08-21
- 0.5.32 — 2023-10-18
- 0.5.31 — 2023-09-27
- 0.5.29 — 2016-09-19
- 0.5.28 — 2016-07-14
- 0.5.27-alpha — 2016-07-08
- 0.5.26-alpha — 2016-07-04
- 0.5.25-alpha — 2016-07-02
- 0.5.24-alpha — 2016-07-01
- 0.5.23-alpha — 2016-07-01
- 0.5.22-alpha — 2016-05-25
- 0.5.21-alpha — 2016-05-20
- 0.5.16-alpha — 2016-05-19
- 0.5.15-alpha — 2016-05-17

## README

# Installation
> `npm install --save @types/mpromise`

# Summary
This package contains type definitions for mpromise (https://github.com/aheckmann/mpromise).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mpromise.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mpromise/index.d.ts)
````ts
interface IResolveFunction<F, R> {
    (err: R, ...args: F[]): void;
    (err: R, arg: F): void;
}

declare class Promise<F, R> {
    constructor(fn?: IResolveFunction<F, R>);

    static FAILURE: string;
    static SUCCESS: string;

    fulfill(...args: F[]): Promise<F, R>;
    reject(reason: R): Promise<F, R>;
    resolve(reason: R, ...args: F[]): Promise<F, R>;
    resolve(reason: R, arg: F): Promise<F, R>;

    onFulfill(callback: (...args: F[]) => void): Promise<F, R>;
    onReject(callback: (err: R) => void): Promise<F, R>;
    onResolve(callback: IResolveFunction<F, R>): Promise<F, R>;

    then<TRes>(
        onFulfilled: (...values: F[]) => TRes | PromiseLike<TRes>,
        onRejected?: (err: R) => TRes | PromiseLike<TRes>,
    ): Promise<TRes, R>;
    end(): void;

    chain(promise: Promise<F, R>): Promise<F, R>;
}

export = Promise;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Seulgi Kim](https://github.com/sgkim126).

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