npm.io
2.1.10 • Published 2 years ago

@types/sinon-stub-promise

Licence
MIT
Version
2.1.10
Deps
1
Size
4 kB
Vulns
0
Weekly
0

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 1536 GMT
  • Dependencies: @types/sinon

Credits

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