append() / before() support for ZeptoCollection arg

zepto.d.ts defines `append()` and `before()` methods for string, HTMLElement and HTMLElement[], but Zepto also supports ZeptoCollection. Added method overloads supporting ZeptoCollection.
This commit is contained in:
Philip Bulley
2014-03-28 17:06:58 +00:00
parent 2f592be9e6
commit bf8e60395f

15
zepto/zepto.d.ts vendored
View File

@@ -444,6 +444,11 @@ interface ZeptoCollection {
**/
after(content: HTMLElement): ZeptoCollection;
/**
* @see ZeptoCollection.after
**/
after(content: HTMLElement[]): ZeptoCollection;
/**
* @see ZeptoCollection.after
**/
@@ -465,6 +470,11 @@ interface ZeptoCollection {
* @see ZeptoCollection.append
**/
append(content: HTMLElement[]): ZeptoCollection;
/**
* @see ZeptoCollection.append
**/
append(content: ZeptoCollection): ZeptoCollection;
/**
* Append elements from the current collection to the target element. This is like append, but with reversed operands.
@@ -526,6 +536,11 @@ interface ZeptoCollection {
* @see ZeptoCollection.before
**/
before(content: HTMLElement[]): ZeptoCollection;
/**
* @see ZeptoCollection.before
**/
before(content: ZeptoCollection): ZeptoCollection;
/**
* Get immediate children of each element in the current collection. If selector is given, filter the results to only include ones matching the CSS selector.