types(ref): fix dts test for ref (#965)

This commit is contained in:
Carlos Rodrigues
2020-04-15 17:15:13 +01:00
committed by GitHub
parent e33291bd0e
commit acfcc55aac

View File

@@ -1,5 +1,5 @@
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>) {
// ref coercing
@@ -29,7 +29,9 @@ function plainType(arg: number | Ref<number>) {
}
// with symbol
expectType<IteratorFoo | null>(unref(ref<IteratorFoo | null>(null)))
expectType<Ref<IteratorFoo | null | undefined>>(
ref<IteratorFoo | null | undefined>()
)
}
plainType(1)