Interface IMeteorViewModel

To use Meteor's Template.templateName.function, you must define an interface in a separate file with extension ".d.ts". Within the interface, every template name must have a property by that name that is of type IMeteorViewModel or IMeteorManager (choose either depending on your philosophical preference -- both work the same) e.g. file ".../client/views/view-model-types.d.ts":

      interface ITemplate {
        postsList: IMeteorViewModel;
        comment: IMeteorViewModel;
        notifications: IMeteorViewModel;
        [your template name]: IMeteorViewModel;
      }
      declare var Template: ITemplate;

Index

Methods

Methods

public created(callback: Function)

Parameters

  • callback: Function

public destroyed(callback: Function)

Parameters

  • callback: Function

public events(eventMap: { [eventName: string]: Function; })

Parameters

  • eventMap: { [eventName: string]: Function; }

public helpers(helpers: Object)

Parameters

  • helpers: Object

public preserve(selector: Object)

Parameters

  • selector: Object

public rendered(callback: Function)

Parameters

  • callback: Function