Skip to content

add Schema.TaggedUnion #4736

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

Open
wants to merge 20 commits into
base: next-minor
Choose a base branch
from

Conversation

alphashuro
Copy link

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Adds a taggedEnum function to Schema, for easily creating discriminated unions using TaggedStruct (similar to the taggedEnum function in Data).

Related

@github-project-automation github-project-automation bot moved this to Discussion Ongoing in PR Backlog Apr 14, 2025
Copy link

changeset-bot bot commented Apr 14, 2025

🦋 Changeset detected

Latest commit: f98e36a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 32 packages
Name Type
effect Minor
@effect/cli Major
@effect/cluster Major
@effect/experimental Major
@effect/opentelemetry Major
@effect/platform-browser Major
@effect/platform-bun Major
@effect/platform-node-shared Major
@effect/platform-node Major
@effect/platform Major
@effect/printer-ansi Major
@effect/printer Major
@effect/rpc Major
@effect/sql-clickhouse Major
@effect/sql-d1 Major
@effect/sql-drizzle Major
@effect/sql-kysely Major
@effect/sql-libsql Major
@effect/sql-mssql Major
@effect/sql-mysql2 Major
@effect/sql-pg Major
@effect/sql-sqlite-bun Major
@effect/sql-sqlite-do Major
@effect/sql-sqlite-node Major
@effect/sql-sqlite-react-native Major
@effect/sql-sqlite-wasm Major
@effect/sql Major
@effect/typeclass Major
@effect/vitest Major
@effect/ai Major
@effect/ai-anthropic Major
@effect/ai-openai Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@effect-bot effect-bot changed the base branch from main to next-minor April 14, 2025 15:39
@alphashuro alphashuro marked this pull request as ready for review April 14, 2025 15:39
@alphashuro alphashuro requested a review from gcanti as a code owner April 14, 2025 15:39
@effect-bot effect-bot force-pushed the next-minor branch 14 times, most recently from ed75e63 to 6a11eeb Compare April 19, 2025 16:48
@effect-bot effect-bot force-pushed the next-minor branch 9 times, most recently from 3e21765 to 07ed4f0 Compare April 23, 2025 07:55
@tim-smart
Copy link
Contributor

/rebase

@effect-bot effect-bot force-pushed the add-Schema-taggedEnum branch from ebceab9 to f98e36a Compare May 9, 2025 02:12
@effect-bot effect-bot force-pushed the next-minor branch 6 times, most recently from a6cebb8 to fa10f56 Compare May 11, 2025 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Discussion Ongoing
Development

Successfully merging this pull request may close these issues.

S.taggedUnion for easier creation of tagged unions vs S.union and S.attachPropertySignature
9 participants