Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(defineConfig): fix type issue passing custom property in the seco… #33774

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yangsisi0422
Copy link

…nd config param in defineConfig function

To fix TS error: Object literal may only specify known properties, and customOption does not exist in type

When playwright.config.ts as follow:

 type Options = {
  customOption: any[]
}

export default defineConfig<Options>(BasePlaywrightConfig, {
  use: {
    customOption,
  },
})

…nd config param in defineConfig function

To fix TS error: Object literal may only specify known properties, and customOption does not exist in type

When playwright.config.ts as follow:
```
 type Options = {
  customOption: any[]
}

export default defineConfig<Options>(BasePlaywrightConfig, {
  use: {
    customOption,
  },
})
```

Signed-off-by: yangsisi <[email protected]>
Copy link
Contributor

Test results for "tests 1"

1 flaky ⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1

37173 passed, 650 skipped
✔️✔️✔️

Merge workflow run.

Copy link
Contributor

@dgozman dgozman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yangsisi0422 This is a great find! However, the changes should be made in a different place:

While you are fixing this, could you please also update the defineConfig<T, W> override in the same way? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants