© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Decoding Union Types with Common and Distinct Properties - Effect Community
EC
Effect Community
•
2y ago
•
10 replies
Aurélien (quasar.work)
Decoding Union Types with Common and Distinct Properties
When decoding a union type of object that have some common props
, and some distinct props
, is there a nice way to use
decode
decode
without needing multiple
Schema.is()
Schema.is()
conditions
, or are we always supposed to use
decodeUnknown
decodeUnknown
in such case
?
Effect Community
Join
Production-grade applications in TypeScript.
6,221
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Union Schema Transformation and Decoding Compatibility
EC
Effect Community / schema
2y ago
Encoding and Decoding Optional Properties in Structs
EC
Effect Community / schema
12mo ago
Issue with Creating Union Types in TypeScript
EC
Effect Community / schema
3y ago
Error Reporting for Union types
EC
Effect Community / schema
3y ago