mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-04 16:04:45 +08:00
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.
33 lines
935 B
TypeScript
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;
|
|
} |