Skip to content

Commit 179fc05

Browse files
committedDec 11, 2021
feat(reactivity-transform): support $-shorthands for all ref-creating APIs
1 parent 93ba6b9 commit 179fc05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/ref-transform/src/refTransform.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { hasOwn, isArray, isString } from '@vue/shared'
2424

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

3030
export function shouldTransform(src: string): boolean {

0 commit comments

Comments
 (0)
Please sign in to comment.