@@ -15,7 +15,7 @@ import {
15
15
set ,
16
16
del
17
17
} from '../../index'
18
- import { IsUnion , describe , expectType } from '../utils'
18
+ import { IsUnion , describe , expectType , IsAny } from '../utils'
19
19
20
20
function plainType ( arg : number | Ref < number > ) {
21
21
// ref coercing
@@ -46,6 +46,10 @@ function plainType(arg: number | Ref<number>) {
46
46
expectType < Ref < true > > ( trueRef )
47
47
expectType < true > ( trueRef . value )
48
48
49
+ // any value should return Ref<any>, not any
50
+ const a = ref ( 1 as any )
51
+ expectType < IsAny < typeof a > > ( false )
52
+
49
53
// tuple
50
54
expectType < [ number , string ] > ( unref ( ref ( [ 1 , '1' ] ) ) )
51
55
@@ -386,7 +390,6 @@ describe('set/del', () => {
386
390
del ( [ ] , 'fse' , 123 )
387
391
} )
388
392
389
-
390
393
{
391
394
//#12978
392
395
type Steps = { step : '1' } | { step : '2' }
@@ -395,4 +398,10 @@ describe('set/del', () => {
395
398
396
399
expectType < IsUnion < typeof shallowUnionGenParam > > ( false )
397
400
expectType < IsUnion < typeof shallowUnionAsCast > > ( false )
398
- }
401
+ }
402
+
403
+ {
404
+ // any value should return Ref<any>, not any
405
+ const a = shallowRef ( 1 as any )
406
+ expectType < IsAny < typeof a > > ( false )
407
+ }
0 commit comments