-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
base: main
Are you sure you want to change the base?
Conversation
…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]>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this 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:
- here: https://github.com/microsoft/playwright/blob/main/packages/playwright-ct-core/index.d.ts#L51-L56
- and here: https://github.com/microsoft/playwright/blob/main/utils/generate_types/overrides-test.d.ts#L484-L489
While you are fixing this, could you please also update the defineConfig<T, W>
override in the same way? Thank you!
@yangsisi0422 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
bd57038
to
7cee096
Compare
This comment has been minimized.
This comment has been minimized.
Test results for "tests 1"1 failed 3 flaky37187 passed, 650 skipped Merge workflow run. |
…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: