Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
0.9.3
-
None
-
Patch Available
-
Patch
Description
If you have a struct and you want to set some fields by prototype (e.g. like a default, that depends on a certain application-state), Thrift does not allow this, because all fields will be "initialized" with null.
Since I see no requirement to do so and the prototype of such a struct is defined, but always empty, I changed the Thrift-JS-Compiler to stop initializing fields with null and enabling the setting of fields via prototype.