mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
51 lines
943 B
TypeScript
51 lines
943 B
TypeScript
// Type definitions for doT v1.0.1
|
|
// Project: https://github.com/olado/doT
|
|
// Definitions by: ZombieHunter <https://github.com/ZombieHunter>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
declare var doT: doT.doTStatic;
|
|
|
|
declare namespace doT {
|
|
|
|
interface doTStatic {
|
|
/**
|
|
* Version number
|
|
*/
|
|
version: string;
|
|
/**
|
|
* Default template settings
|
|
*/
|
|
templateSettings: TemplateSettings;
|
|
|
|
/**
|
|
* Compile template
|
|
*/
|
|
template(tmpl: string, c?: TemplateSettings, def?: Object): Function;
|
|
|
|
/**
|
|
* For express
|
|
*/
|
|
compile(tmpl: string, def?: Object): Function;
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|
|
|
|
interface String {
|
|
encodeHTML(): string;
|
|
}
|