mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-27 11:40:08 +08:00
Added KnockoutBindingProvider, KnockoutComponents, KnockoutComponentLoader.
Added stubs for KnockoutComponentDefinition, KnockoutComponentConfig.
This commit is contained in:
Vendored
+28
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user