So, basically the issue is this: With the typings module being deprecated and type definitions coming in directly from npm itself I have an issue with a Meteor module, namely react-meteor-data.
I’m using barbatus:typescript and even though it’s a bit out of date at this point, I have no other issues.
The Meteor guide for React tells me to use
import { withTracker } from 'meteor/react-meteor-data';
if I want to use React and Meteor in combination. Visual Studio Code promptly tells me for this line of code that it cannot find the module.
Fine. Since the react-meteor-data.d.ts
definitions from typings are out of date anyway, I created my own definitions file.
Worked for a second, then “module not found”. I finally gave up and did this:
declare module 'meteor/react-meteor-data';
Which, as I understand it, should have short-circuited any type errors and simply cast the whole module to any
.
Which it didn’t. I’m still getting “module not found” in VS Code.
The site itself works just fine, by the way.
So, any hints as to what I have to do differently?