mirror of https://github.com/vuejs/core.git
chore: mark reactivity transform apis as deprecated
This commit is contained in:
parent
f0691e4581
commit
372ec35482
|
|
@ -7,6 +7,8 @@ export { compileStyle, compileStyleAsync } from './compileStyle'
|
||||||
export { compileScript } from './compileScript'
|
export { compileScript } from './compileScript'
|
||||||
export { rewriteDefault, rewriteDefaultAST } from './rewriteDefault'
|
export { rewriteDefault, rewriteDefaultAST } from './rewriteDefault'
|
||||||
export { resolveTypeElements, inferRuntimeType } from './script/resolveType'
|
export { resolveTypeElements, inferRuntimeType } from './script/resolveType'
|
||||||
|
|
||||||
|
// TODO remove in 3.4
|
||||||
export {
|
export {
|
||||||
shouldTransform as shouldTransformRef,
|
shouldTransform as shouldTransformRef,
|
||||||
transform as transformRef,
|
transform as transformRef,
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,9 @@ const IMPORT_SOURCE = 'vue/macros'
|
||||||
const shorthands = ['ref', 'computed', 'shallowRef', 'toRef', 'customRef']
|
const shorthands = ['ref', 'computed', 'shallowRef', 'toRef', 'customRef']
|
||||||
const transformCheckRE = /[^\w]\$(?:\$|ref|computed|shallowRef)?\s*(\(|\<)/
|
const transformCheckRE = /[^\w]\$(?:\$|ref|computed|shallowRef)?\s*(\(|\<)/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated will be removed in 3.4
|
||||||
|
*/
|
||||||
export function shouldTransform(src: string): boolean {
|
export function shouldTransform(src: string): boolean {
|
||||||
return transformCheckRE.test(src)
|
return transformCheckRE.test(src)
|
||||||
}
|
}
|
||||||
|
|
@ -64,6 +67,9 @@ export interface ImportBinding {
|
||||||
specifier: ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier
|
specifier: ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated will be removed in 3.4
|
||||||
|
*/
|
||||||
export function transform(
|
export function transform(
|
||||||
src: string,
|
src: string,
|
||||||
{
|
{
|
||||||
|
|
@ -112,6 +118,9 @@ export function transform(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated will be removed in 3.4
|
||||||
|
*/
|
||||||
export function transformAST(
|
export function transformAST(
|
||||||
ast: Program,
|
ast: Program,
|
||||||
s: MagicString,
|
s: MagicString,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue