Skip to content

Commit

Permalink
feat(reactivity-transform): support $-shorthands for all ref-creating…
Browse files Browse the repository at this point in the history
… APIs
  • Loading branch information
yyx990803 committed Dec 11, 2021
1 parent 93ba6b9 commit 179fc05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ref-transform/src/refTransform.ts
Expand Up @@ -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 {
Expand Down

0 comments on commit 179fc05

Please sign in to comment.