forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mu2.d.ts
29 lines (19 loc) · 1.14 KB
/
mu2.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
// Type definitions for mu2
// Project: http://github.com/raycmorgan/mu
// Definitions by: Jeff Goddard <https://github.com/jedigo>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// Imported from: https://github.com/soywiz/typescript-node-definitions/mu2.d.ts
/// <reference path="../node/node.d.ts" />
declare module "mu2" {
export var root: string;
export function compileAndRender(templateName: string, view: any): NodeJS.ReadableStream;
export function compile(filename: string, callback: (err: Error, parsed: IParsed) => void): void;
export function compileText(name: string, template: string, callback: (err: Error, parsed: IParsed) => void): void;
export function compileText(name: string, template: string): IParsed;
export function compileText(template: string): IParsed;
export function render(filenameOrParsed: string, view: any): NodeJS.ReadableStream;
export function render(filenameOrParsed: IParsed, view: any): NodeJS.ReadableStream;
export function renderText(template: string, view: any, partials?: any): NodeJS.ReadableStream;
export function clearCache(templateName?: string): void;
export interface IParsed { }
}