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

Extract events into named types #4254

Closed
wants to merge 1 commit into from

Conversation

captbaritone
Copy link
Contributor

Being able to refine log events to named types in tests would be very helpful, so I've(?) refactored the union of log events to be a union of named types.

This refactor brought to you by ChatGPT.

Prompt:

Can you refactor this Flow code to extract each log event type into its own named type, with the LogEvent type being a union of those types?

Took a few tries because the output was longer than it could emit as one response:

Can you do the last ones, starting with StorePublishLogEvent (and the resulting union of all named types)

@captbaritone
Copy link
Contributor Author

CI failure is unrelated. Started breaking with 41ace35. Looking into that separately.

@facebook-github-bot
Copy link
Contributor

@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@captbaritone merged this pull request in e43a369.

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

Successfully merging this pull request may close these issues.

2 participants