Skip to content
Permalink
Browse files

fix: improve typescript typings of SignalBindingBehavior.bind

Name / Names parameter was missing in the SignalBindingBehavior typings.

Closes #338
  • Loading branch information...
drothmaler committed Oct 11, 2018
1 parent ae49015 commit 347f1254bc4c8dc865c7114f880c814abf860af1
Showing with 4 additions and 5 deletions.
  1. +4 −5 src/signal-binding-behavior.js
@@ -10,17 +10,16 @@ export class SignalBindingBehavior {
this.signals = bindingSignaler.signals;
}

bind(binding, source) {
bind(binding, source, ...names) {
if (!binding.updateTarget) {
throw new Error('Only property bindings and string interpolation bindings can be signaled. Trigger, delegate and call bindings cannot be signaled.');
}
if (arguments.length === 3) {
let name = arguments[2];
if (names.length === 1) {
let name = names[0];
let bindings = this.signals[name] || (this.signals[name] = []);
bindings.push(binding);
binding.signalName = name;
} else if (arguments.length > 3) {
let names = Array.prototype.slice.call(arguments, 2);
} else if (names.length > 1) {
let i = names.length;
while (i--) {
let name = names[i];

0 comments on commit 347f125

Please sign in to comment.
You can’t perform that action at this time.