forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
squirejs.d.ts
28 lines (25 loc) · 969 Bytes
/
squirejs.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Type definitions for Squire 0.2.1
// Project: https://github.com/iammerrick/Squire.js
// Definitions by: Bradley Ayers <https://github.com/bradleyayers>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module 'Squire' {
class Squire {
constructor();
constructor(context: string);
mock(name: string, mock: any): Squire;
mock(mocks: {[name: string]: any}): Squire;
require(dependencies: string[], callback: Function, errback?: Function): Squire;
store(name: string | string[]): Squire;
clean(): Squire;
clean(name: string | string[]): Squire;
remove(): String;
run(dependencies: string[], test: Function): (done: Function) => void;
}
namespace Squire {
namespace Helpers {
export function returns<T>(what: T): () => T;
export function constructs<T>(what: T): () => (() => T);
}
}
export = Squire;
}