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

2.1.10 • Public • Published

Installation

npm install --save @types/sinon-stub-promise

Summary

This package contains type definitions for sinon-stub-promise (https://github.com/substantial/sinon-stub-promise).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinon-stub-promise.

index.d.ts

/// <reference types="sinon"/>

declare module "sinon" {
    interface SinonThenable {
        resolved: boolean;
        rejected: boolean;
        resolveValue: any;
        rejectValue: any;
        then(onFulfill: (resolveValue?: any) => void, onReject?: (rejectValue?: any) => void): SinonThenable;
        catch(onReject: (rejectValue?: any) => void): SinonThenable;
        finally(callback: () => void): SinonThenable;
    }

    interface SinonStub {
        thenable: SinonThenable;
        returnsPromise(): SinonStub;
        resolves(value?: any): SinonStub;
        rejects(value?: any): SinonStub;
    }
}

declare function sinonStubPromise(sinon: sinon.SinonStatic): void;
export = sinonStubPromise;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/sinon

Credits

These definitions were written by Thiago Temple, and Tim Stackhouse.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/sinon-stub-promise

Weekly Downloads

537

Version

2.1.10

License

MIT

Unpacked Size

4.34 kB

Total Files

5

Last publish

Collaborators

  • types