- {{ proxyTarget.a.b.c }}
- {{ proxyTarget.f }}
+ {{ proxy.a.b.c }}
+ {{ proxy.f }}
```
diff --git a/packages/vue/src/index.test.ts b/packages/vue/src/index.test.ts
index 4e86041..a6ed4a6 100644
--- a/packages/vue/src/index.test.ts
+++ b/packages/vue/src/index.test.ts
@@ -1,17 +1,17 @@
import { ref, reactive } from '@vue/reactivity'
import { test, expect, describe } from 'vitest'
-import { reactiveShake } from '.'
+import { shakeMaybeRef } from '.'
-describe('[preview vue] test', () => {
- test('ref shake base', () => {
- const [p, s] = reactiveShake(ref({ a: { b: 1 }, c: 2 }))
+describe('shake object of vue', () => {
+ test('ref', () => {
+ const [p, s] = shakeMaybeRef(ref({ a: { b: 1 }, c: 2 }))
expect(s()).toEqual({})
p.value.a.b
expect(s()).toEqual({ a: { b: 1 } })
})
- test('reactive shake base', () => {
- const [p, s] = reactiveShake(reactive({ a: { b: 1 }, c: 2 }))
+ test('reactive', () => {
+ const [p, s] = shakeMaybeRef(reactive({ a: { b: 1 }, c: 2 }))
expect(s()).toEqual({})
p.a.b
expect(s()).toEqual({ a: { b: 1 } })
diff --git a/packages/vue/src/index.ts b/packages/vue/src/index.ts
index ede93ce..c5c72a6 100644
--- a/packages/vue/src/index.ts
+++ b/packages/vue/src/index.ts
@@ -1,14 +1,7 @@
import { shake } from '@object-shake/core'
-import { MaybeRef, unref, UnwrapRef } from '@vue/reactivity'
+import { unref, ref, isRef, type UnwrapRef, type Ref } from '@vue/reactivity'
-export function reactiveShake