TypeScript Auto-Import Cache

0.3.6 · active · verified Sun Apr 19

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.

Common errors

Warnings

Install

Imports

Quickstart

This `tsconfig.json` configuration snippet demonstrates how to enable the `typescript-auto-import-cache` as a plugin for the TypeScript Language Service.

{ 
  "compilerOptions": {
    "plugins": [
      {
        "name": "typescript-auto-import-cache"
      }
    ],
    "target": "es2020",
    "module": "esnext",
    "lib": ["es2020", "dom"],
    "jsx": "react-jsx",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true,
    "moduleResolution": "bundler",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "allowJs": true
  },
  "include": ["src"],
  "references": [{ "path": "./tsconfig.node.json" }]
}

view raw JSON →