Skip to content

fix(types): don't export derived types - #1598

Merged
Joel Einbinder (JoelEinbinder) merged 2 commits into
microsoft:masterfrom
JoelEinbinder:dont_export_all_types
Mar 31, 2020
Merged

fix(types): don't export derived types#1598
Joel Einbinder (JoelEinbinder) merged 2 commits into
microsoft:masterfrom
JoelEinbinder:dont_export_all_types

Conversation

@JoelEinbinder

@JoelEinbinder Joel Einbinder (JoelEinbinder) commented Mar 31, 2020

Copy link
Copy Markdown
Contributor

I was playing around today with different ways of changing the way we export types for #1439. I looked at only exporting 'Parameter' types, only exporting 'Return' types, only exporting a manual list of 'important' types. They all had different pros and cons, and it was very difficult to settle on a good answer.

For now, let's not export any parameter/return types. We can whitelist some types upon user request. I'm thinking LaunchOptions and AccessibilitySnapshot could be quite useful. We can always add new types after 1.0, but we can't remove them.

The patch looks funny because this was my original intent for the types, but I didn't know I had to export {} to tell typescript that my .d.ts shouldn't export everything.

Comment thread utils/generate_types/overrides.d.ts Outdated
@JoelEinbinder
Joel Einbinder (JoelEinbinder) merged commit a853690 into microsoft:master Mar 31, 2020
Debbie O'Brien (debs-obrien) pushed a commit to debs-obrien/playwright that referenced this pull request Jun 10, 2025
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