Skip to content

Commit

Permalink
fix: add emits options to defineComponent(fix #553) (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Oct 10, 2020
1 parent acfeb39 commit e44311f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/component/componentOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export type ComponentOptionsWithProps<
Props = ExtractPropTypes<PropsOptions>
> = ComponentOptionsBase<Props, D, C, M> & {
props?: PropsOptions
emits?: string[] | Record<string, null | ((emitData: any) => boolean) >
setup?: SetupFunction<Props, RawBindings>
} & ThisType<ComponentRenderProxy<Props, RawBindings, D, C, M>>

Expand All @@ -82,6 +83,7 @@ export type ComponentOptionsWithArrayProps<
Props = Readonly<{ [key in PropNames]?: any }>
> = ComponentOptionsBase<Props, D, C, M> & {
props?: PropNames[]
emits?: string[] | Record<string, null | ((emitData: any) => boolean)>
setup?: SetupFunction<Props, RawBindings>
} & ThisType<ComponentRenderProxy<Props, RawBindings, D, C, M>>

Expand All @@ -93,6 +95,7 @@ export type ComponentOptionsWithoutProps<
M extends MethodOptions = {}
> = ComponentOptionsBase<Props, D, C, M> & {
props?: undefined
emits?: string[] | Record<string, null | ((emitData: any) => boolean)>
setup?: SetupFunction<Props, RawBindings>
} & ThisType<ComponentRenderProxy<Props, RawBindings, D, C, M>>

Expand Down

0 comments on commit e44311f

Please sign in to comment.