parent
231dafd55a
commit
2581cfb707
@ -19,11 +19,6 @@ export interface Ref<T = any> {
|
||||
* @internal
|
||||
*/
|
||||
_shallow?: boolean
|
||||
|
||||
/**
|
||||
* Deps are maintained locally rather than in depsMap for performance reasons.
|
||||
*/
|
||||
dep?: Dep
|
||||
}
|
||||
|
||||
type RefBase<T> = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { readonly, describe, expectError } from './index'
|
||||
import { ref, readonly, describe, expectError, expectType, Ref } from './index'
|
||||
|
||||
describe('should support DeepReadonly', () => {
|
||||
const r = readonly({ obj: { k: 'v' } })
|
||||
@ -7,3 +7,9 @@ describe('should support DeepReadonly', () => {
|
||||
// @ts-expect-error
|
||||
expectError((r.obj.k = 'x'))
|
||||
})
|
||||
|
||||
// #4180
|
||||
describe('readonly ref', () => {
|
||||
const r = readonly(ref({ count: 1 }))
|
||||
expectType<Ref>(r)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user