From 91bb9c0ad289d96a5c4f0662be93d01b404f5696 Mon Sep 17 00:00:00 2001 From: Fyodor Soikin Date: Fri, 17 May 2013 11:27:04 -0400 Subject: [PATCH] Added types for ko.virtualElements.* --- knockout/knockout.d.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index 9a55cbe2a..1c1a7a351 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -224,14 +224,16 @@ interface KnockoutMemoization { parseMemoText(memoText); } +interface KnockoutVirtualElement {} + interface KnockoutVirtualElements { - allowedBindings; - emptyNode; - firstChild; - insertAfter; - nextSibling; - prepend; - setDomNodeChildren; + allowedBindings: { [bindingName: string]: bool; }; + emptyNode( e: KnockoutVirtualElement ); + firstChild( e: KnockoutVirtualElement ); + insertAfter( container: KnockoutVirtualElement, nodeToInsert: HTMLElement, insertAfter: HTMLElement ); + nextSibling( e: KnockoutVirtualElement ); + prepend( e: KnockoutVirtualElement, toInsert: HTMLElement ); + setDomNodeChildren( e: KnockoutVirtualElement, newChildren: { length: number;[index: number]: HTMLElement; } ); } interface KnockoutExtenders {