From af1ed8a2fb8432138b69f392f2362f0fb9a63fee Mon Sep 17 00:00:00 2001 From: Mathieu Acthernoene Date: Thu, 5 Jan 2017 18:26:35 +0100 Subject: [PATCH] Don't export types --- examples/js-grpc/output/test/test_grpc_js.js | 18 +++++++++--------- .../{{.File.Package}}_grpc_js.js.tmpl | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/js-grpc/output/test/test_grpc_js.js b/examples/js-grpc/output/test/test_grpc_js.js index 746fe1e..dfb27c4 100644 --- a/examples/js-grpc/output/test/test_grpc_js.js +++ b/examples/js-grpc/output/test/test_grpc_js.js @@ -5,7 +5,7 @@ import grpc from 'grpc' import pbFile from './pbFile.js' -export type TestMessage = {| +type TestMessage = {| a?: string; b?: number; c?: number; @@ -18,38 +18,38 @@ export type TestMessage = {| r?: Array; |}; -export type TestNoStreamRequest = {| +type TestNoStreamRequest = {| message?: TestMessage; |}; -export type TestNoStreamReply = {| +type TestNoStreamReply = {| message?: TestMessage; err_msg?: string; |}; -export type TestStreamRequestRequest = {| +type TestStreamRequestRequest = {| message?: TestMessage; |}; -export type TestStreamRequestReply = {| +type TestStreamRequestReply = {| message?: TestMessage; err_msg?: string; |}; -export type TestStreamReplyRequest = {| +type TestStreamReplyRequest = {| message?: TestMessage; |}; -export type TestStreamReplyReply = {| +type TestStreamReplyReply = {| message?: TestMessage; err_msg?: string; |}; -export type TestStreamBothRequest = {| +type TestStreamBothRequest = {| message?: TestMessage; |}; -export type TestStreamBothReply = {| +type TestStreamBothReply = {| message?: TestMessage; err_msg?: string; |}; diff --git a/examples/js-grpc/templates/{{.File.Package}}/{{.File.Package}}_grpc_js.js.tmpl b/examples/js-grpc/templates/{{.File.Package}}/{{.File.Package}}_grpc_js.js.tmpl index 16a98fb..b155759 100644 --- a/examples/js-grpc/templates/{{.File.Package}}/{{.File.Package}}_grpc_js.js.tmpl +++ b/examples/js-grpc/templates/{{.File.Package}}/{{.File.Package}}_grpc_js.js.tmpl @@ -3,11 +3,11 @@ {{$Package:=.File.Package}} import grpc from 'grpc' import pbFile from './pbFile.js' -{{range .File.EnumType}}export type {{.Name}} = {{range .Value}} +{{range .File.EnumType}}type {{.Name}} = {{range .Value}} | '{{.Name}}'{{end}} ;{{end}} {{range .File.MessageType}} -export type {{.Name}} = {|{{range .Field}} +type {{.Name}} = {|{{range .Field}} {{.Name}}?: {{. | jsType}};{{end}}{{range .EnumType}} {{.Name}}?:{{range .Value}} | '{{.Name}}'{{end}}