Skip to content

Commit 98c7041

Browse files
authored
fix(type): fix tying issues in #428 (#444)
* fix(type): fix tying issues in #428 * fix
1 parent e8ea208 commit 98c7041

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/component/componentProps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type ExtractFunctionPropType<
4343
T extends Function,
4444
TArgs extends Array<any> = any[],
4545
TResult = any
46-
> = T extends (...args: TArgs) => TResult ? T : never
46+
> = T extends (...args: TArgs) => TResult ? T : any
4747

4848
type ExtractCorrectPropType<T> = T extends Function
4949
? ExtractFunctionPropType<T>

src/component/componentProxy.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,12 @@ export type ComponentRenderProxy<
2727
$data: D
2828
$props: Readonly<P & PublicProps>
2929
$attrs: Data
30-
$refs: Data
31-
$slots: Data
32-
$root: ComponentInstance | null
33-
$parent: ComponentInstance | null
34-
$emit: (event: string, ...args: unknown[]) => void
3530
} & Readonly<P> &
3631
UnwrapRef<B> &
3732
D &
3833
M &
3934
ExtractComputedReturns<C> &
40-
Vue
35+
Omit<Vue, '$data' | '$props' | '$attrs'>
4136

4237
// for Vetur and TSX support
4338
type VueConstructorProxy<PropsOptions, RawBindings> = VueConstructor & {

0 commit comments

Comments
 (0)