From dc8e1910776cfcc87797f3a29d7ae9e1e98cb0c1 Mon Sep 17 00:00:00 2001 From: Mathieu Acthernoene Date: Tue, 10 Jan 2017 11:43:26 +0100 Subject: [PATCH] Add nested message usage example --- examples/flow/output/test/test_grpc_js.js | 22 +------------------ examples/flow/protos/test.proto | 1 + .../{{.File.Package}}_grpc_js.js.tmpl | 6 ----- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/examples/flow/output/test/test_grpc_js.js b/examples/flow/output/test/test_grpc_js.js index 2510017..cf42431 100644 --- a/examples/flow/output/test/test_grpc_js.js +++ b/examples/flow/output/test/test_grpc_js.js @@ -61,11 +61,7 @@ export type TestMessage = {| v?: TestNestedEnum; - - TestNestedMessage?: TestNestedMessage; - - - TestNestedEnum?: TestNestedEnum; + w?: Array; |}; @@ -77,8 +73,6 @@ export type TestNoStreamRequest = {| message?: TestMessage; - - |}; @@ -91,8 +85,6 @@ export type TestNoStreamReply = {| err_msg?: string; - - |}; @@ -103,8 +95,6 @@ export type TestStreamRequestRequest = {| message?: TestMessage; - - |}; @@ -117,8 +107,6 @@ export type TestStreamRequestReply = {| err_msg?: string; - - |}; @@ -129,8 +117,6 @@ export type TestStreamReplyRequest = {| message?: TestMessage; - - |}; @@ -143,8 +129,6 @@ export type TestStreamReplyReply = {| err_msg?: string; - - |}; @@ -155,8 +139,6 @@ export type TestStreamBothRequest = {| message?: TestMessage; - - |}; @@ -169,8 +151,6 @@ export type TestStreamBothReply = {| err_msg?: string; - - |}; diff --git a/examples/flow/protos/test.proto b/examples/flow/protos/test.proto index 93ae06e..66ea9ac 100644 --- a/examples/flow/protos/test.proto +++ b/examples/flow/protos/test.proto @@ -39,6 +39,7 @@ message TestMessage { TestEnum u = 19; TestNestedEnum v = 20; + repeated TestNestedMessage w = 21; } message TestNoStreamRequest { TestMessage message = 1; } diff --git a/examples/flow/templates/{{.File.Package}}/{{.File.Package}}_grpc_js.js.tmpl b/examples/flow/templates/{{.File.Package}}/{{.File.Package}}_grpc_js.js.tmpl index fc99da1..d59d033 100644 --- a/examples/flow/templates/{{.File.Package}}/{{.File.Package}}_grpc_js.js.tmpl +++ b/examples/flow/templates/{{.File.Package}}/{{.File.Package}}_grpc_js.js.tmpl @@ -33,12 +33,6 @@ export type {{.Name}} = {| {{range .Field}} {{.Name}}?: {{. | jsType}}; {{end}} - {{range .NestedType}} - {{.Name}}?: {{.Name}}; - {{end}} - {{range .EnumType}} - {{.Name}}?: {{.Name}}; - {{end}} |}; {{end}}