Skip to content

Commit c7d4566

Browse files
hiepthain0v1
authored andcommitted
grpc-loader: add method options in MethodDefinition
1 parent be40682 commit c7d4566

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/proto-loader/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ export interface MethodDefinition<RequestType, ResponseType, OutputRequestType=R
126126
originalName?: string;
127127
requestType: MessageTypeDefinition;
128128
responseType: MessageTypeDefinition;
129+
options?: Protobuf.IMethod['options'];
130+
parsedOptions?: Protobuf.IMethod['parsedOptions'];
129131
}
130132

131133
export interface ServiceDefinition {
@@ -242,6 +244,8 @@ function createMethodDefinition(
242244
originalName: camelCase(method.name),
243245
requestType: createMessageDefinition(requestType, fileDescriptors),
244246
responseType: createMessageDefinition(responseType, fileDescriptors),
247+
options: method.options,
248+
parsedOptions: method.parsedOptions,
245249
};
246250
}
247251

0 commit comments

Comments
 (0)