Skip to content

Commit

Permalink
fix: defineComponent object format with no props type
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiangmoe committed Nov 1, 2021
1 parent b59e864 commit ad8c344
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/component/componentOptions.ts
Expand Up @@ -88,7 +88,7 @@ export type ComponentOptionsWithArrayProps<
} & ThisType<ComponentRenderProxy<Props, RawBindings, D, C, M>>

export type ComponentOptionsWithoutProps<
Props = unknown,
Props = {},
RawBindings = Data,
D = Data,
C extends ComputedOptions = {},
Expand Down
4 changes: 2 additions & 2 deletions src/component/defineComponent.ts
Expand Up @@ -17,8 +17,8 @@ export function defineComponent<
C extends ComputedOptions = {},
M extends MethodOptions = {}
>(
options: ComponentOptionsWithoutProps<unknown, RawBindings, D, C, M>
): VueProxy<unknown, RawBindings, D, C, M>
options: ComponentOptionsWithoutProps<{}, RawBindings, D, C, M>
): VueProxy<{}, RawBindings, D, C, M>

// overload 2: object format with array props declaration
// props inferred as { [key in PropNames]?: any }
Expand Down

0 comments on commit ad8c344

Please sign in to comment.