title: TypeScript Javascript patterns
body: <p>I am busy creating a <strong>meteor.d.ts</strong> to support my Typescript developments on the Meteor.js platform.  Current status can be found <a href="https://github.com/orefalo/meteorts-libs/blob/master/meteor.d.ts" rel="nofollow">here</a> </p>
  
  <p>With that said, I am having issues abstracting two typical javascript patterns.</p>
  
  <p>The first one <strong>Template.myTemplate.events(eventMap)</strong>, where myTemplate can be dynamically created by the user.</p>
  
  <p>Second, the ability to map <strong>this</strong> to a different interface. Meteor uses the pattern a lot. For instance, when calling Meteor.methods(..methods..), the methods are given access to this.isSimulation() which is not visible anywhere else.</p>
  
  <p>Kind of difficult to explain, so a look at the <a href="http://docs.meteor.com/#meteor_methods" rel="nofollow">meteor documentation</a> may help</p>
  
  <p>Any idea how to declare these two patterns?</p>
  
  <p>Thank you.</p>