Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,32 @@ meteor add zodern:types
"preserveSymlinks": true,
"paths": {
"meteor/*": [
"node_modules/@types/meteor/*",
".meteor/local/types/packages.d.ts"
]
}
}
}
```

At the time of writing (2024-07-22), there are some Meteor core packages that don’t exist/cannot be imported. For those types, you can still import types from the DefinitelyTyped npm package by adding paths entries in tsconfig.json.

```jsonc
{
"compilerOptions": {
"preserveSymlinks": true,
"paths": {
// Workaround for https://github.com/zodern/meteor-types/issues/10
"meteor/react-meteor-data": [
"./node_modules/@types/meteor/react-meteor-data.d.ts"
],
// Workaround for https://github.com/meteor/meteor/issues/13240
"meteor/tools": ["./node_modules/@types/meteor/tools.d.ts"],
"meteor/*": ["./.meteor/local/types/packages.d.ts"]
},
}
}
```

`zodern:types` stores the type definitions from packages in your app's `.meteor/local/types` folder.
If your tsconfig has `exclude` configured, make sure the exclude rules do not exclude `.meteor/local/types`.

Expand Down