feat(sfc): support $shallowRef ref sugar
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import {
|
||||
expectType,
|
||||
$ref,
|
||||
$shallowRef,
|
||||
$computed,
|
||||
$fromRefs,
|
||||
$raw,
|
||||
@@ -14,6 +15,10 @@ expectType<number>($ref(1))
|
||||
expectType<number>($ref(ref(1)))
|
||||
expectType<{ foo: number }>($ref({ foo: ref(1) }))
|
||||
|
||||
// $shallowRef
|
||||
expectType<number>($shallowRef(1))
|
||||
expectType<{ foo: Ref<number> }>($shallowRef({ foo: ref(1) }))
|
||||
|
||||
// $computed
|
||||
expectType<number>($computed(() => 1))
|
||||
let b = $ref(1)
|
||||
|
||||
Reference in New Issue
Block a user