 
 
   toDynamicTargets: (targets) ->
+    @assertSingleArgument(arguments.length)
     for target in targets
       @assertTarget(target)
       @targets.push target



  toConnectionTarget: (connectionTarget) ->
    @assertConnectionTarget(connectionTarget)
    @connectionTargets.push connectionTarget
    return this

      @direction ? directions.null


  assertSingleArgument: (count) ->
    if count != 1
      throw new Error "Single argument expected, got #{count} instead"
    return this


  assertSource: (source) ->
    unless source?.getNodeSource?
      throw new Error "#{inspect source} is not a valid source node"
