Skip to content
Permalink
Browse files
feat(reactivity-transform): support $-shorthands for all ref-creating…
… APIs
  • Loading branch information
yyx990803 committed Dec 11, 2021
1 parent 93ba6b9 commit 179fc05a8406eac525c8450153b42fcb5af7d6bb
Showing 1 changed file with 1 addition and 1 deletion.
@@ -24,7 +24,7 @@ import { hasOwn, isArray, isString } from '@vue/shared'

const TO_VAR_SYMBOL = '$'
const TO_REF_SYMBOL = '$$'
const shorthands = ['ref', 'computed', 'shallowRef']
const shorthands = ['ref', 'computed', 'shallowRef', 'toRef', 'customRef']
const transformCheckRE = /[^\w]\$(?:\$|ref|computed|shallowRef)?\s*(\(|\<)/

export function shouldTransform(src: string): boolean {

0 comments on commit 179fc05

Please sign in to comment.