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.
This commit is contained in:
Sergio Morchón Poveda
2015-03-20 13:24:34 +01:00
parent 2e14c22f23
commit 8252b3e6a6

View File

@@ -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;
}
}