Skip to content

Commit

Permalink
fix(types): avoid using intersection type in Readonly<...> to fix J…
Browse files Browse the repository at this point in the history
…SDoc emit (#11799)
  • Loading branch information
johnsoncodehk committed Sep 4, 2024
1 parent 4019369 commit 7518bc1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/runtime-core/src/apiDefineComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ export function defineComponent<
: ExtractPropTypes<RuntimePropsOptions>
: { [key in RuntimePropsKeys]?: any }
: TypeProps,
ResolvedProps = Readonly<InferredProps & EmitsToProps<ResolvedEmits>>,
ResolvedProps = Readonly<InferredProps> &
Readonly<EmitsToProps<ResolvedEmits>>,
TypeRefs extends Record<string, unknown> = {},
>(
options: {
Expand Down
4 changes: 3 additions & 1 deletion packages/runtime-core/src/componentOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,9 @@ export type ComponentOptionsWithObjectProps<
Directives extends Record<string, Directive> = {},
Exposed extends string = string,
Provide extends ComponentProvideOptions = ComponentProvideOptions,
Props = Prettify<Readonly<ExtractPropTypes<PropsOptions> & EmitsToProps<E>>>,
Props = Prettify<
Readonly<ExtractPropTypes<PropsOptions>> & Readonly<EmitsToProps<E>>
>,
Defaults = ExtractDefaultPropTypes<PropsOptions>,
> = ComponentOptionsBase<
Props,
Expand Down

0 comments on commit 7518bc1

Please sign in to comment.