Skip to content

⬅️ Back to Table of Contents

📄 clear-caches

📊 Analysis Summary

Metric Count
🔧 Functions 1
📦 Imports 7
📊 Variables & Constants 1

📚 Table of Contents

🛠️ File Location:

📂 packages/typescript-estree/src/clear-caches.ts

📦 Imports

Name Source
clearWatchCaches ./create-program/getWatchProgramsForProjects
clearDefaultProjectMatchedFiles ./parser
clearProgramCacheOriginal ./parser
clearCandidateTSConfigRootDirs ./parseSettings/candidateTSConfigRootDirs
clearTSConfigMatchCache ./parseSettings/createParseSettings
clearTSServerProjectService ./parseSettings/createParseSettings
clearGlobCache ./parseSettings/resolveProjectList

Variables & Constants

Name Type Kind Value Exported
clearProgramCache () => void const clearCaches

Functions

clearCaches(): void

Clears all of the internal caches. Generally you shouldn't need or want to use this. Examples of intended uses: - In tests to reset parser state to keep tests isolated. - In custom lint tooling that iteratively lints one project at a time to prevent OOMs.

Raw JSDoc
/**
 * Clears all of the internal caches.
 * Generally you shouldn't need or want to use this.
 * Examples of intended uses:
 * - In tests to reset parser state to keep tests isolated.
 * - In custom lint tooling that iteratively lints one project at a time to prevent OOMs.
 */

Calls:

  • clearCandidateTSConfigRootDirs (from ./parseSettings/candidateTSConfigRootDirs)
  • clearDefaultProjectMatchedFiles (from ./parser)
  • clearProgramCacheOriginal (from ./parser)
  • clearWatchCaches (from ./create-program/getWatchProgramsForProjects)
  • clearTSConfigMatchCache (from ./parseSettings/createParseSettings)
  • clearTSServerProjectService (from ./parseSettings/createParseSettings)
  • clearGlobCache (from ./parseSettings/resolveProjectList)
Code
export function clearCaches(): void {
  clearCandidateTSConfigRootDirs();
  clearDefaultProjectMatchedFiles();
  clearProgramCacheOriginal();
  clearWatchCaches();
  clearTSConfigMatchCache();
  clearTSServerProjectService();
  clearGlobCache();
}

Generated by Syntax Scribe