Skip to content

Commit ae33e87

Browse files
hiepthain0v1
authored andcommitted
grpc-loader: export interfaces and fix minor issue
1 parent dfb10f9 commit ae33e87

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/proto-loader/src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,18 @@ export interface EnumTypeDefinition extends ProtobufTypeDefinition {
115115
format: 'Protocol Buffer 3 EnumDescriptorProto';
116116
}
117117

118-
enum IdempotencyLevel {
118+
export enum IdempotencyLevel {
119119
IDEMPOTENCY_UNKNOWN = 0,
120120
NO_SIDE_EFFECTS = 1,
121121
IDEMPOTENT = 2
122122
}
123123

124-
interface NamePart {
124+
export interface NamePart {
125125
namePart: string;
126126
isExtension: boolean;
127127
}
128128

129-
interface UninterpretedOption {
129+
export interface UninterpretedOption {
130130
name?: (NamePart[]|null);
131131
identifierValue?: (string|null);
132132
positiveIntValue?: (number|Long|string|null);
@@ -136,12 +136,12 @@ interface UninterpretedOption {
136136
aggregateValue?: (string|null);
137137
}
138138

139-
interface CustomHttpPattern {
139+
export interface CustomHttpPattern {
140140
kind?: (string|null);
141141
path?: (string|null);
142142
}
143143

144-
interface HttpRule {
144+
export interface HttpRule {
145145
selector?: (string|null);
146146
get?: (string|null);
147147
put?: (string|null);
@@ -154,7 +154,7 @@ interface HttpRule {
154154
additionalBindings?: (HttpRule[]|null);
155155
}
156156

157-
interface MethodOptions {
157+
export interface MethodOptions {
158158
deprecated?: (boolean|null);
159159
idempotency_level?: (IdempotencyLevel|keyof typeof IdempotencyLevel|null);
160160
uninterpreted_option?: (UninterpretedOption[]|null);

packages/proto-loader/test/descriptor_type_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { rpcFileDescriptorSet } from '../test_protos/rpc.desc';
2020
import { readFileSync } from 'fs';
2121

2222
import * as proto_loader from '../src/index';
23-
import { dirname } from "path";
23+
import { dirname } from 'path';
2424

2525
// Relative path from build output directory to test_protos directory
2626
const TEST_PROTO_DIR = `${__dirname}/../../test_protos/`;

0 commit comments

Comments
 (0)