Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

fix(v1): generate unions of options list values - #295

Open
ochicf wants to merge 2 commits into
ricokahler:alphafrom
OrigenStudio:fix/list-unions
Open

fix(v1): generate unions of options list values#295
ochicf wants to merge 2 commits into
ricokahler:alphafrom
OrigenStudio:fix/list-unions

Conversation

@ochicf

@ochicf ochicf commented Apr 5, 2023

Copy link
Copy Markdown
Contributor

Reads the list option and defines the type of a union of those literal values. This should be probably tested.

Let me know if there's any other place where lists can be specified.

Fixes #63

@vercel

vercel Bot commented Apr 5, 2023

Copy link
Copy Markdown

@ochicf is attempting to deploy a commit to the Rico Kahler Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented May 10, 2023

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sanity-codegen-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2023 2:12pm

@ochicf

ochicf commented May 11, 2023

Copy link
Copy Markdown
Contributor Author

@ricokahler added test.

Just one small comment: I've set the order of list items in the structure and in the matching test object is different because the order of the list options is not respected, but always consistently returned as they are sorted by hash here. I guess this is the expected behaviour.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add more literal unions based off of options.lists

2 participants