|
|
@@ -10,7 +10,8 @@ import {
|
|
|
toRef,
|
|
|
toRefs,
|
|
|
ToRefs,
|
|
|
- shallowReactive
|
|
|
+ shallowReactive,
|
|
|
+ readonly
|
|
|
} from './index'
|
|
|
|
|
|
function plainType(arg: number | Ref<number>) {
|
|
|
@@ -236,6 +237,9 @@ expectType<Ref<string>>(p2.obj.k)
|
|
|
expectType<Ref<number>>(x)
|
|
|
}
|
|
|
|
|
|
+// readonly() + ref()
|
|
|
+expectType<Readonly<Ref<number>>>(readonly(ref(1)))
|
|
|
+
|
|
|
// #2687
|
|
|
interface AppData {
|
|
|
state: 'state1' | 'state2' | 'state3'
|