You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct Foo {
1: optional Bar bar
}
struct Bar {
1: optional Baz baz
}
it will generate the following typescript:
export interface IFooArgs {
bar?: Bar
}
export class Foo {
public bar: Bar
}
export interface IBarArgs {
baz?: Baz
}
export class Bar {
public baz: Baz
}
If I construct a IFooArgs with a bar property that has NO baz, it will not parse correctly on Foo despite fulfilling the thrift contract, as baz is NOT optional on the class Bar.
It seems like the easiest solution would be to make the properties on the root class optional, but if that is not possible, the I____Args interface could be generated for all classes (currently only generated if the class has optionals) and have it use the appropriate I___Args interface for its own properties rather than the root class types directly.
The text was updated successfully, but these errors were encountered:
If I have the following IDL:
it will generate the following typescript:
If I construct a IFooArgs with a bar property that has NO baz, it will not parse correctly on Foo despite fulfilling the thrift contract, as baz is NOT optional on the class Bar.
It seems like the easiest solution would be to make the properties on the root class optional, but if that is not possible, the I____Args interface could be generated for all classes (currently only generated if the class has optionals) and have it use the appropriate I___Args interface for its own properties rather than the root class types directly.
The text was updated successfully, but these errors were encountered: