mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #289 from async7/master
Updates to JQuery and Mustache Definitions
This commit is contained in:
@@ -2220,6 +2220,13 @@ function test_prop() {
|
||||
var title: string = $('option:selected', this).prop('title');
|
||||
}
|
||||
|
||||
|
||||
function test_selector() {
|
||||
var $main = $('#main');
|
||||
var $mainDivs = $('div', $main);
|
||||
return $mainDivs.selector == '#main div';
|
||||
}
|
||||
|
||||
function test_text() {
|
||||
var str = $("p:first").text();
|
||||
$("p:last").html(str);
|
||||
|
||||
Vendored
+1
@@ -700,6 +700,7 @@ interface JQuery {
|
||||
PROPERTIES
|
||||
***********/
|
||||
length: number;
|
||||
selector: string;
|
||||
[x: string]: HTMLElement;
|
||||
[x: number]: HTMLElement;
|
||||
|
||||
|
||||
@@ -5,4 +5,7 @@ var output = Mustache.render("{{title}} spends {{calc}}", view);
|
||||
|
||||
var person;
|
||||
var template = "<h1>{{firstName}} {{lastName}}</h1>Blog: {{blogURL}}";
|
||||
var html = Mustache.to_html(template, person);
|
||||
var html = Mustache.to_html(template, person);
|
||||
|
||||
var writer = Mustache.compile(template);
|
||||
var writerOutput = writer(view);
|
||||
|
||||
Vendored
+2
@@ -24,6 +24,7 @@ interface MustacheContext {
|
||||
}
|
||||
|
||||
interface MustacheWriter {
|
||||
(view: any): string;
|
||||
clearCache();
|
||||
compile(template: string, tags);
|
||||
compilePartial(name, template, tags);
|
||||
@@ -42,6 +43,7 @@ interface MustacheStatic {
|
||||
|
||||
parse(template: string, tags);
|
||||
clearCache(): MustacheWriter;
|
||||
compile(template: string): MustacheWriter;
|
||||
compile(template: string, tags): MustacheWriter;
|
||||
compilePartial(name: string, template: string, tags): MustacheWriter;
|
||||
compileTokens(tokens, template: string): MustacheWriter;
|
||||
|
||||
Reference in New Issue
Block a user