Skip to content

Commit

Permalink
chore(ct): vue update vue-component-type-helpers (#31213)
Browse files Browse the repository at this point in the history
The `ComponentProps` copied from
[`vue-component-type-helpers`](https://github.com/vuejs/language-tools/blob/5c65f102d01ade46975001e8509f26a2d90774e9/packages/component-type-helpers/index.ts#L6-L9)
was outdated and had an issue accurately inferring generic/functional
Vue components.
  • Loading branch information
sand4rt authored Jun 11, 2024
1 parent d9ac51b commit 664c4dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/playwright-ct-vue/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 :
{};

Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-ct-vue2/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 :
{};

Expand Down

0 comments on commit 664c4dd

Please sign in to comment.