Skip to content

Commit d335428

Browse files
hiepthain0v1
authored andcommitted
grpc-loader: cleanup MethodOptions interfaces
1 parent 68ea1f4 commit d335428

File tree

1 file changed

+10
-24
lines changed

1 file changed

+10
-24
lines changed

packages/proto-loader/src/index.ts

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -127,39 +127,25 @@ export interface NamePart {
127127
}
128128

129129
export interface UninterpretedOption {
130-
name?: (NamePart[]|null);
131-
identifier_value?: (string|null);
132-
positive_int_value?: (number|null);
133-
negative_int_value?: (number|null);
134-
double_value?: (number|null);
135-
string_value?: (string|null);
136-
aggregate_value?: (string|null);
130+
name?: NamePart[];
131+
identifier_value?: string;
132+
positive_int_value?: number;
133+
negative_int_value?: number;
134+
double_value?: number;
135+
string_value?: string;
136+
aggregate_value?: string;
137137
}
138138

139139
export interface CustomHttpPattern {
140-
kind?: (string|null);
141-
path?: (string|null);
142-
}
143-
144-
export interface HttpRule {
145-
selector?: (string|null);
146-
get?: (string|null);
147-
put?: (string|null);
148-
post?: (string|null);
149-
delete?: (string|null);
150-
patch?: (string|null);
151-
custom?: (CustomHttpPattern|null);
152-
body?: (string|null);
153-
response_body?: (string|null);
154-
additional_bindings?: (HttpRule[]|null);
140+
kind?: string;
141+
path?: string;
155142
}
156143

157144
export interface MethodOptions {
158145
deprecated?: (boolean|null);
159146
idempotency_level?: (IdempotencyLevel|keyof typeof IdempotencyLevel|null);
160147
uninterpreted_option?: (UninterpretedOption[]|null);
161-
"(google.api.http)"?: (HttpRule|null);
162-
"(google.api.method_signature)"?: (string[]|null);
148+
[k: string]: unknown
163149
}
164150

165151
export interface MethodDefinition<RequestType, ResponseType, OutputRequestType=RequestType, OutputResponseType=ResponseType> {

0 commit comments

Comments
 (0)