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

List resource returns more specific type #293

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

tribble
Copy link

@tribble tribble commented Jul 26, 2024

Description

Making this a union was the wrong choice. It requires the developer to handle the scenario where before does not exist in the dictionary for all list resources. It's only the case for Events.

This type var lets us return the correct type for each resource.

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

@tribble tribble requested a review from mattgd July 26, 2024 00:40
@tribble tribble requested a review from a team as a code owner July 26, 2024 00:40
@tribble tribble merged commit 09c0dae into beta-5.0 Jul 26, 2024
5 checks passed
@tribble tribble deleted the make-list-metadata-a-type-var branch July 26, 2024 17:04
tribble added a commit that referenced this pull request Jul 30, 2024
* List resource returns more specific type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants