forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
consolidate.d.ts
75 lines (63 loc) · 2.21 KB
/
consolidate.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// Type definitions for consolidate
// Project: https://github.com/visionmedia/consolidate.js
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz>, Theo Sherry <https://github.com/theosherry>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Imported from: https://github.com/soywiz/typescript-node-definitions/consolidate.d.ts
/// <reference path="../node/node.d.ts" />
/// <reference path="../bluebird/bluebird-2.0.d.ts" />
declare module "consolidate" {
var cons: Consolidate;
export = cons;
interface Consolidate {
/**
* expose the instance of the engine
*/
requires: Object;
/**
* Clear the cache.
*
* @api public
*/
clearCache(): void;
// template engines
atpl: RendererInterface;
dot: RendererInterface;
dust: RendererInterface;
eco: RendererInterface;
ejs: RendererInterface;
ect: RendererInterface;
haml: RendererInterface;
// TODO figure out how to do haml-coffee
hamlet: RendererInterface;
handlebars: RendererInterface;
hogan: RendererInterface;
htmling: RendererInterface;
jade: RendererInterface;
jazz: RendererInterface;
jqtpl: RendererInterface;
just: RendererInterface;
liquid: RendererInterface;
liquor: RendererInterface;
lodash: RendererInterface;
mote: RendererInterface;
mustache: RendererInterface;
nunjucks: RendererInterface;
qejs: RendererInterface;
ractive: RendererInterface;
react: RendererInterface;
swig: RendererInterface;
templayed: RendererInterface;
toffee: RendererInterface;
underscore: RendererInterface;
walrus: RendererInterface;
whiskers: RendererInterface;
}
interface RendererInterface {
render(path: String, fn: (err: Error, html: String) => any): any;
render(path: String, options: {cache?: boolean, [otherOptions: string]: any}, fn: (err: Error, html: String) => any): any;
render(path: String, options?: { cache?: boolean, [otherOptions: string]: any }): Promise<String>;
(path: String, fn: (err: Error, html: String) => any): any;
(path: String, options: { cache?: boolean, [otherOptions: string]: any }, fn: (err: Error, html: String) => any): any;
(path: String, options?: { cache?: boolean, [otherOptions: string]: any }): Promise<String>;
}
}