Skip to content

Commit e5acca5

Browse files
authored
Merge pull request #806 from jroper/multi-filenames
Fixed load/loadSync filename parameter type
2 parents 1d1d2b9 + 8e2e2b2 commit e5acca5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/proto-loader/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ function addIncludePathResolver(root: Protobuf.Root, includePaths: string[]) {
270270

271271
/**
272272
* Load a .proto file with the specified options.
273-
* @param filename The file path to load. Can be an absolute path or relative to
274-
* an include path.
273+
* @param filename One or multiple file paths to load. Can be an absolute path
274+
* or relative to an include path.
275275
* @param options.keepCase Preserve field names. The default is to change them
276276
* to camel case.
277277
* @param options.longs The type that should be used to represent `long` values.
@@ -293,7 +293,7 @@ function addIncludePathResolver(root: Protobuf.Root, includePaths: string[]) {
293293
* @param options.includeDirs Paths to search for imported `.proto` files.
294294
*/
295295
export function load(
296-
filename: string, options?: Options): Promise<PackageDefinition> {
296+
filename: string | string[], options?: Options): Promise<PackageDefinition> {
297297
const root: Protobuf.Root = new Protobuf.Root();
298298
options = options || {};
299299
if (!!options.includeDirs) {
@@ -310,7 +310,7 @@ export function load(
310310
}
311311

312312
export function loadSync(
313-
filename: string, options?: Options): PackageDefinition {
313+
filename: string | string[], options?: Options): PackageDefinition {
314314
const root: Protobuf.Root = new Protobuf.Root();
315315
options = options || {};
316316
if (!!options.includeDirs) {

0 commit comments

Comments
 (0)