typescript-auto-import-cache is a utility package within the Volar.js ecosystem, currently at version 0.3.6, designed to address the performance bottleneck in the TypeScript Language Service Completion API, specifically when calculating auto-imports. It achieves this by porting and optimizing the `tsserver`'s internal auto-import caching logic. This package functions as a TypeScript Language Service Plugin, meaning it extends the functionality of the TypeScript language server (`tsserver`) to enhance the developer experience in IDEs (like VS Code) by speeding up IntelliSense for auto-imports. It is primarily a tooling-oriented package, not intended for direct runtime use in application code, and typically sees updates aligned with new TypeScript versions or Volar.js releases that may impact language service performance. Its key differentiator is its focused approach to optimizing a common pain point in large TypeScript projects, directly integrating with the underlying language service architecture.
npm install typescript-auto-import-cacheVerified import paths — ran on the pinned version, not inferred.
This `tsconfig.json` configuration snippet demonstrates how to enable the `typescript-auto-import-cache` as a plugin for the TypeScript Language Service.
Always review the package's GitHub repository or `CHANGELOG.md` for specific migration steps when updating minor or patch versions of `0.x` releases.
Ensure your editor is using the workspace version of TypeScript (e.g., via `"typescript.tsdk": "node_modules/typescript/lib"` in VS Code settings). Consult plugin documentation for any specific TypeScript version requirements.
Do not expect changes in build times or application execution. If you observe no IDE performance improvement, verify the plugin is correctly loaded and there aren't other performance bottlenecks in your project configuration or editor setup. Check TypeScript server logs for plugin load status.
Double-check the `name` property in `compilerOptions.plugins`. Enable verbose TypeScript server logging in your editor (e.g., `"typescript.tsserver.log": "verbose"` in VS Code) to diagnose plugin loading issues.
Ensure your project's `typescript` dependency is compatible with the `typescript-auto-import-cache` plugin. Try updating `typescript-auto-import-cache` to the latest version. Check editor settings to confirm the workspace TypeScript version is being used. Refer to the plugin's GitHub issues for known compatibility problems.
Run `npm install typescript-auto-import-cache` or `yarn add typescript-auto-import-cache`. Ensure your editor is configured to use the workspace TypeScript version, which will instruct `tsserver` to look in your project's `node_modules` for plugins.