From 8252b3e6a648e51c5184e4c7211971f325d8d4dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Morch=C3=B3n=20Poveda?= Date: Fri, 20 Mar 2015 13:24:34 +0100 Subject: [PATCH] Update KnockoutBindingHandler ``` init ``` & ``` update ``` with optional arguments. This makes sense if you want to call a binding from your code without passing all the parameters, when it is really optional. --- knockout/knockout.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index db8ab16aba..26c2821689 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -133,8 +133,8 @@ interface KnockoutAllBindingsAccessor { } interface KnockoutBindingHandler { - init?: (element: any, valueAccessor: () => any, allBindingsAccessor: KnockoutAllBindingsAccessor, viewModel: any, bindingContext: KnockoutBindingContext) => void | { controlsDescendantBindings: boolean; }; - update?: (element: any, valueAccessor: () => any, allBindingsAccessor: KnockoutAllBindingsAccessor, viewModel: any, bindingContext: KnockoutBindingContext) => void; + init?: (element: any, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor, viewModel?: any, bindingContext?: KnockoutBindingContext) => void | { controlsDescendantBindings: boolean; }; + update?: (element: any, valueAccessor: () => any, allBindingsAccessor?: KnockoutAllBindingsAccessor, viewModel?: any, bindingContext?: KnockoutBindingContext) => void; options?: any; preprocess?: (value: string, name: string, addBindingCallback?: (name: string, value: string) => void) => string; } @@ -641,4 +641,4 @@ declare var ko: KnockoutStatic; declare module "knockout" { export = ko; -} \ No newline at end of file +}