-
Notifications
You must be signed in to change notification settings - Fork 378
Open
Description
I feel like this option should already exists, but I read through the README and could not find it. Please let me know if I am missing something.
Given a message:
message ErrorResponse {
uint32 code = 1;
string message = 2;
optional string details = 3;
}
It generates:
export interface ErrorResponse {
code: number;
message: string;
details?: string | undefined;
}That is expected behavior.
However, if I have the following message:
message Test {
message Inner {
string value = 1;
}
message A {
string value = 1;
}
message B {
string value = 1;
}
Inner inner = 1;
oneof value {
A a = 2;
B b = 3;
}
}
It generates:
export interface Test {
inner: TestInner | undefined;
value?: { $case: "a"; a: TestA } | { $case: "b"; b: TestB } | undefined;
}
export interface TestInner {
value: string;
}
export interface TestA {
value: string;
}
export interface TestB {
value: string;
}
Why is Test.inner defined with | undefined and why is Test.value optional and also defined with | undefined?
steve-todorov and carlspringSimon-Chenzw
Metadata
Metadata
Assignees
Labels
No labels