diff --git a/sinon-mongoose/sinon-mongoose-tests.ts b/sinon-mongoose/sinon-mongoose-tests.ts new file mode 100644 index 0000000000..1d32e25776 --- /dev/null +++ b/sinon-mongoose/sinon-mongoose-tests.ts @@ -0,0 +1,6 @@ +/// +function testChain() { + sinon.stub().chain('exec'); +} + +testChain(); diff --git a/sinon-mongoose/sinon-mongoose.d.ts b/sinon-mongoose/sinon-mongoose.d.ts new file mode 100644 index 0000000000..13e8a3f3a6 --- /dev/null +++ b/sinon-mongoose/sinon-mongoose.d.ts @@ -0,0 +1,18 @@ +// Type definitions for sinon-mongoose v1.3.0 +// Project: https://github.com/underscopeio/sinon-mongoose +// Definitions by: stevehipwell +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare namespace Sinon { + + export interface SinonStub { + + /** + * When called, the stub will create a new stub to represent a mongoose chained function. + */ + chain(name: string): SinonStub + } + +}