Configuring Webstorm for Meteor

I think I have Webstorm configured correctly for Meteor projects with pretty much everything working as I would expect. However there are some oddities and I just want to check that I haven’t missed something.

For instance if in code I have “new Meteor.Collection.ObjectID()” it underlines ObjectID with the warning being ‘Unresolved type ObjectID’. Another example with the same warning is “Meteor.bindEnvironment”.

Is there anything I can do for it to recognise these as being valid?

Instead of Meteor.Collection.ObjectID you could use Mongo.ObjectID.

For the bindEnvironment, that one is indeed undefined in the meteor type definitions. Meteor.wrapAsync is defined though, so If you really want a simple solution, you could play with that one.

A better solution would be to install new Meteor typings trough typings. See here for more info:

Thank you for pointing me towards typings - it is not something I have heard of before.

The instructions on the link you gave were quite brief - I ran typings install registry:env/meteor --global and it created a ‘typings’ directory in my project folder.

Do then need to then configure Webstorm to use it? If so, do you know how I go about doing that?

Just curious, is this a Typescript issue or Meteor/Webstorm in general?

It’s a Meteor/Webstorm issue.

I just wanted to make sure that I had Webstorm configured as best as possible to work with Meteor and found it strange that it was marking valid code such as Meteor.Collection.ObjectID as being ‘unresolvable’.