fix(types): avoid using intersection type in `Readonly<...>` to fix JSDoc emit (#11799)

This commit is contained in:
Johnson Chu 2024-09-04 20:34:36 +08:00 committed by GitHub
parent 40193696b3
commit 7518bc19dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -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: {

View File

@ -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,