DefinitelyTyped/dot/index.d.ts
Andy c5a6992bef dot: Convert to external module style (#13992)
Add an optional extended description…
2017-01-13 12:02:01 -08:00

43 lines
966 B
TypeScript

// Type definitions for doT 1.1
// Project: https://github.com/olado/doT
// Definitions by: ZombieHunter <https://github.com/ZombieHunter>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export as namespace doT;
/** Version number */
export const version: string;
/** Default template settings */
export const templateSettings: TemplateSettings;
type RenderFunction = (...args: any[]) => string;
/** Compile template */
export function template(tmpl: string, c?: TemplateSettings, def?: {}): RenderFunction;
/** For express */
export function compile(tmpl: string, def?: {}): RenderFunction;
interface TemplateSettings {
evaluate: RegExp;
interpolate: RegExp;
encode: RegExp;
use: RegExp;
useParams: RegExp;
define: RegExp;
defineParams: RegExp;
conditional: RegExp;
iterate: RegExp;
varname: string;
strip: boolean;
append: boolean;
selfcontained: boolean;
}
declare global {
interface String {
encodeHTML(): string;
}
}