From d3c2791adacd7c20e8ace2417fae5aab5fce7814 Mon Sep 17 00:00:00 2001 From: Leo Lin Date: Wed, 21 Aug 2024 16:59:19 +0800 Subject: [PATCH] refactor(transform): remove unused code (#98) --- packages/transform/src/utils/traversalCache.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/transform/src/utils/traversalCache.ts b/packages/transform/src/utils/traversalCache.ts index de5898d0..8b5a5346 100644 --- a/packages/transform/src/utils/traversalCache.ts +++ b/packages/transform/src/utils/traversalCache.ts @@ -1,5 +1,4 @@ import type { NodePath } from '@babel/traverse'; -import traverse from '@babel/traverse'; import type { Node } from '@babel/types'; const caches = new WeakMap< @@ -31,11 +30,6 @@ export const getTraversalCache = < return cache.get(name) as WeakMap; }; -const traverseCache = (traverse as unknown as { cache: unknown }).cache; -export const clearBabelTraversalCache = () => { - (traverseCache as { clear: () => void }).clear(); -}; - export const invalidateTraversalCache = (path: NodePath) => { const programPath = path.find((p) => p.isProgram()); if (!programPath) {