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.