@types/sinon-as-promised
TypeScript icon, indicating that this package has built-in type declarations

4.0.16 • Public • Published

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

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

Credits

These definitions were written by igrayson.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/sinon-as-promised

Weekly Downloads

1,109

Version

4.0.16

License

MIT

Unpacked Size

4.13 kB

Total Files

5

Last publish

Collaborators

  • types