Typescript errors in new project

Since I last started a project in Meteor, new collection methods have been added, but the Typescript types for methods like insertAsync and countAsync are simply missing and I get red validation errors, even on a brand new project created with meteor create project --typescript

Anyone figured out how to fix that?

Which version of the npm package @types/meteor are you getting?

Hi @jorgeer - I am seeing @types/meteor": "^1.4.87

Looks like it is very out of date. I updated to latest version on npm and now it works - thanks for the tip…

Yep, might be that the scaffold for typescript doesn’t ship with an updated version of that package, which provides TS definitions to mongo, among other packages.

1 Like