Skip to content

Commit

Permalink
fix(type): fix tying issues in #428 (#444)
Browse files Browse the repository at this point in the history
* fix(type): fix tying issues in #428

* fix
  • Loading branch information
antfu committed Jul 18, 2020
1 parent e8ea208 commit 98c7041
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/component/componentProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type ExtractFunctionPropType<
T extends Function,
TArgs extends Array<any> = any[],
TResult = any
> = T extends (...args: TArgs) => TResult ? T : never
> = T extends (...args: TArgs) => TResult ? T : any

type ExtractCorrectPropType<T> = T extends Function
? ExtractFunctionPropType<T>
Expand Down
7 changes: 1 addition & 6 deletions src/component/componentProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,12 @@ export type ComponentRenderProxy<
$data: D
$props: Readonly<P & PublicProps>
$attrs: Data
$refs: Data
$slots: Data
$root: ComponentInstance | null
$parent: ComponentInstance | null
$emit: (event: string, ...args: unknown[]) => void
} & Readonly<P> &
UnwrapRef<B> &
D &
M &
ExtractComputedReturns<C> &
Vue
Omit<Vue, '$data' | '$props' | '$attrs'>

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

0 comments on commit 98c7041

Please sign in to comment.