mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Add a test for testing constructors
This commit is contained in:
@@ -12,3 +12,18 @@ var output2 = Mustache.render(template2, view2);
|
||||
var view3 = { firstName: "John", lastName: "Smith", blogURL: "http://testblog.com" };
|
||||
var template3 = "<h1>{{firstName}} {{lastName}}</h1>Blog: {{blogURL}}";
|
||||
var html = Mustache.to_html(template3, view3);
|
||||
|
||||
var view4 = new class extends Mustache.Context
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
super({});
|
||||
}
|
||||
|
||||
public lookup(name: string)
|
||||
{
|
||||
return name.toUpperCase();
|
||||
}
|
||||
};
|
||||
var template4 = "Hello, {{firstName}} {{lastName}}";
|
||||
var html4 = Mustache.render(template4, view4);
|
||||
Reference in New Issue
Block a user