File tree 5 files changed +9
-7
lines changed
runtime-core/src/components
5 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ if (__COMPAT__) {
274
274
275
275
// export the public type for h/tsx inference
276
276
// also to avoid inline import() in generated d.ts files
277
- export const BaseTransition = BaseTransitionImpl as any as {
277
+ export const BaseTransition = BaseTransitionImpl as unknown as {
278
278
new ( ) : {
279
279
$props : BaseTransitionProps < any >
280
280
}
Original file line number Diff line number Diff line change @@ -89,7 +89,9 @@ export const SuspenseImpl = {
89
89
}
90
90
91
91
// Force-casted public typing for h and TSX props inference
92
- export const Suspense = ( __FEATURE_SUSPENSE__ ? SuspenseImpl : null ) as any as {
92
+ export const Suspense = ( __FEATURE_SUSPENSE__
93
+ ? SuspenseImpl
94
+ : null ) as unknown as {
93
95
__isSuspense : true
94
96
new ( ) : { $props : VNodeProps & SuspenseProps }
95
97
}
Original file line number Diff line number Diff line change @@ -52,13 +52,13 @@ const resolveTarget = <T = RendererElement>(
52
52
`ideally should be outside of the entire Vue component tree.`
53
53
)
54
54
}
55
- return target as any
55
+ return target as T
56
56
}
57
57
} else {
58
58
if ( __DEV__ && ! targetSelector && ! isTeleportDisabled ( props ) ) {
59
59
warn ( `Invalid Teleport target: ${ targetSelector } ` )
60
60
}
61
- return targetSelector as any
61
+ return targetSelector as T
62
62
}
63
63
}
64
64
@@ -388,7 +388,7 @@ function hydrateTeleport(
388
388
}
389
389
390
390
// Force-casted public typing for h and TSX props inference
391
- export const Teleport = TeleportImpl as any as {
391
+ export const Teleport = TeleportImpl as unknown as {
392
392
__isTeleport : true
393
393
new ( ) : { $props : VNodeProps & TeleportProps }
394
394
}
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ const cacheStringFunction = <T extends (str: string) => string>(fn: T): T => {
100
100
return ( ( str : string ) => {
101
101
const hit = cache [ str ]
102
102
return hit || ( cache [ str ] = fn ( str ) )
103
- } ) as any
103
+ } ) as T
104
104
}
105
105
106
106
const camelizeRE = / - ( \w ) / g
Original file line number Diff line number Diff line change @@ -275,5 +275,5 @@ function debounce<T extends (...args: any[]) => any>(
275
275
fn ( ...args )
276
276
prevTimer = null
277
277
} , delay )
278
- } ) as any
278
+ } ) as T
279
279
}
You can’t perform that action at this time.
0 commit comments