title: param of a function in Parent scope
body: <p>I am following this tutorial <a href="http://www.angular-meteor.com/tutorials/socially/angular2/meteor-methods" rel="nofollow">http://www.angular-meteor.com/tutorials/socially/angular2/meteor-methods</a></p>
  
  <p>so having :</p>
  
  <pre><code>import {Parties} from './parties';
  
  function getContactEmail(user: Meteor.User): string {
      if (user.emails &amp;&amp; user.emails.length)
          return user.emails[0].address;
  
      return null;
  };
  
  Meteor.methods({
      invite: function(partyId: string, userId: string) {
          check(partyId, String);
          check(userId, String);
  
          let party = Parties.findOne(partyId);
  
          if (!party)
              throw new Meteor.Error('404', 'No such party!');
  
          if (party.public)
              throw new Meteor.Error('400', 'That party is public. No need to invite people.');
  
          if (party.owner !== this.userId)
              throw new Meteor.Error('403', 'No permissions!');
  
          if (userId !== party.owner &amp;&amp; (party.invited || []).indexOf(userId) == -1) {
              Parties.update(partyId, { $addToSet: { invited: userId } });
  
              let from = getContactEmail(Meteor.users.findOne(this.userId));
              let to = getContactEmail(Meteor.users.findOne(userId));
  
              if (Meteor.isServer &amp;&amp; to) {
                  Email.send({
                      from: 'noreply@socially.com',
                      to: to,
                      replyTo: from || undefined,
                      subject: 'PARTY: ' + party.name,
                      text: `Hi, I just invited you to ${party.name} on Socially.
                          \n\nCome check it out: ${Meteor.absoluteUrl()}\n`
                  });
              }
          }
      }
  });
  </code></pre>
  
  <p>and </p>
  
  <pre><code>invite(user: Meteor.User) {
          this.call('invite', this.party._id, user._id, (error) =&gt; {
              if (error) {
                  alert(`Failed to invite due to ${error}`);
                  return;
              }
  
              alert('User successfully invited.');
          });
      }
  </code></pre>
  
  <p>I can't understand the <code>(error) =&gt; {</code>, From where does the error value come?</p>