types(ref): fix dts test for ref (#965)
This commit is contained in:
parent
e33291bd0e
commit
acfcc55aac
@ -1,5 +1,5 @@
|
|||||||
import { expectType } from 'tsd'
|
import { expectType } from 'tsd'
|
||||||
import { Ref, ref, isRef, unref, UnwrapRef } from './index'
|
import { Ref, ref, isRef, unref } from './index'
|
||||||
|
|
||||||
function plainType(arg: number | Ref<number>) {
|
function plainType(arg: number | Ref<number>) {
|
||||||
// ref coercing
|
// ref coercing
|
||||||
@ -29,7 +29,9 @@ function plainType(arg: number | Ref<number>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// with symbol
|
// with symbol
|
||||||
expectType<IteratorFoo | null>(unref(ref<IteratorFoo | null>(null)))
|
expectType<Ref<IteratorFoo | null | undefined>>(
|
||||||
|
ref<IteratorFoo | null | undefined>()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
plainType(1)
|
plainType(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user