@@ -48,7 +48,7 @@ export interface PackageDefinition {
4848}
4949
5050export type Options = Protobuf . IParseOptions & Protobuf . IConversionOptions & {
51- include ?: string [ ] ;
51+ includeDirs ?: string [ ] ;
5252} ;
5353
5454function joinName ( baseName : string , name : string ) : string {
@@ -154,15 +154,15 @@ function addIncludePathResolver(root: Protobuf.Root, includePaths: string[]) {
154154 * `defaults` is `false`. Defaults to `false`.
155155 * @param options.oneofs Set virtual oneof properties to the present field's
156156 * name
157- * @param options.include Paths to search for imported `.proto` files.
157+ * @param options.includeDirs Paths to search for imported `.proto` files.
158158 */
159159export function load ( filename : string , options : Options ) : Promise < PackageDefinition > {
160160 const root : Protobuf . Root = new Protobuf . Root ( ) ;
161- if ( ! ! options . include ) {
162- if ( ! ( options . include instanceof Array ) ) {
163- return Promise . reject ( new Error ( 'The include option must be an array' ) ) ;
161+ if ( ! ! options . includeDirs ) {
162+ if ( ! ( options . includeDirs instanceof Array ) ) {
163+ return Promise . reject ( new Error ( 'The includeDirs option must be an array' ) ) ;
164164 }
165- addIncludePathResolver ( root , options . include as string [ ] ) ;
165+ addIncludePathResolver ( root , options . includeDirs as string [ ] ) ;
166166 }
167167 return root . load ( filename , options ) . then ( ( loadedRoot ) => {
168168 loadedRoot . resolveAll ( ) ;
@@ -172,11 +172,11 @@ export function load(filename: string, options: Options): Promise<PackageDefinit
172172
173173export function loadSync ( filename : string , options : Options ) : PackageDefinition {
174174 const root : Protobuf . Root = new Protobuf . Root ( ) ;
175- if ( ! ! options . include ) {
176- if ( ! ( options . include instanceof Array ) ) {
175+ if ( ! ! options . includeDirs ) {
176+ if ( ! ( options . includeDirs instanceof Array ) ) {
177177 throw new Error ( 'The include option must be an array' ) ;
178178 }
179- addIncludePathResolver ( root , options . include as string [ ] ) ;
179+ addIncludePathResolver ( root , options . includeDirs as string [ ] ) ;
180180 }
181181 const loadedRoot = root . loadSync ( filename , options ) ;
182182 loadedRoot . resolveAll ( ) ;
0 commit comments