Skip to content

Commit

Permalink
chore(vue): remove vue-component-type-helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
sand4rt committed Jul 29, 2023
1 parent 5e1720d commit 4b915b0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
16 changes: 2 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions packages/playwright-ct-vue/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ import type {
} from '@playwright/test';
import type { JsonObject } from '@playwright/experimental-ct-core/types/component';
import type { InlineConfig } from 'vite';
import type { ComponentProps } from 'vue-component-type-helpers';

// 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 (props: infer P, ...args: any) => any ? P :
{};

export type PlaywrightTestConfig<T = {}, W = {}> = Omit<BasePlaywrightTestConfig<T, W>, 'use'> & {
use?: BasePlaywrightTestConfig<T, W>['use'] & {
Expand All @@ -40,7 +45,7 @@ type ComponentSlot = string | string[];
type ComponentSlots = Record<string, ComponentSlot> & { default?: ComponentSlot };
type ComponentEvents = Record<string, Function>;

export interface MountOptions< HooksConfig extends JsonObject, Component> {
export interface MountOptions<HooksConfig extends JsonObject, Component> {
props?: ComponentProps<Component>;
slots?: ComponentSlots;
on?: ComponentEvents;
Expand Down
3 changes: 1 addition & 2 deletions packages/playwright-ct-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
},
"dependencies": {
"@playwright/experimental-ct-core": "1.37.0-next",
"@vitejs/plugin-vue": "^4.2.1",
"vue-component-type-helpers": "^1.6.5"
"@vitejs/plugin-vue": "^4.2.1"
},
"bin": {
"playwright": "./cli.js"
Expand Down

0 comments on commit 4b915b0

Please sign in to comment.