Jackpile
Jackpile

Reputation: 1075

Automatically import Meteor packages as external library NOT WORKING for .ts files

I'm trying to convert a Node project written mostly with TypeScript to Meteor 1.4 and having trouble.

WebStorm claims to automatically import meteor when the option is checked as described in https://www.jetbrains.com/help/webstorm/2016.3/meteor.html. But this doesn't resolve references in original *.ts files.

For example, Assets.getText() is not being resolved in .ts but is resolved in .js that's generated.

Is this a WebStorm oversight/bug or how can I manually import Meteor typings to move forward?

Upvotes: 1

Views: 116

Answers (1)

Jackpile
Jackpile

Reputation: 1075

After digging, I solved this by installing typings for meteor from https://github.com/meteor-typings and include it:

% typings install env~meteor --save --global

tsconfig.json:

  "include": [
    "typings/**/*.ts"  
  ]

Upvotes: 0

Related Questions