meteor-typescript
Use when setting up or repairing Meteor application declarations, TypeScript configuration, JavaScript IntelliSense, or local and CI type-checking. Triggers on meteor types, meteor/* imports resolving to any, missing declarations, duplicate Meteor identifiers, zodern:types, @types/meteor, .meteor/types, tsconfig.json, jsconfig.json, and tsc --noEmit in a Meteor app. Use this skill when choosing or migrating declaration providers without changing the app's runtime or bundler. For a Meteor 2-to-3 runtime migration use migrate-to-meteor-3 first; for SWC/Rspack compilation use meteor-modern-build-stack or migrate-to-rspack. General TypeScript language questions and Atmosphere declaration publishing are outside this app scope.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- meteor-typescript
- license
- MIT
- metadata
- { "area": "build", "kind": "knowledge", "author": "meteor", "meteor": ">=3.0", "tagline": "Configure Meteor app declarations, TypeScript and JavaScript IntelliSense, and reliable local/CI type-checking.", "docs_synced_at": "2026-10-07" }
- description
- Use when setting up or repairing Meteor application declarations, TypeScript configuration, JavaScript IntelliSense, or local and CI type-checking. Triggers on meteor types, meteor/* imports resolving to any, missing declarations, duplicate Meteor identifiers, zodern:types, @types/meteor, .meteor/types, tsconfig.json, jsconfig.json, and tsc --noEmit in a Meteor app. Use this skill when choosing or migrating declaration providers without changing the app's runtime or bundler. For a Meteor 2-to-3 runtime migration use migrate-to-meteor-3 first; for SWC/Rspack compilation use meteor-modern-build-stack or migrate-to-rspack. General TypeScript language questions and Atmosphere declaration publishing are outside this app scope.
02 资源文件 3
- 参考文档references/declaration-providers.md10.3 KB
- 参考文档references/eval-cases.md11.2 KB
- 参考文档references/javascript-intellisense.md2.4 KB
03 SKILL.md 正文
TypeScript in Meteor applications
Make the editor and checker resolve the intended Meteor declarations and actually inspect application source. Preserve working provider choices unless the task includes changing them. A runtime or bundler upgrade does not imply a declaration migration.
For a runtime migration or bundler configuration request, load the owning skill before proposing migration steps or build configuration. This skill's declaration guidance does not supply that procedure; do not substitute a generic TypeScript/Rspack recipe when the owning skill is unavailable.
Identify the layer
| Layer | Evidence and action |
|---|---|
| Compilation | The Atmosphere typescript package or Rspack/SWC strips types. Use the build owner for syntax transforms, loaders and bundling. |
| Declaration provider | Inspect .meteor/packages, .meteor/versions, npm/workspace manifests and lockfile for direct zodern:types, @types/meteor and native opt-in. |
| Resolution | Inspect active tsconfig.json/jsconfig.json, extends, files, include, exclude, paths and types. Check the editor uses the intended project/compiler. |
| Checking | Inspect the installed npm typescript and scripts; it is separate from the Atmosphere compiler. Preserve a configured checker such as TsCheckerRspackPlugin. |
Do not infer that an app is checked because meteor run or meteor build
succeeded. Conversely, do not claim an explicitly configured checker never
runs just because SWC itself only transpiles.
Choose the provider
Native package declarations are available on Meteor 3.6+.
| Target and intent | Decision |
|---|---|
| Meteor 3 before 3.6 | Native meteor types is unavailable. Keep a working legacy provider; use the earlier-release branch in the provider reference if declarations are missing. |
| New Meteor 3.6 TypeScript, TypeScript + Tailwind, Svelte or Angular app | The scaffold selects native declarations and meteor create generates them. Keep that provider; regenerate after cloning or changing packages. |
| Existing app upgraded to 3.6 with working legacy types | Keep its provider and paths unless native adoption is requested. A runtime upgrade does not migrate them. |
| Explicit native adoption on 3.6+ | Root config required. Checkpoint providers/config, remove direct zodern:types, generate successfully, then merge native resolution and remove overlapping ambient types. |
| JavaScript-only 3.6+ app wanting IntelliSense | Use jsconfig.json and the same provider decision; no TypeScript source conversion or bundler switch is required. |
Read declaration providers for the ordered switch, native adapter/barrel distinction, inherited configuration, TypeScript 7 compatibility, earlier providers and rollback. Read JavaScript IntelliSense for JS apps.
Verify the effective project
- Confirm generation actually ran. A direct
zodern:typesmakesmeteor typesskip with exit zero;meteor creategenerates for the four native scaffolds above. After cloning or changing packages, runmeteor typesexplicitly; normalrun,build,testandlintdo not regenerate them. - Use the app's local compiler. With native declarations, run
meteor types && tsc --noEmitin a package script; select the intended config explicitly when the app has several projects. - Check
tsc --listFiles --noEmitincludes application source. Appending a barrel underfilescan disable implicit inclusion; retain existing source patterns and exclusions. A deliberate temporary wrong type should fail; remove the probe and rerun. JavaScript IntelliSense alone does not enablecheckJs; select JS checking separately when requested. - Restart the editor's TypeScript server after configuration changes. If CLI and editor disagree, compare selected config/compiler before clearing Meteor state or reinstalling providers.
- Keep generated
.meteor/types/untracked and unedited. Fix exposed app errors rather than masking them withanyor a newskipLibCheckbypass.
Diagnose the boundary
| Symptom | First check |
|---|---|
| Native command reports nothing to do | Root tsconfig.json or jsconfig.json. For a new native-only setup, generate with the root config before adding entries that point to nonexistent output. |
| Generation fails | Read the error; local packages may need fixing. Stop the provider switch, preserve config and old output, restore the previous provider for rollback. |
| Ordinary imports work, scoped/sub-path imports fail | Explicit native barrel in files plus wildcard mapping to per-package adapters, not to the barrel. |
| Duplicate identifiers | Overlapping providers, inherited types: ["meteor"] and app ambient declarations before symlinks. |
| Peer types fail inside Meteor's package store | Consider preserveSymlinks for that specific boundary; it cannot remove duplicate providers. |
User service fields are unknown, or OAuth signatures disagree |
Use application augmentation and provider signatures; keep generated types unedited. |
| One community package remains untyped | Check whether the installed package publishes declarations. No generator can promise coverage for every Atmosphere package. |
| Generated relative imports or subscription handle types disagree with runtime | Check the native declaration contract in provider guidance, then regenerate and type-check. Keep generated files unedited and structural handles usable. |
If the actual task is publishing package declarations, use the official Atmosphere package types documentation. Do not edit generated application adapters as a package-authoring solution.
04 同仓库更多 Skills
migrate-to-rspack
Use when migrating an existing Meteor app to Rspack (Meteor 3.4+), or upgrading Rspack 1 to 2 on Meteor 3.6. Triggers on nested imports, mainModule entry points, server-only apps, replacing fourseven:scss / meteor/less / coffeescript / jorgenvatle:vite / zodern:melte with loaders, Svelte/TypeScript preprocessing or Lingui SWC plugin failures after upgrade, CommonJS default-import interop, module.exports in client graphs, Node built-ins in browser code, _build / build-assets / build-chunks, .meteorignore hiding handoff files, dynamic chunks under ROOT_URL, meteor.modules for CSS/HTML, resolve.symlinks or resolve.alias migration, automatic dependency updates and immutable CI/Docker builds. Use this skill when the user asks about migration compatibility or a build plugin's Rspack replacement. For new-app setup and rspack.config.js helpers, use meteor-modern-build-stack instead.
migrate-to-meteor-3
Use when migrating a Meteor 2.x application to Meteor 3.x. Triggers on callAsync, *Async Mongo, removed Fibers, implicit-global ReferenceError, lost Blaze reactivity, a publish function returning a Promise, a scheduler dropping a Promise, a read API receiving update modifiers, async allow/deny, an Iron Router controller not running, "Method stub took too long", Atmosphere resolution, Express 5 WebApp handlers, lost async context, rawCollection callbacks, TypeScript declaration failures during upgrades, useTracker, and useSubscribe. Use this skill when the user asks about upgrading Meteor, async caller propagation, iterators with await, or replacing and forking packages. Standalone declarations and type-checking belong to meteor-typescript.
meteor-testing
Use when setting up, designing, writing, or repairing tests and test harnesses in a Meteor 3 app. Triggers on meteortesting:mocha, --driver-package, TEST_WATCH, TEST_BROWSER_DRIVER, MOCHA_GREP, meteor.testModule, focused tests, .only, Meteor.server.method_handlers, Meteor.server.publish_handlers, DDP.connect, --full-app integration mode, sinon, async test signatures, Playwright/Cypress E2E. Use this skill when the user asks about test runners, asks about testing publications, or asks about Jest vs Mocha in Meteor. For a failing, hanging, or flaky test whose failing layer or root cause is unknown, use meteor-debugging before changing the test or app.
meteor-security
Use when auditing or hardening a Meteor 3 application. Triggers on missing check() on method arguments, missing this.userId guards on publications, browser-policy CSP, DDPRateLimiter rules, oauth-encryption via Accounts.config oauthSecretKey, audit-argument-checks, allow/deny legacy patterns, BrowserPolicy.content.disallowInlineScripts, BrowserPolicy.framing.disallow. Use this skill when the user asks about hardening, asks about a security review, or asks about CSP for a third-party script (Stripe, Google Maps, fonts).
meteor-react
Use when building or debugging React interfaces in Meteor 3: meteor create --react, createRoot, JSX or TSX entry points, Rspack React detection, Fast Refresh, react-meteor-data, useTracker, useSubscribe, useFind, withTracker, Suspense, and Tracker.withComputation. Triggers on isLoading being treated as a boolean, useFind receiving fetch(), stale closure inputs, duplicate tracker side effects, unstable Suspense keys, lost reactivity after await, state reset after refresh, or React tests leaking computations. Use this skill when the user asks about a React skeleton, React Compiler, React-specific rspack.config rules, reactive data hooks, or classic versus Suspense integration. Route general bundler configuration to meteor-modern-build-stack and Meteor 2 upgrades to migrate-to-meteor-3.
meteor-mongo-minimongo
Use when authoring or debugging Mongo queries in Meteor 3. Triggers on Mongo.Collection, find/findOne, server async vs client Minimongo sync, oplog vs change streams, indexes, selectors, modifiers, projections. Use this skill when the user asks about Mongo on the server or asks about Minimongo on the client.