Переглянути джерело

chore(compiler-sfc): avoid relying on estree type in generated dts

Evan You 4 роки тому
батько
коміт
acd869f4d6
1 змінених файлів з 4 додано та 1 видалено
  1. 4 1
      packages/compiler-sfc/src/index.ts

+ 4 - 1
packages/compiler-sfc/src/index.ts

@@ -14,7 +14,10 @@ export {
 export { parse as babelParse } from '@babel/parser'
 import MagicString from 'magic-string'
 export { MagicString }
-export { walk } from 'estree-walker'
+// technically internal but we want it in @vue/repl, cast it as any to avoid
+// relying on estree types
+import { walk as _walk } from 'estree-walker'
+export const walk = _walk as any
 export {
   generateCodeFrame,
   walkIdentifiers,