diff --git a/packages/compiler-sfc/src/index.ts b/packages/compiler-sfc/src/index.ts index 3821c255d52..76b4900d46d 100644 --- a/packages/compiler-sfc/src/index.ts +++ b/packages/compiler-sfc/src/index.ts @@ -7,6 +7,8 @@ export { compileStyle, compileStyleAsync } from './compileStyle' export { compileScript } from './compileScript' export { rewriteDefault, rewriteDefaultAST } from './rewriteDefault' export { resolveTypeElements, inferRuntimeType } from './script/resolveType' + +// TODO remove in 3.4 export { shouldTransform as shouldTransformRef, transform as transformRef, diff --git a/packages/reactivity-transform/src/reactivityTransform.ts b/packages/reactivity-transform/src/reactivityTransform.ts index 16cf88e5ac8..c0e2d1b6897 100644 --- a/packages/reactivity-transform/src/reactivityTransform.ts +++ b/packages/reactivity-transform/src/reactivityTransform.ts @@ -33,6 +33,9 @@ const IMPORT_SOURCE = 'vue/macros' const shorthands = ['ref', 'computed', 'shallowRef', 'toRef', 'customRef'] const transformCheckRE = /[^\w]\$(?:\$|ref|computed|shallowRef)?\s*(\(|\<)/ +/** + * @deprecated will be removed in 3.4 + */ export function shouldTransform(src: string): boolean { return transformCheckRE.test(src) } @@ -64,6 +67,9 @@ export interface ImportBinding { specifier: ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier } +/** + * @deprecated will be removed in 3.4 + */ export function transform( src: string, { @@ -112,6 +118,9 @@ export function transform( } } +/** + * @deprecated will be removed in 3.4 + */ export function transformAST( ast: Program, s: MagicString,