mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
76 lines
2.2 KiB
TypeScript
76 lines
2.2 KiB
TypeScript
// 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/borisyankov/DefinitelyTyped
|
|
|
|
// Imported from: https://github.com/soywiz/typescript-node-definitions/consolidate.d.ts
|
|
|
|
/// <reference path="../node/node.d.ts" />
|
|
/// <reference path="../bluebird/bluebird.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>;
|
|
}
|
|
}
|