From bf8e60395f29fc7beb2e3af526d5e7562ceca894 Mon Sep 17 00:00:00 2001 From: Philip Bulley Date: Fri, 28 Mar 2014 17:06:58 +0000 Subject: [PATCH] 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. --- zepto/zepto.d.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/zepto/zepto.d.ts b/zepto/zepto.d.ts index eb217e5b98..10c1ff6d51 100644 --- a/zepto/zepto.d.ts +++ b/zepto/zepto.d.ts @@ -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.