Add nested message usage example

This commit is contained in:
Mathieu Acthernoene 2017-01-10 11:43:26 +01:00
parent acbd1bf87b
commit dc8e191077
3 changed files with 2 additions and 27 deletions

View File

@ -61,11 +61,7 @@ export type TestMessage = {|
v?: TestNestedEnum; v?: TestNestedEnum;
w?: Array<TestNestedMessage>;
TestNestedMessage?: TestNestedMessage;
TestNestedEnum?: TestNestedEnum;
|}; |};
@ -77,8 +73,6 @@ export type TestNoStreamRequest = {|
message?: TestMessage; message?: TestMessage;
|}; |};
@ -91,8 +85,6 @@ export type TestNoStreamReply = {|
err_msg?: string; err_msg?: string;
|}; |};
@ -103,8 +95,6 @@ export type TestStreamRequestRequest = {|
message?: TestMessage; message?: TestMessage;
|}; |};
@ -117,8 +107,6 @@ export type TestStreamRequestReply = {|
err_msg?: string; err_msg?: string;
|}; |};
@ -129,8 +117,6 @@ export type TestStreamReplyRequest = {|
message?: TestMessage; message?: TestMessage;
|}; |};
@ -143,8 +129,6 @@ export type TestStreamReplyReply = {|
err_msg?: string; err_msg?: string;
|}; |};
@ -155,8 +139,6 @@ export type TestStreamBothRequest = {|
message?: TestMessage; message?: TestMessage;
|}; |};
@ -169,8 +151,6 @@ export type TestStreamBothReply = {|
err_msg?: string; err_msg?: string;
|}; |};

View File

@ -39,6 +39,7 @@ message TestMessage {
TestEnum u = 19; TestEnum u = 19;
TestNestedEnum v = 20; TestNestedEnum v = 20;
repeated TestNestedMessage w = 21;
} }
message TestNoStreamRequest { TestMessage message = 1; } message TestNoStreamRequest { TestMessage message = 1; }

View File

@ -33,12 +33,6 @@ export type {{.Name}} = {|
{{range .Field}} {{range .Field}}
{{.Name}}?: {{. | jsType}}; {{.Name}}?: {{. | jsType}};
{{end}} {{end}}
{{range .NestedType}}
{{.Name}}?: {{.Name}};
{{end}}
{{range .EnumType}}
{{.Name}}?: {{.Name}};
{{end}}
|}; |};
{{end}} {{end}}