mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
Fixed tests/knockout-templatingBehaviors-tests.ts.
This commit is contained in:
Vendored
+1
-1
@@ -548,7 +548,7 @@ interface KnockoutStatic {
|
||||
interface KnockoutBindingProvider {
|
||||
nodeHasBindings(node: Node): boolean;
|
||||
getBindings(node: Node, bindingContext: KnockoutBindingContext): {};
|
||||
getBindingAccessors(node: Node, bindingContext: KnockoutBindingContext): { [key: string]: string; };
|
||||
getBindingAccessors?(node: Node, bindingContext: KnockoutBindingContext): { [key: string]: string; };
|
||||
}
|
||||
|
||||
interface KnockoutComponents {
|
||||
|
||||
@@ -363,11 +363,11 @@ describe('Templating', function() {
|
||||
// and external (non-rewritten) ones
|
||||
var originalBindingProvider = ko.bindingProvider.instance;
|
||||
ko.bindingProvider.instance = {
|
||||
nodeHasBindings: function(node, bindingContext) {
|
||||
return (node.tagName == 'EM') || originalBindingProvider.nodeHasBindings(node, bindingContext);
|
||||
nodeHasBindings: function(node) {
|
||||
return ((<Element>node).tagName == 'EM') || originalBindingProvider.nodeHasBindings(node);
|
||||
},
|
||||
getBindings: function(node, bindingContext) {
|
||||
if (node.tagName == 'EM')
|
||||
if ((<Element>node).tagName == 'EM')
|
||||
return { text: ++model.numBindings };
|
||||
return originalBindingProvider.getBindings(node, bindingContext);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user