{"version":"2.1.283","anchor":"function-hook-plugins-get-a-generated-typescript-type-root","canonical_anchor":"function-hook-plugins-get-a-generated-typescript-type-root","heading":"Function-hook plugins get generated TypeScript types and a tsconfig","tier":"notice","area":"Mods","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.283\/e\/function-hook-plugins-get-a-generated-typescript-type-root","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.283","markdown":"### Function-hook plugins get generated TypeScript types and a tsconfig\n\nClaude Code now writes a tsconfig, a .gitignore and type declarations into function-hook plugin folders so editors can type-check hooks\n\n**Unclear.** It is not clear whether the function-hook plugin feature is switched on for everyone or behind a setting.\n\n**What**\n\nSome plugins ship a function-hook module (\"mods\"): code that runs at points in Claude Code's work. When such a plugin loads from a development folder, Claude Code now lays out a \"type root\" in the plugin's folder, which gives code editors the type information they need to check the code.\n\n- A `types` directory with a `.gitignore` containing `*`, so git ignores it.\n\n- `index.d.ts` declaration files for the mod and its dependencies, linked or copied in, including one for `claude-code` stamped with the running CLI version.\n\n- A `tsconfig.json` in the types directory, and one at the plugin root unless the plugin has a `jsconfig.json`.\n\n- Each result is logged as \"type root of \u2026 at \u2026\". If the path would lead outside the mod's folder, the type root is not laid and that is logged.\n\n- The plugin file watcher now ignores the types directory, so writing these files does not trigger a plugin reload.\n\n**Why**\n\nPlugin authors writing function hooks can get editor type-checking against the Claude Code version they are running without setting anything up. New files now appear in the plugin folder, which is worth knowing if you keep that folder under version control.\n\n- Area: Mods\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 4\/5"}