Files
DefinitelyTyped/i18next/lib/sinon.d.ts
T
Maarten Docter b0314518dc Added i18next TypeScript declarations source file + tests
i18next.d.ts file and test files as accepted by the library author Jan
Mühlemann. See pull request: https://github.com/jamuhl/i18next/pull/64

The jQuery / Mocha and Sinon *.d.ts files aren't my work and some seem
to be incomplete, but are only included because the original test page
(http://i18next.com/pages/test.html) uses them and they do the job.
2013-01-15 16:57:50 +01:00

33 lines
935 B
TypeScript

/// <reference path="jquery.d.ts" />
interface spy {
called: bool;
getCall(x: number): any;
fakeServer: ISinonFakeServer;
calledOnce: bool;
calledWith(x: any, message: string): bool;
}
interface IJsonReponse {
responseCode: number;
responseHeaders: any;
responseString: string;
}
interface ISinonFakeServer {
create(): any;
restore(): void;
respondWith(postType: string, relativeUrl: string, x: any): any;
respond(): any;
}
declare module sinon {
export function spy(): spy;
export function spy(fn: Function): spy;
//export function spy(jquery: JQueryStatic , x: string): spy;
export function spy(jquery: JQueryStatic , x: any): spy;
export function spy(obj: Object , methodName: string): spy;
export var fakeServer: ISinonFakeServer;
export function stub(x: any, name: string);
export function useFakeTimers(): void;
}