mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Mustache.js definitions and tests added
This commit is contained in:
Vendored
+50
@@ -0,0 +1,50 @@
|
||||
// Type definitions for Mustache 0.7
|
||||
// Project: https://github.com/janl/mustache.js
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface MustacheScanner {
|
||||
string: string;
|
||||
tail: string;
|
||||
pos: number;
|
||||
|
||||
eos(): bool;
|
||||
scan(re: RegExp): string;
|
||||
scanUntil(re: RegExp): string;
|
||||
}
|
||||
|
||||
interface MustacheContext {
|
||||
view;
|
||||
parent;
|
||||
|
||||
clearCache();
|
||||
push(view): MustacheContext;
|
||||
lookup(name: string): any;
|
||||
}
|
||||
|
||||
interface MustacheWriter {
|
||||
clearCache();
|
||||
compile(template: string, tags);
|
||||
compilePartial(name, template, tags);
|
||||
compileTokens(tokens, template);
|
||||
render(template, view, partials);
|
||||
}
|
||||
|
||||
interface MustacheStatic {
|
||||
name: string;
|
||||
version: string;
|
||||
tags: string;
|
||||
Scanner: MustacheScanner;
|
||||
Context: MustacheContext;
|
||||
Writer: MustacheWriter;
|
||||
escape;
|
||||
|
||||
parse(template: string, tags);
|
||||
clearCache(): MustacheWriter;
|
||||
compile(template: string, tags): MustacheWriter;
|
||||
compilePartial(name: string, template: string, tags): MustacheWriter;
|
||||
compileTokens(tokens, template: string): MustacheWriter;
|
||||
render(template: string, view: any, partials?: any): MustacheWriter;
|
||||
to_html(template: string, view: any, partials?: any, send?): string;
|
||||
}
|
||||
|
||||
declare var Mustache: MustacheStatic;
|
||||
Reference in New Issue
Block a user