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.