Don't export types

This commit is contained in:
Mathieu Acthernoene 2017-01-05 18:26:35 +01:00
parent 54eb016142
commit af1ed8a2fb
2 changed files with 11 additions and 11 deletions

View File

@ -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<number>;
|};
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;
|};

View File

@ -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}}