-
Hi, so when I tried to implement discriminated unions for my app i got an error from `zod-mongoose`, and via the documentation i found out that they're not supported because of a mongoose limitation. …
-
Because the key checks are pruned, they are not marked as matching existing keys.
Likely needs a `precheckedKeys` for structure.
```ts
const AorB = type({
type: "'A'",
})
.or({
type…
-
-
-
I'm new to Zod, but I seem to be having an issue where something is breaking one of the schemas that I'm using for a discriminated union. The code below is causing an error in the final line (the erro…
-
In TypeScript this is supported by "[narrowing](https://www.typescriptlang.org/docs/handbook/2/narrowing.html)"
Consider this example:
```lua
---@alias ChatAction { type: '"chat"', targetName: st…
-
- [ ] Proposal added
- [ ] Discussed in LDM
- [ ] Decision in LDM
- [ ] Finalized (done, rejected, inactive)
- [ ] Spec'ed
See
- https://github.com/dotnet/roslyn/issues/188
- https://github.c…
-
This is a proposal for sum types, also known as discriminated unions. Sum types in Go should essentially act like interfaces, except that:
- they are value types, like structs
- the types contain…
-
-
```
I want to support discriminated unions, aka algebraic data types, such as
found in ML, OCaml, F#, and Haskell
```
Original issue reported on code.google.com by `cdiggins` on 3 Dec 2009 at 4:31