-
# Suggestion
## 🔍 Search Terms
type narrowing discriminated union destructing `does not exist on type`
## ✅ Viability Checklist
My suggestion meets these guidelines:
* [x] This …
uhyo updated
3 months ago
-
Determining whether a variable is empty and choosing different branches is a very fundamental operation.
Could we consider Allow pathOr to accept any type of defaultValue or allow defaultValue to …
-
### Describe the bug
In [Query Options page for Angular](https://tanstack.com/query/latest/docs/framework/angular/guides/query-options), the link ["with TypeScript"](https://tanstack.com/query/latest…
-
Following up on the discussion on Stackoverflow https://stackoverflow.com/questions/61082096/grpc-why-does-callinvoker-need-to-impose-trequest-class-and-tresponse-c/61082178.
F# discriminated union…
li-vu updated
4 years ago
-
z.literal should just return itself as the default. This is useful for discriminated unions.
Example:
```tsx
export const ProductionOriginSchema = z.object({
type: z.literal(Origin.CUSTOMER).d…
-
Please add support for `asRecord` deserializing fields into single-case discriminated unions. For example, I have a `type Int6 = Int6 of int`, which I just use for `int`s 0
-
In the Syntax section at the beginning, it is important to state that the first 1st pipe character is optional.
Otherwise, it is not clear that "type X = Y of Z" is valid syntax for defining a single…
-
I am aware there is an existing library for discriminated unions, but I am wondering if there is some kind of way to use the existing `Value.Parse` functionality such that it hints to the parser which…
-
We had this working initially using Swagger / OpenAPI -> Zodios client generation, but there were a few problems:
1. Updating a shared type, generating the client, etc was sorta a pain. Not seamless.…
-
### Discussed in https://github.com/samuelcolvin/pydantic/discussions/3918
After thinking about this a bit more, it feels to me like this is probably a bug, so creating a new issue out of it.
…