Also, there was some talk about making typescript look for type definitions inside the npm packages before looking in a separate typings directory. It would allow package authors to include typings that fit each package version, so you don’t have to install them manually.
So, for the first error you might need typings. Try to run console.log( createContainer ) after the import statement to check if it is loaded even though the error appear. I my case it worked fine.
For the import { Bookings }, could you double check that allowJs is true in tsconfig.json? It will give you that exact error if it is false, and it works in my case when I import from the root folder like that.
First of all: Thank you very much for your support @birk.
So, for the first error you might need typings. Try to run console.log( createContainer ) after the import statement to check if it is loaded even though the error appear. I my case it worked fine.
How do I get typings for meteor packages like meteor-react-data? “typings search” did not work for me.
For the import { Bookings }, could you double check that allowJs is true in tsconfig.json? It will give you that exact error if it is false, and it works in my case when I import from the root folder like that.
Jupp, it is enabled. If I call the relative path it works fine:
import { Bookings } from '../../../external/collections/bookings.js'
The strange thing here is TypeScript seems to accept the non relational “external/” but then Meteor throws an error. If I use “/external/” the Meteor app works fine but TS throws an error.
I have a few apps of my own, but they are not written as tutorials. It shouldn’t take long to write the react-todo using typescript though.
Also a public one? I would love to see just how things are done (e.g. SimpleSchema, Admin Page, …).