# @types/sinon-as-promised

> TypeScript definitions for sinon-as-promised

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

## Install

```sh
npm install @types/sinon-as-promised
pnpm add @types/sinon-as-promised
yarn add @types/sinon-as-promised
bun add @types/sinon-as-promised
```

## 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.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.0.16 |
| Published | 2023-11-07 |
| First published | 2016-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51441 |
| Maintainers | types |

## Links

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

## Dependencies (1)

- [@types/sinon](https://npm.io/package/@types/sinon.md) *

## Recent versions

- 4.0.16 (latest) — 2023-11-07
- 4.0.14 (ts3.2) — 2020-09-26
- 4.0.13 (ts2.8) — 2020-03-31
- 4.0.9 (ts2.3) — 2018-05-10
- 4.0.6 (ts2.0) — 2017-03-10
- 4.0.15 — 2023-10-18
- 4.0.12 — 2018-12-12
- 4.0.11 — 2018-11-18
- 4.0.10 — 2018-05-24
- 4.0.8 — 2018-05-09
- 4.0.7 — 2017-06-05
- 4.0.5 — 2016-11-21
- 4.0.4 — 2016-09-19
- 4.0.3 — 2016-08-25
- 4.0.2 — 2016-08-19
- … 1 more at https://npm.io/package/@types/sinon-as-promised/versions

## README

# Installation
> `npm install --save @types/sinon-as-promised`

# Summary
This package contains type definitions for sinon-as-promised (https://github.com/bendrucker/sinon-as-promised).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinon-as-promised.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinon-as-promised/index.d.ts)
````ts
import * as s from "sinon";

declare module "sinon" {
    interface SinonStub {
        /**
         * Causes the stub to resolve with the provided value.
         *
         * @param value   Resolve value.
         * @remarks Any Promises/A+ compliant library will handle this object properly.
         */
        resolves<T>(value: T): SinonStub;

        /**
         * Causes the stub to reject with the provided error.
         *
         * @param error   Rejection error.
         * @returns A thenable which will return a rejected promise with the provided error.
         * @remarks If error is a string, it will be set as the message on an Error object.
         */
        rejects(error: any): SinonStub;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/sinon](https://npmjs.com/package/@types/sinon)

# Credits
These definitions were written by [igrayson](https://github.com/igrayson).

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