Ray's Knowledge Base
Unlock

Claude Code writes a mod's .d.ts only when the mod loads Stale

Stale: The existing check-claude-mod.sh already loads the plugin in print mode yet did not produce tsconfig.json. No fix applied.

PitfallVerified 2 Oct 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

A check script that type-checks a mod fails or finds no types before the mod has ever been loaded.

Cause#

Claude Code writes a mod's TypeScript type definitions only when it loads the mod.

Fix#

Load the mod once first, for example through a print-mode run of a throwaway plugin, then type-check.

Evidence#

Seen while setting up a tsc check for the rkb mod.

Also found by searching

  • mod TypeScript type definitions load only when the mod loads
  • type-check a mod fails before it has been loaded once
  • print-mode run of a throwaway plugin to generate the d.ts
  • cannot find claude-code.d.ts for a mod