From 538af0796f9e0a081f5aa88bf778d8090c4884a5 Mon Sep 17 00:00:00 2001 From: Dave Allen Date: Thu, 29 Aug 2013 09:32:23 -0700 Subject: [PATCH] Minor change to intro --- meteor/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meteor/README.md b/meteor/README.md index 9ea635d45..3226bd8ee 100644 --- a/meteor/README.md +++ b/meteor/README.md @@ -1,6 +1,11 @@ #Meteor Type Definitions Usage Notes -In order to effectively write your Meteor app with TypeScript, there are a few extra things you will need to do in addition to simply referencing the Meteor type definition file and renaming all of your *.js files to *.ts (which alone will not work). +In order to effectively write your Meteor app with TypeScript, you will probably need to follow these steps: + +- Reference the type definitions file +- Create a Templates definitions file +- Create Collections within modules + ##Referencing Meteor type definitions in your app - Place the meteor.d.ts file in a directory (maybe `/lib/typescript`) @@ -23,6 +28,7 @@ This will make these typed Meteor variables/objects available across your applic *Please note that the Template variable is not automatically available. You need to follow the instructions below to use the Template variable.* + ##Defining Templates In order to call `Template.yourTemplateName.method`, you will need to create a simple TypeScript definition file that declares a Template variable containing a list of template view-models/managers of type IMeteorViewModel (or IMeteorManager, which is the same as IMeteorViewModel). A good place for this definition could be `/client/views/view-model-types.d.ts`. Here is an example of that file: