chore(ct): vue update vue-component-type-helpers (#31213)

The `ComponentProps` copied from
[`vue-component-type-helpers`](5c65f102d0/packages/component-type-helpers/index.ts (L6-L9))
was outdated and had an issue accurately inferring generic/functional
Vue components.
This commit is contained in:
Sander 2024-06-11 02:22:00 +02:00 committed by GitHub
parent d9ac51bf87
commit 664c4dd442
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -24,7 +24,7 @@ type ComponentEvents = Record<string, Function>;
// Copied from: https://github.com/vuejs/language-tools/blob/master/packages/vue-component-type-helpers/index.d.ts#L10-L13
type ComponentProps<T> =
T extends new () => { $props: infer P; } ? NonNullable<P> :
T extends new (...angs: any) => { $props: infer P; } ? NonNullable<P> :
T extends (props: infer P, ...args: any) => any ? P :
{};

View file

@ -24,7 +24,7 @@ type ComponentEvents = Record<string, Function>;
// Copied from: https://github.com/vuejs/language-tools/blob/master/packages/vue-component-type-helpers/index.d.ts#L10-L13
type ComponentProps<T> =
T extends new () => { $props: infer P; } ? NonNullable<P> :
T extends new (...angs: any) => { $props: infer P; } ? NonNullable<P> :
T extends (props: infer P, ...args: any) => any ? P :
{};