-
-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
Hello, I'm wondering if types returned by generating data in these two different ways should be the same or not?
Example one
article: {
metadata: {
author: nullable(String),
}
},
the returned type of article.metadata.author is string | null | undefined.
Example Two
article: {
metadata: oneOf('metadata'),
},
metadata: {
author: nullable(String),
},
the returned type of article.metadata.author is string | null;
I would expect the types to be the same and I'd also expect the type to be string | null. If undefined was required, maybe a helper such as optional(nullable(String)) could be used to generate it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels