Skip to content

Class: TsconfigCache ​

Cache for tsconfig resolution to avoid redundant file system operations.

The cache stores resolved tsconfig configurations keyed by their file paths. When transforming multiple files in the same project, tsconfig lookups are deduplicated, improving performance. Pass a tsconfig path to use that configuration for every lookup. When the path is omitted, the nearest tsconfig is discovered automatically.

Extends ​

  • TsconfigCache

Constructors ​

Constructor ​

  • Type: (pathToTsconfig?: string) => TsconfigCache
  • Experimental

Parameters ​

pathToTsconfig? ​

string

Returns ​

TsconfigCache

Overrides ​

OriginalTsconfigCache.constructor

Methods ​

clear() ​

  • Type: () => void
  • Experimental

Clear the cache.

Call this when tsconfig files have changed to ensure fresh resolution.

Returns ​

void

Inherited from ​

OriginalTsconfigCache.clear


size() ​

  • Type: () => number
  • Experimental

Get the number of cached entries.

Returns ​

number

Inherited from ​

OriginalTsconfigCache.size

Was this page helpful?