Skip to content

Commit 6c7225f

Browse files
committed
make method options required
1 parent e6ac1a4 commit 6c7225f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/proto-loader/src/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export interface MethodDefinition<RequestType, ResponseType, OutputRequestType=R
154154
originalName?: string;
155155
requestType: MessageTypeDefinition;
156156
responseType: MessageTypeDefinition;
157-
options?: MethodOptions;
157+
options: MethodOptions;
158158
}
159159

160160
export interface ServiceDefinition {
@@ -265,8 +265,9 @@ function mapMethodOptions(options: Partial<MethodOptions>[] | undefined): Method
265265
{
266266
deprecated: false,
267267
idempotency_level: IdempotencyLevel.IDEMPOTENCY_UNKNOWN,
268-
uninterpreted_option: []
269-
});
268+
uninterpreted_option: [],
269+
}
270+
) as MethodOptions;
270271
}
271272

272273
function createMethodDefinition(

0 commit comments

Comments
 (0)