mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
I was omitting the -noImplicitAny flag when testing; interestingly, even the old (0.7.3) definitions failed the Travis CI tests...
12 lines
458 B
TypeScript
12 lines
458 B
TypeScript
/// <reference path="mustache-0.7.3.d.ts" />
|
|
|
|
var view = { title: "Joe", calc: function () { return 2 + 4; } };
|
|
var output = Mustache.render("{{title}} spends {{calc}}", view);
|
|
|
|
var person = { firstName: "John", lastName: "Smith", blogURL: "http://testblog.com" };
|
|
var template = "<h1>{{firstName}} {{lastName}}</h1>Blog: {{blogURL}}";
|
|
var html = Mustache.to_html(template, person);
|
|
|
|
var writer = Mustache.compile(template);
|
|
var writerOutput = writer(view);
|