-
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
[BUG] No Playwright class typed definition anymore in @next #1483
Comments
This is working as intended. The |
Hmm, yep its a kinda hacky approach to overwrite the methods. So the use case in a nutshell is to overwrite the launch methods dynamically and assign to their browsers an ID. Edit: Another use case is on Try Playwright for that the usage in the Monaco editor. there I also just have used the previous Also I found a issue in playwright-video: https://github.com/qawolf/playwright-video/blob/9a7912f6fb04aa86ff5c4be757ef5dccfddd0dcb/src/ScreencastFrameCollector.ts#L4 that the type could not be resolved. |
Is it possible for playwright-core to expose the types for power users so we don't have to manually define our own declaration files? |
I really don't want to support people hacking on our internal code. I'd much rather support your use cases in the public api. |
The main issue here is that you want multiple playwright objects in the same node process, with their own prototype hacks on it. If you are ok with the same hacks everywhere, then requiring playwright-core directly will work. I don't think this will ever work cleanly though.
Instead try
This just needs to use the CDPSession type from the root of playwright instead. Closing this issue for now as I consider it not a bug. Feel free to keep up the discussion here about internal types, or file new issues for specific things that might be missing/broken. |
This makes sense, I have not had a chance to use the new types yet. I will open an issue for any missing types in the public API. |
Context:
Code Snippet
Describe the bug
In version 0.11.1 and some of the recent next releases it was working. Now the types are missing.
Version 0.11.1 example: https://unpkg.com/playwright-core@0.11.1/lib/server/playwright.d.ts
I think it's related to #1166.
cc @JoelEinbinder
The text was updated successfully, but these errors were encountered: