diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index 3fe5908ec..e2a5e2738 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -519,7 +519,7 @@ interface KnockoutStatic { ///////////////////////////////// - bindingProvider: any; + bindingProvider: KnockoutBindingProvider; ///////////////////////////////// // selectExtensions.js @@ -533,6 +533,33 @@ interface KnockoutStatic { }; } +interface KnockoutBindingProvider { + nodeHasBindings(node: Node): boolean; + getBindings(node: Node, bindingContext: KnockoutBindingContext): {}; + getBindingsString(node: Node, bindingContext: KnockoutBindingContext): string; + getBindingAccessors(node: Node, bindingContext: KnockoutBindingContext): { [key: string]: string; }; +} + +interface KnockoutComponents { + get(componentName: string, callback: (definition: KnockoutComponentDefinition) => void): void; + clearCachedDefinition(componentName: string): void; + loaders: any[]; +} + +interface KnockoutComponentDefinition { + // todo +} + +interface KnockoutComponentLoader { + getConfig? (componentName: string, callback: (result: KnockoutComponentConfig) => void): void; + loadComponent? (componentName: string, config: KnockoutComponentConfig, callback: (result: KnockoutComponentDefinition) => void): void; + suppressLoaderExceptions?: boolean; +} + +interface KnockoutComponentConfig { + // todo +} + interface KnockoutComputedContext { getDependenciesCount(): number; isInitial: boolean;