Skip to content

Commit

Permalink
refactor(transform): remove unused code (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
wtlin1228 authored Aug 21, 2024
1 parent eec9895 commit d3c2791
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/transform/src/utils/traversalCache.ts
Original file line number Diff line number Diff line change
@@ -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<
Expand Down Expand Up @@ -31,11 +30,6 @@ export const getTraversalCache = <
return cache.get(name) as WeakMap<TKey, TValue>;
};

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) {
Expand Down

0 comments on commit d3c2791

Please sign in to comment.