As part of the 3.4 meteor/mongo types are broken · Issue #14107 · meteor/meteor · GitHub PR, I added something I’ve been meaning to do a long time - self-tests of the published .d.ts file of a package (mongo).
The tinytest simply runs npx tsc on a custom tsconfig.json after finding the checked out source (it cannot test the isolated copy of the package because it needs to find all dependencies).
I don’t love the details of the solution but this is really needed - meteor has had many releases with broken types over the years.
Looking forward to feedback and improvements so we can add this to ALL meteor core packages.