mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
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:
6
knockout/knockout.d.ts
vendored
6
knockout/knockout.d.ts
vendored
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user